Self hosting

Deploy to AWS EC2

Copy page

Deploy to AWS EC2 with Docker Compose

Create a VM Instance

  • Go to Compute Engine.
  • Launch an instance
  • Select Amazon Machine Image (AMI)
  • Recommended size is at least t2.large (2 vCPU, 8 GiB Memory).
  • Click "Edit" in the "Network settings" section. Set up an Inbound Security Group Rules for (TCP, 3000, 0.0.0.0/0), (TCP, 3002-3003, 0.0.0.0/0), (TCP, 3050-3051, 0.0.0.0/0), and (TCP, 3080, 0.0.0.0/0). These are the ports exposed by the Inkeep services.
  • Auto-assign public IP
  • Increase the size of storage to 30 GiB.

Install Docker Compose

  1. SSH into the EC2 Instance

  2. Install packages

sudo dnf update
sudo dnf install -y git
sudo dnf install -y docker
sudo mkdir -p /usr/libexec/docker/cli-plugins
sudo curl -SL https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m) -o /usr/libexec/docker/cli-plugins/docker-compose
sudo chmod +x /usr/libexec/docker/cli-plugins/docker-compose

Deploy SigNoz and Nango

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

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:

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.

NANGO_ENCRYPTION_KEY=<nango_encryption_key>

# Replace these with your <vm_external_ip> in production!
NANGO_SERVER_URL=http://<vm_external_ip>:3050
NANGO_PUBLIC_CONNECT_URL=http://<vm_external_ip>:3051

# Modify these in production environments!
NANGO_DASHBOARD_USERNAME=admin@example.com
NANGO_DASHBOARD_PASSWORD=adminADMIN!@12

Build and deploy SigNoz, Nango, OTEL Collector, and Jaeger:

docker compose up -d

This may take up to 5 minutes to start.

Retrieve your SigNoz and Nango API Keys

To get your SigNoz API key SIGNOZ_API_KEY:

  • Open SigNoz in a browser at http://<vm_external_ip>:3080
  • Navigate to Settings → Account Settings → API Keys → New Key
  • Choose a role, Viewer is sufficient for observability
  • Set the expiration field to "No Expiry" to prevent the key from expiring

To get your Nango secret key NANGO_SECRET_KEY:

  • Open Nango in a browser at http://<vm_external_ip>:3050
  • Nango auto-creates two environments, Prod and Dev. Select the one you will use.
  • Navigate to Environment Settings to find the secret key

Deploy the Inkeep Agent Framework

From the root directory, create a new project directory for the Docker Compose setup for the Inkeep Agent Framework

mkdir inkeep && cd inkeep
wget https://raw.githubusercontent.com/inkeep/agents/refs/heads/main/docker-compose.yml
wget https://raw.githubusercontent.com/inkeep/agents/refs/heads/main/.env.docker.example

Generate a .env file from the example:

cp .env.docker.example .env

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

# Change to "production" if deploying to production
ENVIRONMENT=production

# AI Provider Keys (you need at least one)
ANTHROPIC_API_KEY=
OPENAI_API_KEY=
GOOGLE_GENERATIVE_AI_API_KEY=

# Nango
NANGO_SECRET_KEY=

# SigNoz
SIGNOZ_API_KEY=

# Uncomment and set each of these with (openssl rand -hex 32)
INKEEP_AGENTS_MANAGE_API_BYPASS_SECRET=
INKEEP_AGENTS_RUN_API_BYPASS_SECRET=
INKEEP_AGENTS_JWT_SIGNING_SECRET=

# Uncomment and set these for the Manage UI at http://<vm_external_ip>:3000
PUBLIC_INKEEP_AGENTS_MANAGE_API_URL=http://<vm_external_ip>:3002
PUBLIC_INKEEP_AGENTS_RUN_API_URL=http://<vm_external_ip>:3003
PUBLIC_INKEEP_AGENTS_RUN_API_BYPASS_SECRET=<copy INKEEP_AGENTS_RUN_API_BYPASS_SECRET>
PUBLIC_NANGO_SERVER_URL=http://<vm_external_ip>:3050
PUBLIC_NANGO_CONNECT_BASE_URL=http://<vm_external_ip>:3051
PUBLIC_SIGNOZ_URL=http://<vm_external_ip>:3080

# Uncomment and set these to access Manage UI at http://<vm_external_ip>:3000
INKEEP_AGENTS_MANAGE_UI_USERNAME=admin@example.com
INKEEP_AGENTS_MANAGE_UI_PASSWORD=adminADMIN!@12

Run with Docker:

docker compose up -d

Then open http://<vm_external_ip>:3000 in a browser!