Skip to content

Docker Compose

A reference Compose file ships with the repository. Use it for repeatable gateway deployments with named volumes and environment-based configuration.


Quick start

export PRIVITTY_PROFILE=factory-gw-01
docker compose up -d

Tail logs:

docker compose logs -f privitty-edged

Reference docker-compose.yml

services:
  privitty-edged:
    image: privitty/edge:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:7200:7200"
    volumes:
      - privitty-data:/var/lib/privitty
    environment:
      PRIVITTY_PROFILE: "${PRIVITTY_PROFILE:?Set PRIVITTY_PROFILE}"
      PRIVITTY_LISTEN: "0.0.0.0:7200"
      PRIVITTY_ACCOUNTS: "/var/lib/privitty"
    healthcheck:
      test: ["/usr/local/bin/privitty-edge", "health"]
      interval: 30s
      timeout: 5s
      start_period: 60s
      retries: 3

volumes:
  privitty-data:

Environment file

Create .env alongside docker-compose.yml:

PRIVITTY_PROFILE=factory-gw-01
# PRIVITTY_SERVER=chat.privittytech.com
# RUST_LOG=info

Optional: custom config mount

Uncomment in docker-compose.yml to mount a reference config file:

volumes:
  - privitty-data:/var/lib/privitty
  - ./my-privitty-edged.toml:/etc/privitty/privitty-edged.toml:ro

Note

The TOML file is a reference document. Runtime settings are applied via environment variables — see Configuration.


Optional: viewer profile

Start with the optional viewer service:

docker compose --profile viewer up -d

This pulls privitty/viewer:latest separately and connects it to the daemon on the internal Docker network.


Common operations

# Status
docker compose exec privitty-edged \
  privitty-edge --accounts /var/lib/privitty status

# Activate license
docker compose exec privitty-edged \
  privitty-edge --accounts /var/lib/privitty \
  license activate "https://license.privitty.com/v1/license/TOKEN"

# Stop
docker compose down

# Stop and remove volume (destructive)
docker compose down -v

Using GHCR image

Replace the image line:

image: ghcr.io/privitty/edge:latest

See Registries for tag details.