Hospiq
Self-hosting guide

Live on your own VPS in minutes

Hospiq is optimized for lean self-hosting. Run it with Docker for the fastest path, or deploy the Node.js server on a single-CPU VPS.

1 vCPU · 1 GB RAM

A single-CPU VPS from DigitalOcean, Hetzner, or Linode is enough for a small property.

Supabase project

PostgreSQL with Row Level Security, plus Supabase Realtime for live kitchen tickets.

Node.js 20+ (or Docker)

Run with docker compose for the fastest path, or Node.js behind Nginx with systemd.

  1. 00
    Fast path

    Docker Compose deployment

    The repository ships a production Dockerfile and docker-compose.yml for the app plus Redis. One command and you are running.

    git clone https://github.com/udai7/hotel_management.git
    cd hotel_management
    cp .env.example .env
    docker compose up --build
  2. 01
    Database

    Provision & migrate Postgres

    Initialize a PostgreSQL database on Supabase and run the SQL migrations in supabase/migrations/ in order.

    The core schema 20260227135007_initial_schema.sql creates tables, indexes, RLS policies, triggers, and helper functions such as accept_order_safe for race-free inventory.

  3. 02
    Seed data

    Seed and create a superadmin

    Run supabase/seed.sql to populate rooms and the starter menu, then seed_bookings.sql for 5,200 mock bookings to exercise the charts and archives. Signups default to the admin role — elevate one to superadmin:

    UPDATE public.users
    SET role = 'superadmin'
    WHERE email = 'you@email.com';
  4. 03
    Environment

    Configure environment variables

    Create .env.local in the app root with your Supabase, Redis, and Turnstile keys.

    NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
    SUPABASE_SERVICE_ROLE_KEY=your-service-key
    REDIS_URL=redis://127.0.0.1:6379
  5. 04
    Build & run

    Build the Next.js server

    Compile the optimized production bundle and start it on port 3000.

    npm install
    npm run build
    npm run start
  6. 05
    Production

    Daemonize with systemd, then Nginx + SSL

    Keep Next.js running on boot with a systemd unit, then expose it through Nginx on ports 80/443 secured with Let's Encrypt.

    sudo systemctl enable --now hotel
    sudo apt install nginx certbot python3-certbot-nginx -y
    sudo certbot --nginx -d hotel.yourdomain.com

That's the whole deployment

Star the repo, open an issue if you get stuck, and send a PR if you improve it.