All guides

A small phone standing beside a sealed server box.

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
      
  1. Run the commands above in server/. python -m app.main listens on 0.0.0.0:8000. It prints http://localhost:8000 for 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.
  2. Confirm the process is up: GET /api/v1/health returns {"status":"ok","protocol_version":"2.0.0"}.
  3. For anything beyond local testing, set environment variables with the TRAX_ prefix. Change TRAX_OTP_HMAC_SECRET from the development default. Point TRAX_SQLITE_PATH at a file you will keep.
  4. Set TRAX_CONSOLE_MAILER to false and fill TRAX_SMTP_HOST, TRAX_SMTP_PORT, TRAX_SMTP_USERNAME, TRAX_SMTP_PASSWORD, TRAX_SMTP_FROM, and TRAX_SMTP_START_TLS so sign-in codes arrive by email. The console mailer is a development default.
  5. 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.
  6. Leave TRAX_UVICORN_ACCESS_LOG off 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.