Overview
Trelay is a developer-first, privacy-respecting URL manager for self-hosting. Run it on your own server and keep full control of your links, analytics, and data.
What is Trelay?
Trelay shortens URLs, tracks clicks (with optional IP anonymization), organizes links in folders, and supports one-time links, password protection, and expiration. It provides a modern web dashboard, a cross-platform CLI, and a REST API so you can manage links from the terminal, scripts, or other apps.
Features
- URL shortening — Custom slugs, expiration, and password protection
- One-time links — Links that self-destruct after first access
- Folder management — Organize links into folders
- Custom domain — Use
BASE_URLso short links use your domain - Click analytics — Total clicks, daily stats, top referrers; export to CSV or JSON
- Open Graph preview — Fetch title, description, and image for any URL
- QR codes — Generate QR codes with download and clipboard support
- Trash & restore — Soft-delete links and restore them later
- Cross-platform CLI — Create, list, stats, QR, folders; shell completion
- REST API — JWT and API key auth; OpenAPI spec included
- Security — Rate limiting, secure headers, no telemetry
- Single container — Docker Compose; SQLite by default
Quick start
Get Trelay running in a few steps:
git clone https://github.com/trelay-dev/trelay.git
cd trelay
cp env.example .env
# Edit .env: set API_KEY and JWT_SECRET
docker compose up -d Open the dashboard at http://localhost:8080. Next, see Installation for detailed setup and Configuration for environment options.
Documentation index
- Installation — Docker and manual setup (server, frontend, CLI)
- Configuration — Environment variables and defaults
- CLI Reference — Commands, flags, and shell completion
- API Reference — Endpoints, auth, and request/response formats
- Import & Export — CSV/JSON import and export