Skip to content
LinkPeek Documentation

Compose Deployment

The repository ships with a production-ready docker-compose.yml that wires LinkPeek to Postgres and the optional Cloudflared quick tunnel. Use this stack when you need durable storage, automated tunnel restarts, and health checks.

Annotated .env snippet pointing out LinkPeek admin, data directory, Postgres, and optional integration settings.

Populate the required secrets before you launch the Compose stack; leave optional integrations blank until you are ready.

Terminal window
cp .env.example .env
# Update the following keys:
# LINKPEEK_ADMIN_PASSWORD=<strong secret>
# DATA_DIR=/absolute/path/to/data
# POSTGRES_PASSWORD=<random>
# DBIP_API_KEY=<optional, for geo analytics>

Ensure the DATA_DIR directory exists and is writable by Docker.

Terminal window
docker compose up -d --build

The command builds the Go binary, applies database migrations, and starts:

  • linkpeek on port 9009
  • postgres with persistent volume linkpeek_pgdata
  • cloudflared (if enabled) with access to the Docker socket for restarts
  • Run docker compose ps and confirm all services show healthy.
  • Tail logs with docker compose logs -f linkpeek cloudflared.
  • In the UI, open the Tunnel tile to confirm the hostname and uptime banner update.
TaskCommand
Apply updatesdocker compose pull && docker compose up -d --build
Rotate admin passwordUse the Access panel or update LINKPEEK_ADMIN_PASSWORD and restart.
Backup Postgresdocker compose exec postgres pg_dump -U linkpeek > backup.sql
Restart Quick TunnelTrigger /api/tunnel/restart or run docker compose restart cloudflared

Keep the .env file out of version control. For production clusters, translate the Compose definitions into your platform equivalents (Kubernetes manifests, Nomad jobs, etc.) while retaining the same environment variables and volume mounts.