Self-hosted Docker Compose stack with Traefik reverse proxy and automatic TLS via Let's Encrypt. Each service is routed automatically under your domain — no manual certificate management needed.
traefik/— Reverse proxy, TLS termination, HTTP→HTTPS redirect, root-domain landing pagekuma/— Uptime Kumamonitoring/— Monitoring Stackn8n/— n8nportainer/— Portainervault/— HashiCorp Vaultopenclaw/— OpenClawcode/— Code Server
The target server must have:
git— used by the deploy workflow to clone/pull the repodocker+ Docker Compose plugin — container runtime and orchestration- Traefik running with the
traefik-netexternal Docker network
- Clone this repo onto your server and
cdinto it. - Copy and edit the environment file for each service before starting:
for svc in traefik kuma monitoring n8n portainer vault openclaw code; do
cp "$svc/.env.example" "$svc/.env"
done
# Edit each $svc/.env with your domain, passwords, API keys, etc.Tip: If you skip this step,
start.shwill auto-copy.env.example→.envon first run and start the service immediately. Edit the generated files and re-runstart.shto apply your values.
- Point DNS for your domain to the server's IP address.
- Run:
./start.shServices start and provisioning runs automatically (Kuma monitors, n8n workflows, etc. where applicable). Services are available at https://<service>.<your-domain> once DNS propagates.
Note:
.envfiles anddata/directories are gitignored — never committed to the repo.
Start all services:
./start.shStop all services:
./stop.shstart.sh creates the traefik-net Docker network if it doesn't exist, then starts each service in order.
.github/workflows/deploy.yml deploys to your server on every push to main.
Required repository secrets (Settings → Secrets and variables → Actions):
| Secret | Description |
|---|---|
SERVER_SSH_PRIVATE_KEY |
Private SSH key for the runner to reach the server |
SERVER_IP |
Server IP address |
SERVER_DOMAIN |
Your domain, e.g. myapp.com — enables Traefik + TLS (omit for local mode) |
The workflow also accepts a ssh_user dispatch input (default: root). Set it to ubuntu when deploying to EC2 Ubuntu 24.04 instances.
Two deployment modes:
- Local — run
./start.shwithout settingSERVER_DOMAIN. Services start on localhost ports with no TLS. - Production via CI — add
SERVER_DOMAINas a secret. The workflow injects it asTRAEFIK_HOSTwhen runningstart.shon the server, enabling Traefik routing and automatic TLS.
EC2 / AWS key pair — paste the .pem file contents as SERVER_SSH_PRIVATE_KEY:
cat ~/your-key.pem # paste the output into the secretNew deploy key — generate a dedicated key pair, add the public key to the server, then paste the private key as SERVER_SSH_PRIVATE_KEY:
ssh-keygen -t ed25519 -f ~/.ssh/deploy -N ""
ssh-copy-id -i ~/.ssh/deploy.pub <ssh_user>@<SERVER_IP>
cat ~/.ssh/deploy # paste the output into the secretTo stop all services via CI: Actions → Deploy → Run workflow → action: stop.