Your Links,
Your Server.
A developer-first, privacy-respecting URL manager for self-hosting. Modern web dashboard, powerful CLI, and automation-friendly API.
Everything you need,
nothing you don't
Built for developers who want control over their links without the bloat of enterprise solutions.
Link Management
Custom slugs, expiration, password protection, one-time links that self-destruct after first use, and folder organization.
Privacy-First Analytics
Click analytics with IP anonymization by default. Export to CSV or JSON. Optional custom domain via BASE_URL.
Cross-Platform CLI
Create, list, get, delete, stats, and QR from the terminal. Shell completion and table/JSON/CSV output.
REST API
Full API with JWT and API key auth. Links, folders, stats, preview, restore from trash. OpenAPI spec included.
Single Container
Deploy with Docker Compose. SQLite by default, single binary + frontend. No external dependencies.
Security Built-in
Rate limiting, secure headers, JWT/API key auth, input validation. No telemetry, no tracking.
Command-line
first design
Manage everything from your terminal. Pipe support, multiple output formats (table, JSON, CSV), and shell completions.
trelay create | Create short links with options |
trelay list | List and filter your links |
trelay stats | View click analytics |
trelay qr | Generate QR codes |
trelay folder | Organize with folders |
trelay config | Configure CLI settings |
{ "slug": "docs", "url": "https://docs.example.com/api/v2", "clicks": 0, "created": "2026-02-05T14:30:00Z" }
How Trelay stacks up
See how we compare to other URL shorteners. Spoiler: we're the only one that gives you everything.
| Feature | Trelay | Bitly | YOURLS | Shlink |
|---|---|---|---|---|
| Self-hosted | ||||
| Modern UI | Partial | |||
| CLI Tool | ||||
| Privacy-first | ||||
| Single container | — | |||
| One-time links | ||||
| Free forever | ||||
| Open source |
Ready to take control of your links?
Clone, set your .env (API_KEY, JWT_SECRET), and run. Self-hosted, open source, MIT licensed.
git clone https://github.com/trelay-dev/trelay.git cd trelay cp env.example .env docker compose up -d