Docker Deployment

Docker is the recommended way to deploy Tally. The official image is based on Alpine Linux and weighs ~50MB.

Quick start

docker run -d   --name tally   -p 3000:3000   -v tally-data:/app/data   -e ADMIN_PASSWORD="your-secure-password-here"   -e SITES='{"example.com":{"token":"your-secret-token"}}'   tally:latest

Docker Compose (recommended)

services:
  tally:
    image: tally:latest
    container_name: tally
    restart: unless-stopped
    ports:
      - "3000:3000"
    volumes:
      - tally-data:/app/data
    environment:
      - NODE_ENV=production
      - ADMIN_PASSWORD=your-secure-password
      - SITES={"example.com":{"token":"your-secret-token"}}
      # Optional: GeoIP auto-download
      - MAXMIND_ACCOUNT_ID=your-account-id
      - MAXMIND_LICENSE_KEY=your-license-key

volumes:
  tally-data:

Create a .env file:

ADMIN_PASSWORD=your-secure-password-here
SITES={"example.com":{"token":"your-secret-token"}}
MAXMIND_ACCOUNT_ID=
MAXMIND_LICENSE_KEY=

Container details

Data persistence

All data lives in /app/data/ inside the container. Mount a Docker volume to persist the SQLite database and GeoIP file:

-v tally-data:/app/data

The database file is at /app/data/analytics.db . GeoIP is at /app/data/GeoLite2-City.mmdb .

Updating

docker compose pull
docker compose down
docker compose up -d

Schema migrations run automatically on startup. Your data is preserved across updates.