Open source

    Self-hosting guide

    ROUT is fully open source. Follow these steps to run your own instance — your domain, your database, your data.

    Prerequisites
    Node.js >= 18 or Bun v1.0+Supabase project (Postgres)Custom domain with DNS access
    1. 1. Clone the repository

      ROUT is licensed under AGPLv3. Grab the source and install dependencies with Bun (or npm).

      bash
      git clone https://github.com/routbe/rout
      cd rout-qr
      bun install
    2. 2. 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. 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).

      env
      VITE_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. 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.

      bash
      supabase link --project-ref <your-ref>
      supabase db push
    5. 5. Start the development server

      The app runs on http://localhost:8080 with hot reload.

      bash
      bun run dev
    6. 6. 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.

      bash
      bun run build
    7. 7. 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.