Railway

Deploy Kutt | Open Source Bitly Alternative for URL Shortening

Self-hosted URL shortener with custom domains and click stats

Deploy Kutt | Open Source Bitly Alternative for URL Shortening

Just deployed

/var/lib/kutt

Deploy and Host Kutt on Railway

Kutt is a modern URL shortener: custom domains, custom slugs, expiring links, password-protected links, per-link click statistics and an API — self-hosted, with the click data staying in your database instead of someone else's analytics product.

About Hosting Kutt

A single service with SQLite on a persistent volume. Kutt supports Postgres and MySQL for larger installations, but a link shortener's write volume is small and its read path is a primary-key lookup, so a second billed database service buys very little here. The volume is what makes it durable.

The public domain is set as the default link domain automatically, so the links Kutt generates work the moment the deployment is green.

Common Use Cases

  • Branded short links: Attach your own domain and hand out links on it instead of a third-party shortener's.
  • Campaign tracking you own: Per-link click counts, referrers, countries and browsers, in your database, with no external analytics involved.
  • Link management inside an app: The REST API creates and updates links programmatically, which makes Kutt usable as a service rather than only a UI.

Dependencies for Kutt Hosting

Deployment Dependencies

  • Kutt — the application
  • SQLite on a Railway volume for links, users and click statistics
  • Optionally a custom domain, and an SMTP provider if you want email verification

Implementation Details

DB_FILENAME points SQLite at /var/lib/kutt/data.sqlite, which is on the volume. That single path is the whole database: links, accounts and every recorded click.

DEFAULT_DOMAIN is filled from the Railway public domain, so generated links are correct out of the box. Attaching a custom domain means updating this variable as well — Kutt builds link URLs from it, not from the request.

JWT_SECRET is generated per deployment and signs session tokens. Changing it logs everyone out.

Registration and email verification are off unless you configure SMTP. That is the safe default for a public deployment — without it, the admin account you create is the only account. Set the MAIL_* variables to open registration up.

To move to Postgres later, set DB_CLIENT and the connection variables; Kutt runs its own migrations on boot, but existing SQLite data does not migrate itself.

Why Deploy Kutt on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Kutt on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

Resources: one small Node service — well under 200 MB at idle, on the order of $5 a month. The volume grows with click history rather than with link count.


Template Content

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
38
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51