YOURLS, for 2026.
The proven self-hosted link shortener, with the modern dashboard it never had. Free and open source, no SaaS bill, and your links and data stay on your own server.
- Self-hosted, no lock-in. Runs on ordinary PHP/MySQL shared hosting — your links, your database, your server.
- Built on YOURLS. Stock redirect engine, database and click tracking underneath — a modern dashboard on top.
- Everything included. Password protection, expiration, UTM tags, QR codes and analytics — no upsell tier.
Features
What a hosted shortener charges for, included.
Leanks wraps YOURLS' redirect engine with the features a paid link-management product sells as premium tiers — running on hosting you already pay for.
One-line link creation
Destination, short link and title in a single row. Password, expiration, tags and UTM are one click away.
Password-protected links
Require a password before a short link redirects anywhere.
Link expiration
By date, by a maximum click count, or both at once.
UTM campaign builder
A built-in UTM form with a live preview of the final URL.
Tags
Tags in 8 colors you can assign to links, show as a column, and filter by.
A list that scales
One Display menu for tag filters, rows or cards, ordering, page size and columns. Plus search, bulk delete and favicons.
QR codes
Generated client-side for any link, downloadable as PNG.
Analytics dashboard
Clicks across 9 time ranges, filtered by country, device, browser, referrer and more — with flags and icons.
Default domain redirect
Send visitors who open your bare short domain to any URL you choose, instead of a blank page.
CSV import & export
Migrate in from another shortener, or move between Leanks installs. Clicks, dates and tags travel too.
Light, dark, your color
Light, dark or system theme, plus any accent color. Shades follow automatically.
One-click updates
Checksum-verified, with an automatic backup and rollback if anything goes wrong.
How it works
YOURLS underneath, a SaaS dashboard on top.
Untouched
YOURLS core
Redirect logic, MySQL schema, click tracking, plugin API — includes/, stock.
Added
Leanks plugin
Hooks redirect_shorturl; checks password / expiry metadata before a click is logged.
Custom
Leanks dashboard
A separate front end in app/, talking to YOURLS' own admin-ajax.php.
YOURLS is plain PHP, MIT licensed, has no build step, and stores everything in a couple of MySQL tables — a good fit for cheap shared/cPanel hosting. Leanks keeps that core completely stock and adds a small plugin (user/plugins/leanks) plus an entirely custom front end (app/) on top, rather than patching YOURLS' own files. YOURLS itself stays upgradeable in place.
Password protection, expiration and click limits are enforced by hooking YOURLS' redirect_shorturl action: before a click is logged and redirected, Leanks checks a small metadata table and can intercept the request with a password prompt or an "expired" page. Everything else — the redirect itself, click counting, referrer/geo logging — is stock YOURLS.
The dashboard talks to YOURLS' existing admin-ajax.php for link create/edit/delete, reusing its built-in nonce-based CSRF protection and session auth, plus a handful of custom leanks_* actions the plugin registers for listing, stats, and CSV import.
Installation
Running in about five minutes.
-
Create a database and database user
On shared/cPanel hosting the setup wizard connects to an existing database — it usually can't create one itself. In cPanel: MySQL® Databases → create a database → create a user → Add User to Database with all privileges.
-
Upload the repository to your web root
Keep the folder structure intact, e.g. into
public_html. -
Run the setup wizard
Visit
https://your-domain.com/setup/and enter the database details and an admin username/password. This writesuser/config.php, creates the tables, and activates the Leanks plugin automatically. -
Remove the setup folder
Delete (or password-protect)
/setuponce installed — it can rewrite your database credentials and shouldn't stay reachable. -
Log in
Go to
https://your-domain.com/app/with the admin account created in step 3.
user/config-sample.php to user/config.php, fill in your settings, then visit /admin/install.php (YOURLS' own installer) followed by /admin/plugins.php to activate the "Leanks" plugin.
FAQ
Common questions.
Is Leanks really free?
Yes. Leanks is open source under the MIT license, with no paid tier and no feature gates. You only pay for the PHP/MySQL hosting you run it on, which can be an ordinary shared host.
How is Leanks different from YOURLS?
Leanks is YOURLS underneath: the redirect engine, database schema, click tracking and plugin API stay stock. On top it adds a modern dashboard plus password-protected links, expiration, a UTM builder, tags, QR codes, analytics, CSV import and export, and one-click updates.
What hosting do I need?
PHP 8.1+, MySQL 5.7+ or MariaDB with the pdo_mysql extension, and Apache with mod_rewrite. Typical shared and cPanel hosting works. There is no Node build step and no Docker.
Where is my data stored?
In the MySQL database on your own server. Leanks is software you install, not a hosted service, so there is no account with us and nothing to sign up for.
Can I move my links in and out?
Yes. CSV import detects columns automatically and reports duplicates and errors per row. CSV export uses the same column names, so a file re-imports cleanly into another install. Clicks, creation dates and tags travel with it; passwords, expirations and UTM fields don't.
How do updates work?
The dashboard notices new releases on GitHub and applies them in place after verifying a checksum and taking an automatic backup. If anything fails partway, it rolls back from that backup.