# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
```

3. Install the Docker packages

```bash
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

4. Grant permissions

```
sudo usermod -aG docker $USER
newgrp docker
```

## Deploy SigNoz and Nango

Clone this repo, which includes Docker files with SigNoz and Nango:

```bash
git clone https://github.com/inkeep/agents-optional-local-dev inkeep-external-services
cd inkeep-external-services
```

Run this command to autogenerate a `.env` file:

```bash
cp .env.example .env && \
  encryption_key=$(openssl rand -base64 32) && \
  tmp_file=$(mktemp) && \
  sed "s|<REPLACE_WITH_BASE64_256BIT_ENCRYPTION_KEY>|$encryption_key|" .env > "$tmp_file" && \
  mv "$tmp_file" .env && \
  echo "Docker environment file created with auto-generated encryption key"
```

Nango requires a `NANGO_ENCRYPTION_KEY`. Once you create this, it cannot be edited.

Here's an overview of the important environment variables when deploying to production. Make sure to replace all of these in the `.env` file.

```bash
NANGO_ENCRYPTION_KEY=<nango_encryption_key>