À propos
Self-hosted link shortener that counts clicks, not people. Custom slugs, privacy-friendly stats and an admin panel in one small binary.
Sécurité et confidentialitéWhat you can do
- Short links your way: pick a slug or get a random one. Links start temporary (302) and editable; make one permanent (301) when it's final.
- Stats without tracking: clicks per day, referrer, country, device, browser and OS, kept as daily totals. No IPs, raw user agents or per-visit records.
- Link preview: add + to any short link (/abc+) to see where it goes before opening it.
- Guest links: shorten without an account; the links move into the account on sign-up.
Progression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Originaltiiny
Self-hosted link shortener that counts clicks, not people. Custom slugs, privacy-friendly stats and an admin panel in one small binary.
Features
- Short links your way: pick a slug or get a random one. Links start temporary (302) and editable; make one permanent (301) when it's final.
- Stats without tracking: clicks per day, referrer, country, device, browser and OS, kept as daily totals. No IPs, raw user agents or per-visit records.
- Link preview: add
+to any short link (/abc+) to see where it goes before opening it. - Guest links: shorten without an account; the links move into the account on sign-up.
- Sign-in: password, Google and GitHub; email verification and password reset with SMTP.
- Abuse handling: a public report form and an admin queue to block, delete or disable the owner, with undo.
- Small: one container, about 9 MB of memory at idle. Data lives in a libSQL file or an embedded replica of a Turso database.
Quick start
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.
- Image: also
ghcr.io/viperadnan-git/tiiny, forlinux/amd64andlinux/arm64.latestfollowsmain; releases add2.1.0,2.1and2. - Bind mounts: the container runs as uid
65532, sochown 65532:65532the host directory. - Health check:
GET /healthzanswersok.
Configuration
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.
- Client IP: behind a proxy, set
TIINY_CLIENT_IP_HEADERto 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. - OAuth callbacks:
{TIINY_BASE_URL}/api/v1/auth/oauth/google/callbackand…/github/callback. - Email: optional. With SMTP, accounts verify their email before choosing slugs, and admins get a summary of new reports every
TIINY_REPORT_EMAIL_INTERVAL.
How links behave
- Temporary (302): destination and slug can change; every click is counted. Every link starts here.
- Permanent (301): can't be edited or made temporary. Browsers cache it for a day, so repeat clicks from one browser that day aren't counted.
- Deleted permanent or blocked links retire their slug: it answers
410until an admin releases it. Blocked links answer451. - Guest links get a random 7-character slug and a per-IP limit (
TIINY_MAX_GUEST_LINKS_PER_IP_PER_DAY). Turn them off withTIINY_GUEST_LINKS_ENABLED=false.
Admin and CLI
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.
Limits
- One instance per database: the redirect cache, rate limits and click buffer live in memory.
- Terms of service are a placeholder: edit
web/src/routes/(marketing)/terms/+page.sveltebefore inviting people.
Development
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.
Licence
MIT © 2026 Adnan Ahmad
Explorer des projets similaires
Chargement…