Self-hosted Deployment

AdaTrack can be deployed on your own infrastructure for full data sovereignty. In self-hosted mode, the platform runs as a standalone unit with specific SaaS-only features (billing, quotas) disabled by default.

Standalone Mode Benefits

  • Single Binary: The Go backend embeds the React frontend, so you only need one artifact to run the entire platform.

  • No SaaS Dependencies: Runs without Stripe API keys or external billing configuration.

  • Relaxed Quotas: Resource quotas are automatically bypassed or set to unlimited in self-hosted mode.

  • Infrastructure Control: You manage your own PostgreSQL/TimescaleDB/PostGIS instance for complete data control.

Prerequisites

  • Docker & Docker Compose: Installed on your server.

  • PostgreSQL 16+: With TimescaleDB and PostGIS extensions enabled.

  • Public IP: For IoT devices to send UDP packets.

Quick Deployment (Docker)

The easiest way to self-host AdaTrack is using our pre-built standalone Docker image.

  1. Create a docker-compose.yml file:

    version: '3.8'
    services:
      adatrack:
        image: your-org/adatrack:latest
        ports:
          - "8080:8080"  # HTTP Dashboard & API
          - "1234:1234/udp" # UDP Ingestion
        environment:
          - ADATRACK_RUN_MODE=SELF_HOSTED
          - ADATRACK_DB_URL=postgres://user:pass@db:5432/adatrack?sslmode=disable
          - JWT_SECRET=your-secure-secret
        depends_on:
          - db
      db:
        image: timescale/timescaledb:latest-pg16
        environment:
          - POSTGRES_PASSWORD=pass
        volumes:
          - pgdata:/var/lib/postgresql/data
    volumes:
      pgdata:
  2. Run the application:

    docker-compose up -d
  3. Access the Dashboard: Navigate to http://your-server-ip:8080 and log in with the default administrator credentials (check the logs for initial setup info).

System Tuning for High Performance

If you are expecting high volumes of UDP traffic (1,000+ packets/second), you must tune your Linux Kernel:

  • Increase UDP Receive Buffer (rmem):

  • Increase Network Backlog:

  • Persistent Configuration: Add these lines to /etc/sysctl.conf to ensure they persist across reboots.

Environment Variables

Variable
Description
Default

ADATRACK_RUN_MODE

Set to SELF_HOSTED to disable billing and quotas.

SAAS

ADATRACK_DB_URL

PostgreSQL connection string.

(Required)

JWT_SECRET

Secret key for signing authentication tokens.

(Required)

ADATRACK_PORT

HTTP port for the dashboard and API.

8080

ADATRACK_UDP_PORT

Port for UDP ingestion.

1234

ADATRACK_LOG_LEVEL

DEBUG, INFO, WARN, ERROR.

INFO


Still Need Help?

Check out our Troubleshooting Guide or join our Discord community.

Last updated