A powerful, self-hosted URL shortener with advanced analytics and privacy-first design
Transform long, unwieldy URLs into short, memorable links while maintaining complete control over your data. Perfect for businesses, marketers, and privacy-conscious users who need more than basic link shortening.
Unlike commercial URL shorteners, your data stays on your server. No third-party tracking, no data selling, complete privacy. Perfect for privacy-conscious teams and GDPR-compliant organizations.
Free yourself from expensive SaaS subscriptions:
- No monthly or annual fees
- No link/click limits or quotas
- One-time infrastructure investment
- Scale without increasing costs
- Predictable operational expenses
Ideal for businesses and marketers replacing expensive SaaS subscriptions.
Track every click with detailed insights:
- Real-time click tracking
- Geographic location data
- Device and browser analytics
- Referrer tracking
- UTM campaign monitoring
Fully customizable branding:
- Custom domain support
- Branded password pages
- Personalized logos and colors
- Your brand, your way
- Password-protected URLs
- Expiration dates for temporary links
- Rate limiting to prevent abuse
- Cloudflare Turnstile integration
- Role-based access control (ADMIN/USER)
- RESTful API with comprehensive documentation
- API key management for integrations
- Webhook event notifications (HMAC-SHA256 signed, manual retry)
- SSO / OIDC authentication (Google, GitHub, and custom providers)
- A/B testing (URL variants with traffic allocation)
- Link bundles for organizing URLs
- UTM templates and autocomplete for campaign tracking
- Bot detection and filtering
- Two-factor authentication (2FA)
- Bulk URL management
- QR code generation
- Multi-language support (English, Traditional Chinese, Portuguese)
- AI-Powered Features:
- Built-in AI Chat Assistant (Anthropic Claude, OpenAI GPT, Google Gemini, Mistral, Cohere)
- Model Context Protocol (MCP) server for external AI assistants
Built for developers who need full API access and zero vendor lock-in.
curl -O https://raw.githubusercontent.com/supra126/open-short-url/main/docker-compose.quickstart.yml
docker compose -f docker-compose.quickstart.yml up -dVisit http://localhost:4100 and login with admin@example.com / admin123. For testing only -- not for production.
bash <(curl -fsSL https://raw.githubusercontent.com/supra126/open-short-url/main/scripts/setup.sh)The interactive script asks for your domain and admin password, generates secrets, and starts all services automatically.
bash <(curl -fsSL https://raw.githubusercontent.com/supra126/open-short-url/main/scripts/fly-setup.sh)Deploys both backend and frontend to Fly with Postgres. Also supports deploying backend only (frontend on Vercel).
Each platform will automatically provision PostgreSQL, deploy backend and frontend services, and configure environment variables.
If you prefer hosting the frontend on Vercel, deploy the backend using any option above, then:
- Import the repo on Vercel
- Set Root Directory to
apps/frontend - Add environment variables:
NEXT_PUBLIC_API_URL= your backend URLNEXT_PUBLIC_SHORT_URL_DOMAIN= your backend URL
- Deploy
After deployment:
- π Change the default admin password immediately
β οΈ Configure custom domains in your platform's settings
Redis is completely optional. The system works perfectly without it β when REDIS_HOST is not set, caching, token blacklist, and rate limiting automatically fall back to in-memory alternatives. Consider adding Redis when traffic exceeds 50K clicks/day or you run multiple instances.
Built-in AI Chat β Manage URLs through natural language directly in the web UI. Supports Anthropic Claude, OpenAI GPT, Google Gemini, Mistral, and Cohere. Configure via environment variables in your frontend .env.local.
MCP Server β Connect external AI assistants (Claude Desktop, Cursor, Windsurf) to your instance via Model Context Protocol. Install with npm install -g @open-short-url/mcp. See MCP documentation for setup.
- Backend: NestJS, Prisma, PostgreSQL, Redis (optional)
- Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS, TanStack Query
- Security: JWT, bcrypt, Cloudflare Turnstile
- Analytics: Real-time click tracking with geographic data, bot detection
- Visualization: Recharts for data visualization
- AI Integration: Model Context Protocol (MCP) server for AI assistant compatibility
- Smart Routing (conditional redirects based on device, location, time)
- Docker containerization with multi-platform images
- Quick deploy (Vercel, Render, Railway, DigitalOcean, Fly, ...)
- Open Graph / Social Preview Customization
- Deep Linking (App Links / Universal Links)
- Retargeting Pixel Integration
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation
- π Issue Tracker