Setup Guide
This guide walks through deploying a full Sentrazone stack on a single Linux server using Docker Compose with Caddy for TLS termination.
Prerequisites
- A Linux server (Ubuntu 22.04+ recommended) with a public IP
- A domain name with DNS managed by Cloudflare or similar
- Docker and Docker Compose installed
- UFW or iptables for firewall management
1. Clone the repository
git clone https://github.com/ChronoCoders/sentrazone.git /root/sentra
cd /root/sentra2. Configure environment variables
Copy the example file and fill in your values:
cp .env.example .env
chmod 600 .envRequired variables:
SENTRA_JWT_SECRET=<random 64-char string>
SENTRA_AUTH_TOKEN=<random token for agent authentication>
[email protected]
SENTRA_ADMIN_PASSWORD=<strong password>
SENTRA_WG_EASY_PASSWORD=<wg-easy admin password>3. Configure your domain
Create DNS A records pointing your domain and subdomains to your server IP. The Caddyfile expects:
yourdomain.com→ control plane dashboardwg-la.yourdomain.com→ Los Angeles VPN admin panelwg-va.yourdomain.com→ Virginia VPN admin panelwg-tx.yourdomain.com→ Dallas VPN admin panel
4. Open firewall ports
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 8443/tcp
ufw allow 51820/udp
ufw allow 51830/udp
ufw allow 51832/udp5. Start the stack
docker compose up -dCaddy will automatically obtain TLS certificates. The dashboard will be available at your domain within 30–60 seconds.
6. Log in
Navigate to your domain and log in with the admin email and password you configured in .env. The default session lifetime is 24 hours.
Updating
To deploy a new version:
git pull
docker compose build control
docker compose up -d controlAgent deployment (remote servers)
To run the agent on a separate machine rather than sharing a host with the control plane:
# On the remote server
SENTRA_CONTROL_URL=https://yourdomain.com \
SENTRA_AUTH_TOKEN=<your token> \
SENTRA_SERVER_ID=my-server \
./sentra-agentThe agent binary is built during docker compose build and can be extracted from the image or compiled separately with go build ./cmd/agent.