A self-hosted URL shortener written in PHP, letting you run your own short-link service with control over your data and stats.
luadotsh/lua
Self-hostable URL shortener built with Laravel, Vue 3 and Inertia.js, with click analytics, custom domains and custom slugs.
Open-source alternative to:Bitly
- Stars
- 343
- Forks
- 66
- Open issues
- 4
- Last commit
- last month
What is it?
lua.sh is an open-source URL shortener intended for individuals and teams who want to run their own link service. It is built on Laravel for the backend, MySQL for storage, and Vue 3 with Inertia.js and TailwindCSS for the front end.
Beyond creating short links, it tracks clicks along with referrers, devices and geolocation in a dashboard. Users can attach custom domains and custom slugs to make links branded, set expiration dates on links, and manage team access through authentication and permissions.
The project includes CSRF protection, rate limiting and HTTPS support. It also exposes an MCP server at /mcp authenticated via OAuth, so an AI assistant can connect to a workspace. Optional Google and GitHub sign-in are enabled by setting their credentials.
Key features
- 01Shortens long URLs through a web interface.
- 02Tracks clicks, referrers, devices and geolocation in a dashboard.
- 03Supports custom domains and custom URL slugs for branded links.
- 04Lets you set expiration dates on links.
- 05Provides authentication and permissions for team use.
- 06Includes an MCP server authenticated with OAuth.
Use cases
- Running a branded short-link service on your own domain.
- Tracking campaign link performance for a marketing team.
- Sharing managed links internally with access control for a team.
- Connecting an AI assistant to manage links in a workspace.
Quick start
- 1
Install PHP dependencies
composer install - 2
Install JavaScript dependencies
npm install - 3
Copy .env.example to .env, run key:generate and passport:keys, then migrate with seed
- 4
Start the dev server
npm run dev
Things to know
- Licensed under AGPL-3.0, a strong copyleft license that requires sharing modified source for network use.
- Self-hosting requires setting up Laravel, MySQL, Passport keys and a Node build step.
- Custom premium domains are offered only on the cloud service, not self-hosted installs.
In collections
Topics
FAQ
- What is lua?
- Self-hostable URL shortener built with Laravel, Vue 3 and Inertia.js, with click analytics, custom domains and custom slugs. lua.sh is an open-source URL shortener intended for individuals and teams who want to run their own link service. It is built on Laravel for the backend, MySQL for storage, and Vue 3 with Inertia.js and TailwindCSS for the front end.
- Is lua free to use? What license does it have?
- lua is open source under the AGPL-3.0 license. Check the license terms before using it in commercial products.
- Is lua still maintained?
- Updated within 6 months. The last commit to lua was on Sep 21, 2026.
- What can I use lua for?
- Running a branded short-link service on your own domain. Tracking campaign link performance for a marketing team. Sharing managed links internally with access control for a team. Connecting an AI assistant to manage links in a workspace.
- How do I install lua?
- Install PHP dependencies: composer install Install JavaScript dependencies: npm install Copy .env.example to .env, run key:generate and passport:keys, then migrate with seed Start the dev server: npm run dev
- Where can I get lua?
- The source code and installation instructions are on GitHub: https://github.com/luadotsh/lua
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Kutt is a self-hostable URL shortener with custom domains, link statistics, an admin panel and a RESTful API.
A self-hostable link shortener with analytics that runs entirely on Cloudflare Workers, D1, and KV, with no traditional server.
A self-hosted URL shortener written in PHP that serves short links under your own domain, with a CLI and REST API.
A self-hosted platform for creating, organizing and sharing human-readable short links like s/shortcut.
Open-source link attribution platform for short links, conversion tracking, and affiliate programs, built with Next.js and TypeScript.