Self-hosted link shortener that counts clicks, not people.
473
Self-hosted link shortener that counts clicks, not people. Custom slugs, privacy-friendly stats and an admin panel in one small binary.
+ to any short link (/abc+) to see where it goes before opening it.docker run -d --name tiiny -p 8080:8080 -v tiiny-data:/data \
-e TIINY_BASE_URL=https://link.example.com \
-e [email protected] \
viperadnan/tiiny
Open http://localhost:8080 and sign up with the admin email.
Warning
Whoever signs up first with a listed admin email becomes admin, verified or not. Create your account before opening the server to others.
ghcr.io/viperadnan-git/tiiny, for linux/amd64 and linux/arm64. latest follows main; releases add 2.1.0, 2.1 and 2.65532, so chown 65532:65532 the host directory.GET /healthz answers ok.Every setting is an environment variable, checked at startup. .env.example lists them all with defaults. A .env in the working directory is read too; real environment variables win.
TIINY_CLIENT_IP_HEADER to the header it sets (CF-Connecting-IP, X-Real-IP, X-Forwarded-For, …), or rate limits and country stats see the proxy. Only set it if the proxy overwrites that header.{TIINY_BASE_URL}/api/v1/auth/oauth/google/callback and …/github/callback.TIINY_REPORT_EMAIL_INTERVAL.410 until an admin releases it. Blocked links answer 451.TIINY_MAX_GUEST_LINKS_PER_IP_PER_DAY). Turn them off with TIINY_GUEST_LINKS_ENABLED=false.tiiny [serve] run the server (default)
tiiny reset-password <email> print a temporary password, sign out its sessions, unlink Google/GitHub
tiiny promote-admin <email> make an existing user an admin
In Docker: docker exec tiiny /tiiny promote-admin [email protected]. Accounts in TIINY_ADMIN_EMAILS are made admin again at every sign-in and restart.
web/src/routes/(marketing)/terms/+page.svelte before inviting people.Needs Rust and bun (npm works too).
cargo run # server on :8080; rebuilds the web app when it changed
cd web && bun run dev # hot reload; Vite proxies /api to :8080
cargo test # Rust tests
cd web && bun run check && bun run test # web types and tests
cargo run --release --example bench # the landing page's redirect figures
AGENTS.md covers the architecture and conventions.
MIT © 2026 Adnan Ahmad
Content type
Image
Digest
sha256:cc732f714…
Size
12.6 MB
Last updated
8 days ago
docker pull viperadnan/tiiny