AgenticPacks
Ship

Deploy

Learn how to run AgenticPacks on a VPS, with Docker and Caddy.

Local Compose is for development. This page is the production shape: a Linux VPS, Docker Compose, and, on Pro, Caddy for TLS. OSS production is the same Compose idea without Caddy, Terraform, Prometheus, or Grafana.

Production Compose

From a checkout with .env filled in:

docker compose up -d --build

Postgres is on the Compose network only. It is not published on the host. A postgres-backup container takes a daily dump and keeps seven days on a volume. The scripts live in docker/.

Provision the server

Two paths reach the same Ubuntu host.

Terraform, under terraform/, creates a Hetzner server, the firewall, the SSH key, and a Docker install. Copy terraform.tfvars.example to terraform.tfvars, set hcloud_token, server_type, location, and ssh_public_key, then apply:

cd terraform
terraform init
terraform plan
terraform apply

A CX23 or CPX22, 2 vCPU and 4 GB of RAM, is the size the guide is written for. The same Docker steps apply on any other Ubuntu VPS if you would rather create the server by hand: install Docker and the Compose plugin, then clone the private repository to /opt/agenticpacks-pro.

DNS and the env file

Point an A record at the server address. www can be a CNAME to the apex. Grafana, if you want it on a hostname, is an A record for grafana.

sslip.io works before a domain exists. Set DOMAIN to <server-ip>.sslip.io and Caddy will still ask Let's Encrypt for a certificate.

On Cloudflare, use Full (strict) or DNS-only. Flexible SSL loops with Caddy.

Then, on the server:

git clone <your-private-repo-url> /opt/agenticpacks-pro
cd /opt/agenticpacks-pro
cp .env.example .env
chmod 600 .env

The variables production Compose requires are listed in Configuration. chmod 600 keeps that file readable by the deploy user only.

Caddy

The included Caddyfile redirects www to the apex, proxies the app, and refuses /api/metrics from the outside. Grafana is a second site at grafana.$DOMAIN, still without a host port of its own. Only Caddy binds 80 and 443. Postgres, Redis, and Prometheus stay on the internal network.

First boot

docker compose up -d --build

The app container retries prisma db push, then starts node server.js. The worker container starts node dist/worker.mjs and does not push the schema. You do not run a separate push after a successful first boot.

Later code updates are git pull and ./scripts/deploy.sh from /opt/agenticpacks-pro. That script rebuilds the app and the worker, pushes the schema once, and waits until /api/health returns 200. Postgres and Redis keep running. A machine that only needs its containers started again, with no new code, is docker compose up -d.

Stripe on the public URL

After the origin answers on HTTPS, add the webhook endpoint in the Stripe Dashboard: https://yourdomain.com/api/webhooks/stripe. The five events and the portal return URL are listed in Billing.

Where to go next

Grafana and Prometheus are covered in Observability.