What is Shlink?
Shlink is a self-hosted URL shortener with the features the paid services gate: short links on your own domain, a full REST API, QR codes, rich visit analytics (with optional GeoIP), tags, and device-based redirect rules. The server handles the redirects and exposes the API on port 5000.
A managed Postgres holds every link and visit, so the app is stateless. Shlink ships no UI of its own - you drive it with the REST API, the CLI, or the Shlink Web Client (the official hosted client at app.shlink.io talks to your server from your browser, or self-host the client image).
The value is in the metering: hosted shorteners cap links and clicks aggressively and charge to lift the caps. Shlink is one stack with unlimited links, your own branded domain, and the analytics sitting in a database you own.
What you get
- Short links on your own custom domain
- Full REST API plus a CLI for automation
- QR codes, tags, and device/geo redirect rules
- Visit analytics with optional MaxMind GeoIP
- All link and visit data in managed Postgres - stateless app
- MIT licensed, unlimited links, no per-click billing
How it runs on Lyngbak
| Service | Role | Public |
|---|---|---|
shlink | redirects + REST API (:5000) | yes |
db | managed Postgres (links + visits) | no |
Before you deploy
DEFAULT_DOMAINthe short domain (the app’s https domain)
INITIAL_API_KEYyour first API key, created on startup
Sizing and billing
The RoadRunner-based server is happy in 512 MiB. Postgres holds links and visit rows, so size disk to your click volume and retention.
A resource is a flat monthly price, with RAM and disk add-ons when the stack needs a little more than a tier, and room for your own apps on a larger one. On Usage Billing each service takes the smallest size that fits it and is billed by the second it runs, so a stopped stack stops costing CPU and RAM. Its 5 GiB of volumes cost $0.15 per GiB a month ($0.75/mo) for as long as they exist. One workspace can use both. See pricing
Compared with the managed service
| Service | Plan | Price | Includes |
|---|---|---|---|
| Dub | Business | $75/mo | $75/mo |
| Bitly | Core | $10/mo | $10/mo for just 100 branded links |
| Short.io | Hobby | $5/mo | $5/mo; paid tiers scale with clicks |
Shorteners cap links and clicks aggressively; Shlink is unlimited on your own domain. Prices from each vendor's pricing page, June 2026.
Run it locally first
The same compose file runs with plain Docker Compose. Clone the template source, copy .env.example to .env, and run docker compose up -d.
Questions
What does this save vs Bitly or Short.io?
Bitly’s Core plan allows just 100 branded links a month, and Short.io and Dub meter the same way. Shlink is one stack with unlimited links, your own domain, and the analytics on your own infrastructure.
There is no admin UI in the container - how do I manage it?
Shlink is API-first. Use the REST API, the shlink-cli, or the Shlink Web Client - point the official hosted client at app.shlink.io (it runs in your browser against your server) or self-host the shlinkio/shlink-web-client image.
Do I get geographic visit stats?
Yes, if you set a free MaxMind GeoLite2 license key. Shlink then resolves visits to country and city and exposes the breakdown through the API and web client.