Lynx is a self-hosted URL shortener with authentication, admin user management, and a clean web UI. It is designed to run as a lightweight single-container deployment while still providing practical controls like custom slugs, filtered/paginated link browsing, and role-based actions.
The project is production-usable and still evolving. Current work is focused on tightening admin workflows, improving UX polish, and keeping the deployment path simple for single-host setups.
- Authenticated dashboard
- First-user bootstrap as admin
- Admin user management (create, role toggle, delete safeguards)
- Custom slug support
- Reserved slug protection
- Link access metrics
- Filtered + paginated link API
- Admin-only link deletion
- Link analytics breakdown by date range and top destinations
- User-agent capture on link access (browser breakdown)
- Privacy policy page
- CSV export for filtered link data
- Optional webhook notifications for newly created links
- Clone the repository:
git clone https://github.com/NV-9/Lynx.git
cd Lynx- Start the app:
docker compose up -d- Open:
http://localhost:8080
- Clone and enter the project:
git clone https://github.com/NV-9/Lynx.git
cd Lynx- Install dependencies and run:
go mod download
go run .- Open:
http://localhost:8080
| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
HTTP port |
BASE_URL |
http://localhost:<PORT> |
Public base URL used when returning short links |
DATA_DIR |
/data |
Directory used for SQLite database storage |
| Method | Path | Notes |
|---|---|---|
POST |
/api/shorten |
Create short link (optional custom slug) |
GET |
/api/links |
Auth required, supports filter, page, size |
DELETE |
/api/links/{id} |
Admin only |
GET |
/api/users |
Admin only |
POST |
/api/users |
Admin only |
PATCH |
/api/users/{id}/admin |
Admin only |
DELETE |
/api/users/{id} |
Admin only |
Contributions are welcome.
- Report bugs or request features: Issues
- Submit fixes/improvements: Pull Requests
- Fork the repository.
- Create a feature branch from
main. - Add or update tests for behavior changes.
- Run checks before opening a PR:
go test ./...
go build ./...- Open a pull request with a clear summary and rationale.
This project is licensed under the MIT License.
See LICENSE for details.