Kutt.it is a self-hosted URL shortener designed for developers and organizations seeking full control over their link management. Unlike third-party services, Kutt allows you to host your own shortened links with full visibility into analytics, user management, and custom domain support. Built with Node.js and designed for easy deployment via Docker or direct installation, Kutt eliminates dependency on external services while offering enterprise-grade features like OIDC authentication, rate limiting, and customizable themes. It’s ideal for teams that need branded short links without relying on SaaS platforms.
The app prioritizes simplicity and flexibility: it supports SQLite out of the box but scales to PostgreSQL or MySQL with Redis caching. With no build step required and comprehensive environment-based configuration, Kutt is optimized for production environments behind proxies like NGINX or Cloudflare. Its open-source nature and active community make it a reliable alternative to Bitly or TinyURL for those who value data ownership and customization.
What You Get
- Custom domain support - Create branded short links using your own domains (e.g., link.yourcompany.com) with optional HTTPS support, requiring manual SSL certificate management.
- Self-hosted with zero configuration - Deploy Kutt with no build steps; uses SQLite by default and requires only Node.js 20+ to run, with optional PostgreSQL/MySQL and Redis for scaling.
- Admin dashboard and user management - Full control over users, links, and statistics via a web-based admin panel with options to disable anonymous link creation or user registration.
- RESTful API - Programmatically create, read, update, and delete links with documented endpoints available at https://docs.kutt.it for integration into other systems.
- OpenID Connect (OIDC) login - Integrate with identity providers like Auth0, Keycloak, or Azure AD for secure SSO authentication without email/password logins.
- Custom themes and HTML templates - Override UI elements (CSS, images, views) via the /custom folder to fully rebrand the interface for corporate or personal use.
- Private link statistics - View real-time click data, referrers, and geographic stats for each shortened URL without third-party tracking.
- Rate limiting and proxy support - Enable rate limiting via Redis or in-memory storage, with TRUST_PROXY to safely extract client IPs from reverse proxies.
Common Use Cases
- Building a branded internal link shortener for marketing teams - Marketing departments use Kutt to create trackable, company-branded links (e.g., go.yourcompany.com/campaign) with custom domains and analytics, avoiding third-party URL services.
- Creating a secure, private link service for remote teams - DevOps teams deploy Kutt behind a corporate firewall to ensure all shortened links are hosted internally, preventing data leakage and ensuring compliance.
- Problem: Avoiding vendor lock-in with URL shorteners → Solution: Self-host Kutt - Organizations tired of Bitly’s pricing or downtime migrate to Kutt, gaining full control over link data, expiration policies, and user access without recurring fees.
- Team workflow: Developers managing SaaS product links - Product teams use Kutt’s API to auto-generate short links for release notes, beta signups, and documentation, with custom URLs and expiration dates to control link lifecycle.
Under The Hood
The project is a URL shortening service built with JavaScript and Express, designed for extensibility and multi-database support. It emphasizes modular development and flexible deployment through containerization and database abstraction.
Architecture
It adopts a monolithic structure with clear separation of concerns across layers such as routes, models, and handlers. This design promotes organized code flow and supports scalable development.
- Modular organization with distinct responsibilities for each component
- Layered architecture that separates business logic from presentation and data access
- Support for flexible database backends via abstraction layers
Tech Stack
It leverages JavaScript and the Express framework as its core foundation, integrating a range of Node.js libraries to handle various backend functionalities.
- Built on JavaScript with Express for scalable web application development
- Uses Knex, Bull, Nodemailer, and Passport to manage database, queues, email, and auth
- Employs Docker for containerization and Knex for cross-database schema support
- Integrates dotenv and envalid for configuration management and validation
Code Quality
While the codebase maintains a basic level of structure and some consistency, it lacks comprehensive automated testing and faces challenges in error handling and code uniformity.
- Limited test coverage with no dedicated test files or frameworks
- Error handling is implemented through try/catch and custom errors but lacks centralization
- Code follows some naming and structural conventions, though inconsistencies remain
- Presence of numerous error handling constructs indicates potential technical debt
What Makes It Unique
This project stands out through its modular database support and adaptable deployment configurations, offering flexibility in both infrastructure and UI customization.
- Modular abstraction enables seamless switching between MariaDB, PostgreSQL, and SQLite with Redis caching
- Custom error handling and validation provide clean API responses and user feedback mechanisms
- Rich admin UI powered by Handlebars templates with partials for easy customization
- Multiple Docker setups support SQLite/Redis, MariaDB, and PostgreSQL without code changes