Set up a server
Install the Python server, set TRAX_ environment variables, and serve a stable HTTPS origin.
The Tabtrax server is a FastAPI app with SQLite. It needs Python 3.12 or newer. Work in the server directory of the product repository.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m app.main
- Run the commands above in
server/.python -m app.mainlistens on0.0.0.0:8000. It printshttp://localhost:8000for a debug simulator, and each private LAN address for a debug build on the same network. A release build needs HTTPS in front of that process. - Confirm the process is up:
GET /api/v1/healthreturns{"status":"ok","protocol_version":"2.0.0"}. - For anything beyond local testing, set environment variables with the
TRAX_prefix. ChangeTRAX_OTP_HMAC_SECRETfrom the development default. PointTRAX_SQLITE_PATHat a file you will keep. - Set
TRAX_CONSOLE_MAILERtofalseand fillTRAX_SMTP_HOST,TRAX_SMTP_PORT,TRAX_SMTP_USERNAME,TRAX_SMTP_PASSWORD,TRAX_SMTP_FROM, andTRAX_SMTP_START_TLSso sign-in codes arrive by email. The console mailer is a development default. - Serve the API at a stable HTTPS origin with no path or trailing slash. The app talks to
{origin}/api/v1. Omit the default port. Put TLS in front of Uvicorn; this site does not ship a reverse-proxy config. - Leave
TRAX_UVICORN_ACCESS_LOGoff unless you are debugging. Do not log authorization headers, request bodies, session secrets, email contents, or which account wrote which tag.
The server never parses a packet. Each tag holds at most four blobs, and rows are not deleted. Next: connect the app, or read Get started with self-hosting.