Self-Hosted Deployment

Run antics on your own server. Single binary, single SQLite file.

Docker

docker run -d \
  --name antics \
  --network host \
  -e LISTEN_ADDR=0.0.0.0:8480 \
  -e "DATABASE_URL=sqlite:/data/antics.db?mode=rwc" \
  -e RUST_LOG=antics=info \
  -v antics-data:/data \
  ghcr.io/turtletech-ehf/antics:latest

Docker Compose

services:
  antics:
    image: ghcr.io/turtletech-ehf/antics:latest
    network_mode: host
    volumes:
      - antics-data:/data
    environment:
      LISTEN_ADDR: "0.0.0.0:8480"
      DATABASE_URL: "sqlite:/data/antics.db?mode=rwc"
      RUST_LOG: "antics=info"
      GEOIP_PATH: "/data/geoip.mmdb"  # optional

volumes:
  antics-data:

Environment Variables

Variable

Default

Description

LISTEN_ADDR

0.0.0.0:8480

Bind address

DATABASE_URL

sqlite:antics.db?mode=rwc

SQLite database path

RUST_LOG

antics=info

Log level

PUBLIC_URL

(none)

Public URL shown in tracking snippets

GEOIP_PATH

(none)

Path to MaxMind/DB-IP .mmdb file

ANTICS_LOG_PATH

(none)

Path to web server access log (directory or file)

NEON_DATABASE_URL

(none)

Neon PostgreSQL URL for cloud backup sync

SYNC_INTERVAL_SECS

3600

How often to sync to Neon (seconds)

ANTICS_MODE

self-hosted

Set to managed for multi-tenant SaaS mode

GeoIP Setup

Download the free DB-IP country database:

curl -sL "https://download.db-ip.com/free/dbip-country-lite-2026-03.mmdb.gz" | \
  gunzip > /path/to/data/geoip.mmdb

Set GEOIP_PATH=/data/geoip.mmdb in your container environment.

Caddy Log Ingestion

To track visitors that block JavaScript, point antics at your Caddy access logs:

ANTICS_LOG_PATH=/var/log/caddy

Antics watches all .log files in the directory, parses JSON access log entries, filters bots and static assets, and feeds matching events into the same pipeline as the JS tracker. Falls back to 10-second polling if inotify isn’t available (common in containers).

Reverse Proxy

Put antics behind your reverse proxy. Example for Caddy:

antics.example.com {
    reverse_proxy localhost:8480
}

Health Check

curl http://localhost:8480/api/health
# {"status":"ok","service":"antics"}

Prometheus Metrics

curl http://localhost:8480/metrics
# antics_pageviews_24h{domain="example.com"} 1234
# antics_visitors_24h{domain="example.com"} 567
# antics_realtime_visitors{domain="example.com"} 3