Open source
Self-hosting guide
ROUT is fully open source. Follow these steps to run your own instance — your domain, your database, your data.
1. Clone the repository
ROUT is licensed under AGPLv3. Grab the source and install dependencies with Bun (or npm).
bashgit clone https://github.com/routbe/rout cd rout-qr bun install2. Create a database project
ROUT stores tracked QR codes and scan events in Postgres. Create a Supabase-compatible project and note the project URL, publishable key and service-role key.
3. Configure environment variables
Create a .env file with the public client keys, then add the server-side secrets in your hosting provider (never commit them).
envVITE_SUPABASE_URL=https://<your-project>.supabase.co VITE_SUPABASE_PUBLISHABLE_KEY=<publishable-key> # server-only SUPABASE_URL=https://<your-project>.supabase.co SUPABASE_SERVICE_ROLE_KEY=<service-role-key>4. Run the database migrations
Apply the SQL migrations in supabase/migrations to create the tracked_qrs and qr_scans tables, their row-level-security policies and grants. Also create a private storage bucket named qr-files for uploaded images, PDFs and audio.
bashsupabase link --project-ref <your-ref> supabase db push5. Start the development server
The app runs on http://localhost:8080 with hot reload.
bashbun run dev6. Deploy
Build the production bundle and deploy to any edge-compatible host (Cloudflare Workers, Vercel, Netlify). Set the same server-side environment variables in your host and point your custom domain at it — short links use your own domain, so scans never touch third-party infrastructure.
bashbun run build7. Keep your fork compliant
AGPLv3 requires that you publish the source of any modified version you make available over a network. Keep the ROUT attribution and license notice intact, and link back to your own source repository.