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 |
|---|---|---|
|
|
Bind address |
|
|
SQLite database path |
|
|
Log level |
|
(none) |
Public URL shown in tracking snippets |
|
(none) |
Path to MaxMind/DB-IP |
|
(none) |
Path to web server access log (directory or file) |
|
(none) |
Neon PostgreSQL URL for cloud backup sync |
|
|
How often to sync to Neon (seconds) |
|
|
Set to |
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