Railway

Deploy tokenleader

Self-hosted token-usage leaderboard for Claude Code, Codex CLI, and Cursor

Deploy tokenleader

Just deployed

Deploy and Host tokenleader on Railway

tokenleader is a self-hosted token-usage leaderboard for AI coding tools — Claude Code, Codex CLI, and Cursor. A tiny daemon on each teammate's Mac reports token counts (never message content) to your server; the dashboard shows who's burning the most tokens, what it costs, and which models everyone uses.

About Hosting tokenleader

tokenleader is a single lightweight Bun + Hono server with an embedded SQLite database — no external database, queue, or cache to run. Deploying it means running one container with a persistent volume mounted at /data and a public HTTPS URL. This template handles all of it: it builds from the official Dockerfile, attaches the volume, exposes the dashboard, and health-checks /health. After deploying, open your URL, expand "Add a teammate," and each teammate runs one command on their Mac. Daemons authenticate with per-user secrets, auto-update through your server, and the database grows slowly — about 1 GB covers a team-year.

Common Use Cases

  • Team leaderboard for AI coding usage — see who's burning the most tokens across Claude Code, Codex CLI, and Cursor, and settle it in standup
  • Cost visibility for engineering managers — daily/monthly spend estimates per person, per model, and per company/team, with shareable filtered URLs
  • Usage analytics for AI-tooling budgets — an /api/v1 endpoint feeds bots and reports without touching the dashboard

Dependencies for tokenleader Hosting

  • A persistent volume mounted at /data (attached automatically by this template) — holds the SQLite database
  • GitHub access to the public tokenleader repo for daemon binary updates (a token is optional; only needed if anonymous rate limits bite)

Deployment Dependencies

Implementation Details

Teammates join with one command from your dashboard's "Add a teammate" box:

curl -fsSL https://YOUR-URL/install | bash -s -- --name=alice --company=acme.com

The daemon reads local session logs only, posts token counts and model names — never prompts or code — and self-updates through your server (sha256-verified, atomic swap). Leave TOKENLEADER_DASHBOARD_TOKEN empty for a public dashboard or set it to gate viewing; TOKENLEADER_ADMIN_TOKEN enables destructive admin actions and is never shared with teammates.

Why Deploy tokenleader on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying tokenleader on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
[Jun'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta