Basic install guide for OpenTracker.
These are based on Ubuntu 22.04 and my specific needss
This guide is mainly written for my ever-forgetful brain.

Installing

  1. Install Ubuntu 22.04.

  2. Install dependencies:

    apt update
    apt install gcc g++ git zlib1g-dev
  3. Download and build libowfat:

    cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co libowfat
    cd libowfat
    make
    cd ..
  4. Download, build and install opentracker:

    git clone git://erdgeist.org/opentracker
    cd opentracker
    make
    • (Optionally) modify Makefile to restrict stats by commenting out FEATURES+=-DWANT_RESTRICT_STATS.

    • (Optionally) modify Makefile to take the X-Forwarded-For header by commenting out FEATURES+=-DWANT_IP_FROM_PROXY.

  5. Move to central location:

    cp opentracker /usr/local/bin
  6. Add config:

    mkdir /etc/opentracker
    touch /etc/opentracker/opentracker.conf
    • (optionally) restrict stats by adding blessed IPs (must have enabled -DWANT_RESTRICT_STATS):

      access.stats 192.168.1.0/24
    • (optionally) specify reverse proxy IPs (must have enabled -DWANT_IP_FROM_PROXY):

      access.proxy 192.168.3.122
  7. Create service:

    nano /etc/systemd/system/opentracker.service
    [Unit]
    Description=OpenTracker
    
    [Service]
    ExecStart=opentracker -f /etc/opentracker/opentracker.conf
    Restart=always
    RestartSec=1s
    
    [Install]
    WantedBy=default.target
    systemctl daemon-reload
    systemctl start opentracker.service
    systemctl enable opentracker.service
  8. Cleanup:

    cd ~/opentracker
    make clean

TODO

  • ❏ Write guide for updating