Server

aditd opens the control port, the HTTP endpoint, the HTTPS endpoint, and the panel. The agent connects to this process.

Run it

aditd --token bir-belirtec

Flags

FlagEnvironmentDefaultMeaning
--controlADIT_CONTROL127.0.0.1:7000Address the agents connect to
--control-tlsADIT_CONTROL_TLSoffWraps the control connection in TLS. The agent writes tls://address:port. Token
--httpADIT_HTTP127.0.0.1:8080Public HTTP endpoint
--httpsADIT_HTTPS127.0.0.1:8443Off if off
--uiADIT_UI127.0.0.1:4590Panel and site
--ui-tlsADIT_UI_TLSoffServes the panel over https://. Turn it on if the panel is open outside the machine
--no-loopback-adminADIT_NO_LOOPBACK_ADMINoffA panel request from this machine asks for the token too. Turn it on behind a reverse proxy on the same machine
--no-signupADIT_NO_SIGNUPoffDisables public self-registration at POST /api/join; existing members and the operator can still sign in
--ui-password / --ui-password-fileADIT_UI_PASSWORD / ADIT_UI_PASSWORD_FILEemptySeparate panel login password (distinct from the agent --token)
--trusted-proxyADIT_TRUSTED_PROXYemptyAddress or CIDR of the reverse proxies in front of you (comma-separated). X-Forwarded-For is read only from these; limits and allow lists apply to the real visitor. Token
--workdiremptyWorking directory; relative paths are resolved against it. In a service the log is written here too. Windows service
--domainADIT_DOMAIN127.0.0.1.sslip.ioDomain name of the tunnels
--tokenADIT_TOKENrequiredIf it is empty, the server does not start
--token-fileADIT_TOKEN_FILEemptyReads the token from this file; it does not appear on the command line or in the environment. Not given together with --token
--previous-tokenADIT_PREVIOUS_TOKENemptyThe previous one if you changed the token. Names saved with the old one move to the new one. Not accepted for agent login. Token
--dataADIT_DATAadit-data.jsonReserved names. The inspector record (adit-inspect.db) and the generated certificate are written to this file's directory
--inspect-memoryADIT_INSPECT_MEMORYoffDoes not write the inspector record to disk; it is deleted on restart. Inspector
--mask-fieldADIT_MASK_FIELDSemptyExtra field and header names whose value is always hidden in the inspector (comma-separated). The name matches exactly; case and - _ . do not matter. Inspector
--mask-pathADIT_MASK_PATHSemptyRegular expression that finds the part of the path to hide; group 1, or the whole match if there is no group, becomes ***. Repeatable; in the environment, one expression per line. Inspector
--downloadsADIT_DOWNLOADSdistPackages to download
--tls-certADIT_TLS_CERTemptyCertificate PEM
--tls-keyADIT_TLS_KEYemptyPrivate key PEM
--acme-emailADIT_ACME_EMAILemptyLet's Encrypt account. If empty, ACME is off
--acme-cacheADIT_ACME_CACHEemptyCertificate cache
--acme-stagingoffLet's Encrypt staging directory
--tcp-bind127.0.0.1Address TCP tunnels listen on
--tcp-min19000Start of the port range. 0 means an ephemeral port. In that case --tcp-max is not used.
--tcp-max19040End of the port range
--public-urlADIT_PUBLIC_URLemptyExternal base URL behind a reverse proxy (e.g. https://tunl.example.com)
--public-controlADIT_PUBLIC_CONTROLemptyExternal control host:port advertised in /api/meta and panel commands
--sshADIT_SSHemptyClientless ssh -R gateway listen address (e.g. :2222; auto-generates adit-ssh-hostkey). SSH -R
--oidc-issuer / --oidc-client-id / --oidc-client-secretADIT_OIDC_ISSUER / ADIT_OIDC_CLIENT_ID / ADIT_OIDC_CLIENT_SECRETemptyEdge OAuth2/OIDC provider credentials for --oauth tunnels. Zero-trust
--max-domains-per-memberADIT_MAX_DOMAINS_PER_MEMBER5Maximum custom domains per member account
--max-pool-sizeADIT_MAX_POOL_SIZE16Maximum concurrent replicas in one --pool endpoint
--max-membersADIT_MAX_MEMBERS4096Maximum self-registered member accounts via POST /api/join
--alert-webhook / --alert-secretADIT_ALERT_WEBHOOK / ADIT_ALERT_SECRETemptyServer-wide Slack/Discord/HTTPS alert webhook and optional HMAC-SHA256 signing secret
--tor-socksADIT_TOR_SOCKS127.0.0.1:9050Tor SOCKS address for the onion gateway. off, 0, false, no, or kapali disables it. The server still starts if Tor is down. Onion gateway

Docker

The image uses the Linux package produced first by scripts/dist.ps1. It takes the amd64 or arm64 package that matches the platform.

docker build -t aditd .
docker run -d --name aditd -e ADIT_TOKEN=bir-belirtec -v adit-data:/data -p 7000:7000 -p 8080:8080 -p 8443:8443 -p 4590:4590 aditd

If you pass the token as a Docker secret: -e ADIT_TOKEN_FILE=/run/secrets/adit_token. If you will use the control port in the container from other machines, add -e ADIT_CONTROL_TLS=1 and connect the agent with tls://. The fingerprint of the self-signed certificate is in the docker logs aditd output. If you are behind a reverse proxy, pass the proxy's address as something like -e ADIT_TRUSTED_PROXY=172.17.0.1; if you do not, the limits count every visitor as one person.

Windows service

aditd can run as a service on Windows; it starts with the machine, and if it crashes it is restarted after 5 seconds and again after 30 seconds (it stops on the third crash in one day). As administrator:

aditd service install --name aditd -- --control 127.0.0.1:7000 --token-file C:\tunl\token.txt --data C:\tunl\adit-data.json
aditd service start --name aditd
aditd service stop --name aditd
aditd service uninstall --name aditd

Everything after -- is aditd flags and is written onto the service command line; every user can read that line, so pass the token with --token-file and write full paths. The service starts in its working directory (default: the folder of aditd.exe); relative paths such as --data are resolved against that, not against the system directory Windows starts the service from. Output goes to aditd-service.log in that folder; each time the service starts, if the file has passed 5 MB it is split off as .1. A flag typo is caught during install. If the service drops right after it starts (for example because the port is busy), start says so.

Which account it runs as

The default is LocalSystem: a hole in the server then gives away the whole machine. To install with a narrower account, pass --account:

--accountAccount
system (default)LocalSystem; privileged for everything
virtual (recommended)NT SERVICE\ plus the service name; private to the service, no password, no privilege anywhere
localserviceNT AUTHORITY\LocalService
networkserviceNT AUTHORITY\NetworkService
mkdir C:\ProgramData\aditd
copy token.txt C:\ProgramData\aditd\token.txt
aditd service install --name aditd --account virtual -- --token-file C:\ProgramData\aditd\token.txt
aditd service start --name aditd

Prometheus metrics

The panel listener exposes Prometheus text format (0.0.4) at GET /metrics with active tunnel gauges, HTTP request status classes, HTTP/TCP/SNI byte counters, replay counts, and Tor gateway counts.

curl -H "Authorization: Bearer $ADIT_TOKEN" http://127.0.0.1:4590/metrics

Access is restricted to loopback admin, an operator session, or Authorization: Bearer matching the server token or UI password. Member accounts receive 403 so global server counters remain private.

If there is no package

If the download list is empty, scripts/dist.ps1 is what produces it. The script does not install a file whose SHA256 does not match the list.