Docker

Running Valvet with Docker

Docker is the recommended way to deploy the Valvet hub.

Quick Start

docker run -d \
  -p 4865:4865 \
  -v valvet-data:/data \
  --name valvet \
  ghcr.io/lindstrm/valvet

Docker Compose

services:
  valvet:
    image: ghcr.io/lindstrm/valvet
    container_name: valvet
    ports:
      - "4865:4865"
    volumes:
      - valvet-data:/data
    environment:
      - LOG_LEVEL=info
    restart: unless-stopped

volumes:
  valvet-data:

Volumes

PathPurpose
/dataSQLite database, configuration, and runtime data

Always mount /data as a named volume or bind mount. Without persistence, you lose your database on container restart.

Environment Variables

Pass environment variables with -e or in the environment section of your compose file:

docker run -d \
  -p 4865:4865 \
  -v valvet-data:/data \
  -e LOG_LEVEL=debug \
  -e JWT_SECRET=your-secret-here \
  ghcr.io/lindstrm/valvet

Networking

The hub exposes a single port (default 4865) for all traffic: HTTP, WebSocket, and SSE.

If nodes are running outside Docker, ensure they can reach the hub’s published port. If nodes are also in Docker, use a shared network:

services:
  valvet:
    image: ghcr.io/lindstrm/valvet
    networks:
      - backup-net

networks:
  backup-net:

Updates

docker pull ghcr.io/lindstrm/valvet
docker stop valvet
docker rm valvet
docker run -d -p 4865:4865 -v valvet-data:/data --name valvet ghcr.io/lindstrm/valvet

Database migrations run automatically on startup.