Self-host Tracky with Docker
step by step.
Run Tracky on your own machine or VPS with Docker Compose and a self-hosted Convex backend. Zero product telemetry, MIT source code, and an honest look at the one external service still required: WorkOS.
Docker self-hosting landed on the main branch of masushidotdev/tracky after v0.1.0. If you read our Tracky v0.1.0 release post, that post describes the older Node-based setup against Convex Cloud. On main, you can now run both the TanStack Start app and a self-hosted Convex backend in Docker Compose.
This guide walks through the full setup — local machine or public VPS — with exact commands from docs/self-hosting.md and no hand-waving about the trade-offs.
Before you start
WHY SELF-HOST
Your financial data stays on your own disk: by default Convex stores its SQLite database and uploaded blobs in the convex-data Docker volume (/convex/data). The codebase is MIT licensed so you can read, audit, and pin it; upstream Convex backend and dashboard images are pinned by digest in docker-compose.yml. The self-hosted build strips out product telemetry, and optional integrations — Enable Banking, AI Analyst, Resend, Telegram — stay off until you provide your own keys.
WHAT YOU NEED (INCLUDING WORKOS)
You need Docker 24+ with Docker Compose v2, Node.js 22 only to run the setup script (it has zero npm dependencies, so npm ci is not required), and a free WorkOS account (AuthKit).
Be clear about that last requirement: WorkOS is required and external. Tracky verifies WorkOS RS256 JWTs and uses WorkOS AuthKit for sign-in and session cookies. WorkOS remains an external SaaS (free developer tier available). That means self-hosting Tracky is not 100% offline or independent today.
Quick start
RUN THE SETUP SCRIPT AND START COMPOSE
Clone the repository, run the setup script, and bring up the stack:
git clone https://github.com/masushidotdev/tracky.git
cd tracky
node scripts/selfhost-setup.mjs
docker compose up -dYou can also run npm run selfhost:setup — it invokes node scripts/selfhost-setup.mjs directly. Once the containers are healthy, open http://localhost:3000.
The setup script prompts for your WorkOS Client ID (client_...) and API key (sk_..., with hidden terminal input), configures the redirect URI, app homepage URL, and CORS origin through the WorkOS API, generates missing random secrets (INSTANCE_SECRET, WORKOS_COOKIE_PASSWORD, and a placeholder WORKOS_WEBHOOK_SECRET for localhost/LAN), and writes .env atomically with mode 0600. Re-running it is idempotent and keeps existing secrets and custom variables intact.
Useful flags: pass --dry-run to preview the planned WorkOS API calls and .env changes without making network requests or writing files, or --yes for non-interactive mode using WORKOS_CLIENT_ID and WORKOS_API_KEY from the environment or an existing .env.
PREFER TO DO IT BY HAND?
Skip the script, copy the template, and generate the required secrets with openssl:
cp .env.selfhost.example .env
openssl rand -hex 32 # -> INSTANCE_SECRET
openssl rand -base64 32 # -> WORKOS_COOKIE_PASSWORD (min 32 chars)
echo "whsec_$(openssl rand -hex 16)" # -> local/LAN WORKOS_WEBHOOK_SECRET placeholder (requires backfill; see below)Edit .env with your WORKOS_CLIENT_ID, WORKOS_API_KEY, and the generated secrets. In dashboard.workos.com, add http://localhost:3000/callback under Redirects. Then run docker compose up -d.
First sign-up & optional tools
FIRST SIGN-UP ON LOCAL OR LAN INSTALLS
Tracky only creates a user profile and opens the app once the user record exists in Convex's AuthKit table — a valid WorkOS JWT alone leaves sign-in retrying. On localhost or a private LAN, WorkOS cannot reach your host with webhooks. After each new user signs up, run:
docker compose --profile tools run --rm convex-backfillThis runs auth:backfillUsers, importing users from the WorkOS API into Convex. Internet-facing installs should use the WorkOS webhook instead: point it to https://<your-convex-site>/workos/webhook subscribed to user.created, user.updated, and user.deleted, and paste its signing secret into WORKOS_WEBHOOK_SECRET. Without the webhook, user.updated and user.deleted events do not sync automatically.
OPTIONAL CONVEX DASHBOARD & INTEGRATIONS
To inspect tables and logs in the optional Convex web dashboard at http://localhost:6791:
docker compose --profile dashboard up -dRetrieve the admin key to sign in:
docker compose exec backend ./generate_admin_key.shNever expose port 6791 publicly. Optional integrations stay disabled until you set their variables in .env: Enable Banking (ENABLE_BANKING_*), AI Analyst (VITE_ANALYST_ENABLED=true plus AI_GATEWAY_API_KEY or OPENROUTER_API_KEY, requiring an app rebuild), Resend (RESEND_API_KEY, RESEND_FROM_EMAIL, RESEND_WEBHOOK_SECRET), and Telegram (TELEGRAM_BOT_TOKEN, TELEGRAM_WEBHOOK_SECRET, TELEGRAM_WEBHOOK_URL).
Going public, upgrading & backups
REVERSE PROXY WITH TLS
Put Caddy, Nginx, or Traefik in front to terminate TLS and forward three hostnames: your app domain to 127.0.0.1:3000, your Convex API domain to 127.0.0.1:3210 (must proxy WebSockets and Upgrade headers), and your Convex site domain to 127.0.0.1:3211 (for incoming webhooks).
Re-run the setup script with your public URLs — it keeps existing secrets, sets DO_NOT_REQUIRE_SSL=false, updates WorkOS redirects/CORS/homepage, and registers the WorkOS webhook:
node scripts/selfhost-setup.mjs \
--public-url https://tracky.example.com \
--convex-url https://convex.example.com \
--convex-site-url https://convex-site.example.comThen rebuild and restart so the new build-time VITE_CONVEX_URL is baked into the client bundle:
docker compose up -d --buildUPGRADING
Back up the volume first, then pull and rebuild:
git pull
docker compose up -d --buildThe one-shot convex-deploy service runs automatically before app restarts, pushing any updated Convex schema and functions and re-syncing allowlisted environment variables.
BACKUP AND RESTORE
Both commands below need jq installed to resolve the Compose project volume name. Stop app and backend briefly so SQLite flushes cleanly before archiving convex-data:
docker compose stop app backend
docker run --rm \
-v "$(docker compose config --format json | jq -r '.name')_convex-data:/data:ro" \
-v "$PWD:/backup" \
debian:bookworm-slim \
tar czf "/backup/tracky-convex-$(date +%Y%m%d-%H%M%S).tar.gz" -C /data .
docker compose start backend appTo restore from an archive:
docker compose stop app backend
docker run --rm \
-v "$(docker compose config --format json | jq -r '.name')_convex-data:/data" \
-v "$PWD:/backup:ro" \
debian:bookworm-slim \
sh -c 'rm -rf /data/* && tar xzf /backup/tracky-convex-YYYYMMDD-HHMMSS.tar.gz -C /data'
docker compose up -dKeep a secure copy of .env alongside your backups — especially INSTANCE_SECRET, INSTANCE_NAME, and WORKOS_COOKIE_PASSWORD.
Privacy & honest limits
ZERO PRODUCT TELEMETRY
The self-hosted build turns off every product and runtime telemetry hook we control. PostHog analytics is hard-disabled at build time (CLOUDFLARE_ENV=selfhost, VITE_POSTHOG_ENABLED=false, with no capture key or host embedded in the build). The Convex backend beacon is disabled (DISABLE_BEACON=true). Wrangler telemetry, error reports, banner update checks, local explorer UI, and Miniflare's startup workers.cloudflare.com/cf.json fetch are disabled as well.
Be precise about what stays external: WorkOS still sees your sign-ins because it is the authentication provider.
LIMITS, HONESTLY
This setup is designed for single-node personal or household self-hosting, not multi-replica horizontal scaling. Tracky compiles as a Cloudflare Worker — there is no Node HTTP server target. The app container runs the built Worker locally on workerd via Wrangler's local runtime behind a built-in Node edge proxy on port 3000 that blocks /cdn-cgi/* local tooling endpoints.
By default, Convex runs single-node SQLite plus local file storage inside convex-data (upstream Convex also accepts optional POSTGRES_URL, MYSQL_URL, and S3 bucket variables listed in .env.selfhost.example).
Questions, answered.
Do I need WorkOS?
Yes. Tracky verifies WorkOS RS256 JWTs and uses WorkOS AuthKit for sign-in and session cookies. WorkOS remains an external SaaS (a free developer tier is available), which means self-hosting Tracky is not 100% offline or independent today.
Is there telemetry in the self-hosted build?
No product telemetry. PostHog analytics is hard-disabled at build time (CLOUDFLARE_ENV=selfhost, VITE_POSTHOG_ENABLED=false), the Convex backend beacon is disabled (DISABLE_BEACON=true), and Wrangler telemetry, error reports, banner update checks, local explorer UI, and Miniflare startup fetches are disabled. WorkOS still sees your sign-ins because it is the authentication provider.
Where is my data stored and how do I back it up?
By default, Convex stores its SQLite database and uploaded blobs in the convex-data named Docker volume (/convex/data). Stop app and backend briefly, archive the volume with tar using a debian:bookworm-slim container, and start them again. Keep a secure copy of .env — especially INSTANCE_SECRET, INSTANCE_NAME, and WORKOS_COOKIE_PASSWORD — alongside your backups.
Can I run it on a VPS?
Yes. Put a TLS-terminating reverse proxy (Caddy, Nginx, or Traefik) in front of ports 3000, 3210 (with WebSocket Upgrade headers), and 3211, run the setup script with --public-url, --convex-url, and --convex-site-url, and rebuild with docker compose up -d --build. It is built for single-node personal or household self-hosting, not multi-replica horizontal scaling.