# Docker

This guide explains how to run Nected locally using Docker Compose. It is intended for developers and teams looking to test the platform, build rules, or evaluate Nected features in a controlled, single-node environment.

{% hint style="info" %}
Docker deployment is for doing quick POCs without the features like Load testing, stress testing and production-level usage.
{% endhint %}

## Pre-requisites

#### Supported Operating Systems

* macOS (Intel/M-Series)
* Linux (Ubuntu 20.04+)
* Windows (with WSL2)

#### Required Tools

| Tool           | Version |
| -------------- | ------- |
| Docker Engine  | v25.x+  |
| Docker Compose | v2.x+   |

#### Ports Availability

Ensure the following ports are available and not already in use:

| Service           | Port |
| ----------------- | ---- |
| UI (Konark)       | 3000 |
| Backend (Nalanda) | 8001 |
| Backend (Vidhaan) | 8002 |
| Editor            | 3001 |

{% hint style="success" %}
**Note:** Docker Compose automatically provisions PostgreSQL, Redis, and Elasticsearch containers. No manual configuration is required.
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=6_Ul9KvXLOU>" %}

{% hint style="info" %}
For Common prerequisites, refer to this page: Common Requirements
{% endhint %}

## Installation Steps:

The following steps will run a local instance of the Nected Platform using the default configuration file (`docker-compose.yml`):

1. Open your terminal (on Linux/Mac) or Command Prompt/PowerShell (on Windows).
2. Clone the Nected repository using Git:

   ```bash
   git clone https://github.com/nected/docker-compose.git
   ```
3. Change the directory into the root of the project:

   ```bash
   cd  docker-compose
   ```
4. **Activate with a license key:** To activate your instance with a license key, refer to the [Update License Key](/nected-docs/self-hosting/additional-configuration/update-license-key.md) guide for the detailed steps.
5. Start the Docker containers using Docker Compose:

   ```bash
   docker-compose up
   ```

### **Access the local dashboard:**

1. Open the browser and access `http://localhost:3000`
2. Use credential `dev@nected.local / devPass123` to sign in to the local dashboard.
3. Once you've created an account, you can either start with the free plan or activate your instance with a license key.

{% hint style="info" %}
**IMPORTANT:** While accessing rule and workflow API from other services, replace `http://10.10.0.1:8002/` with `http://localhost:8002/`
{% endhint %}

### Email Configuration

To enable email in your local setup please refer to the following. Change should be made in `nectedconfig/nalanda.env`

{% hint style="success" %}
**Configure Email Service:**\
Set up an email service to enable Nected to send notifications and alerts. [Learn more about configuring email services.](https://www.notion.so/Email-Setup-Guides-1f2c784e906f80f9b385d31b430335fd?pvs=21)
{% endhint %}

{% hint style="warning" %}
**Notes**

* **Do not use these defaults in production.**
* These values are suitable only for local setups and quick evaluations.
* For staging or production-grade environments, refer to the [Kubernetes](https://www.notion.so/Kubernetes-1f2c784e906f802f975cffcfcba95d50?pvs=21).
  {% endhint %}

Once updated, restart the containers to apply changes:

```bash
docker-compose down && docker-compose up -d
```

This ensures that your environment variables are loaded and used correctly by all dependent services.

### Troubleshooting:

1. For Apple M4 users, please do update the following keys in .env:

   ```
   ES_JAVA_OPTS="-Xms512m -Xmx512m -XX:UseSVE=0"
   ES_CLI_JAVA_OPTS="-XX:UseSVE=0"
   ```

   To update this, follow these steps:

   1. Go to the .env file located in the `docker-compose` folder.
   2. Uncomment line no. 10 and 11:

      ```
      # ES_JAVA_OPTS="-Xms512m -Xmx512m -XX:UseSVE=0"
      # ES_CLI_JAVA_OPTS="-XX:UseSVE=0"
      ```

      Once these changes are made, try `docker-compose up` again.
2. **Integrating local databases/API:** To integrate your local databases and API services in the Nected application, please use your machine IP instead of localhost.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nected.ai/nected-docs/self-hosting/new-installation/docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
