v2.0 — Now Open Source

Your Links,
Your Server.

A developer-first, privacy-respecting URL manager for self-hosting. Modern web dashboard, powerful CLI, and automation-friendly API.

Terminal
$ trelay create https://example.com/very-long-url --slug my-link
Created: https://yourserver.com/my-link
$ trelay stats my-link
Slug: my-link
Clicks: 1,247 (+23 today)
Created: 7 days ago

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 createCreate short links with options
trelay listList and filter your links
trelay statsView click analytics
trelay qrGenerate QR codes
trelay folderOrganize with folders
trelay configConfigure CLI settings
View CLI Docs
trelay-cli
$ trelay create https://docs.example.com/api/v2 \
--slug docs --expires 30d --password
Password: ••••••••
Created link
URL: https://trl.sh/docs
Expires: 2026-03-07
Protected: Yes
$ trelay list --format json | jq '.[0]'
{
  "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.

FeatureTrelayBitlyYOURLSShlink
Self-hosted
Modern UIPartial
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