linq is a self-hosted platform that gives you full control over your short links, dynamic routing rules, and link-tree pages — all through a clean REST API and a static web UI. Run it on your own infrastructure with a single Docker container backed by PostgreSQL.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/org-quicko/linq/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Install linq and create your first short link in under five minutes.
Configuration
Every environment variable explained, with sensible defaults.
Docker Deployment
Eleven ready-made Compose stacks for every deployment shape.
API Reference
Full REST API for links, domains, rules, analytics, and more.
What linq does
linq combines three tools in one self-hosted package: URL shortener — Shorten any URL to a compact slug on your own domain. Slugs are random by default (six base-62 characters) or set to any custom value you choose. A short URL is permanent: archiving a link reserves its slug so it can never be hijacked by a later link. Dynamic links — Add conditional rules to any link. A rule pairs an alternate destination with one or more conditions (platform = android/ios/desktop, or query_param = key present/value match). The first matching rule wins; all others fall through to the default destination. This is how you send iOS users to the App Store and everyone else to the web.
Link trees — Create a hosted page that lists a curated set of links under a single short URL, in the style of social-media profile link pages. Each item on the tree is a link on the same domain.
Key design decisions
- No user accounts — the only principal is an API key. Keys carry a role (
viewer,editor,admin) and are shown once, stored hashed. Revoking a key never touches the links it created. - Privacy-first — client IP addresses are never stored in the database or written to logs. Visit records capture platform, referrer, and user agent, but not the visitor’s address.
- One required dependency — PostgreSQL. Redis and Caddy are optional. The redirect cache defaults to an in-process LRU so nothing else needs to be running.
- Static UI — the admin UI is a Next.js static export. It can be served by the linq process or deployed anywhere that serves static files. It connects to any linq instance at runtime — one UI manages many instances.
Architecture at a glance
Core Concepts
Understand links, slugs, domains, rules, and visits.
Authentication
Create and manage API keys, understand roles.
Dynamic Links
Route users by platform or query parameter.
Analytics
Per-link visit counts, timeseries, and breakdowns.