LinkForge – Smart Link Management Kit
Shorten, organize, and share every link — self-hosted.
A self-hosted link management platform — shorten URLs, organize them into collections, share publicly or with your team, and track click stats, all from a single React + Go app you run yourself.
Install
~60 secondsgit clone https://github.com/yashthakur1/LinkForge.git linkforge
cd linkforge
docker-compose up -dAlready wired, so you can skip to features.
Custom short links
Shorten URLs with your own custom slugs instead of random strings.
Collections & organization
Group related links into collections instead of one long flat list.
Public & team sharing
Share individual links or whole collections publicly, or keep them scoped to your team.
Click & usage stats
See how many times each link was opened, without wiring up a separate analytics tool.
Every dependency has a reason.
- React + TypeScriptFrontend UI built with Vite and styled with TailwindCSS.
- GoSingle compiled backend binary — serves the API and, in production, the built frontend too.
- SQLite / PostgreSQLSQLite for zero-config single-file storage, or Postgres for a managed multi-user deployment.
- Docker ComposeOne-command deployment that wires the backend, frontend, and database together.
Here's every env var, labeled.
Copy to .env.local. The included first-run script refuses to boot if any of them are missing — you'll know immediately.
LINKFORGE_MODE=prod
LINKFORGE_PORT=5231
LINKFORGE_DATA=./data
LINKFORGE_DRIVER=sqlite
LINKFORGE_DSN=./data/linkforge.dbZero to first deploy.
This is the exact sequence we'd run from a blank directory. Steps are reproducible — if one fails, we want to know.
1. Run it with Docker (recommended)
Clone the repo and bring up the bundled docker-compose.yml — it builds the frontend and backend together and persists data to a local volume.
docker-compose up -d2. Or run frontend and backend separately
No Docker? Install the frontend dependencies with pnpm and start the Vite dev server in one terminal, then run the Go backend in a second.
# Terminal 1 — frontend cd frontend/web && pnpm install && pnpm dev # Terminal 2 — backend go run ./bin/slash/main.go --mode dev --port 80823. Build for production
Build the frontend, copy the static output into the backend's route directory, then compile a single Go binary that serves both.
cd frontend/web && pnpm build cp -r dist ../../server/route/frontend/ go build -o ./build/linkforge ./bin/slash/main.go ./build/linkforge --mode prod
The stuff that ate our afternoons.
Things we'd have wanted a heads-up on. Logged as we hit them.
- !The dev frontend (Vite) and backend run on different ports — hitting the wrong one locally is the most common 'nothing loads' issue.
- !Production mode expects the frontend's built dist/ folder already copied into server/route/frontend/ — skip that step and the Go binary serves a 404 for the UI.
- !SQLite is the default driver; switch LINKFORGE_DRIVER to postgres and set LINKFORGE_DSN to a connection string for multi-user/production use.
If you just need a single quick redirect link, this is overkill — collections, sharing, and stats add real setup (frontend build + Go binary + a database) for something a free URL shortener does in one click. This kit is for teams who want to own their link data.
Got stuck, or want this shipped end-to-end for you? bitroot.club builds custom products for founders. →