This guide gets OpenHosting running on your machine for development. For a
production server, use the one-line installer
(curl -fsSL https://raw.githubusercontent.com/solomon2773/openhosting/main/install.sh | bash)
or see Docker / Kubernetes.
- Node.js 24+ and npm
- PostgreSQL 14+ (18 recommended) — or a Supabase project
- git
# 1. Clone
git clone https://github.com/solomon2773/openhosting.git
cd openhosting
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# edit .env and point DATABASE_URL / DIRECT_URL at your PostgresStart a throwaway Postgres if you don't have one:
docker run -d --name oh-db -p 5432:5432 \
-e POSTGRES_USER=openhosting -e POSTGRES_PASSWORD=openhosting \
-e POSTGRES_DB=openhosting postgres:18-alpine# 4. Create the schema and seed demo data
npm run db:push
npm run db:seed
# 5. Run the dev server
npm run devOpen http://localhost:3000.
After seeding:
| Role | Password | |
|---|---|---|
| Administrator | admin@example.com |
admin12345 |
| Customer | demo@example.com |
demo12345 |
Change the admin password immediately on a real deployment — or seed with
your own via SEED_ADMIN_EMAIL / SEED_ADMIN_PASSWORD (see the
environment reference). Both are applied only when the
account is created; to change an existing password from the shell use
npm run db:reset-admin -- --email you@example.com --password-stdin (add
--list to see the staff accounts, --disable-2fa to clear two-factor auth).
In Docker the same script is node prisma/reset-admin.mjs inside the app
container, or the installer's
--reset-password action.
- Two roles (Administrator, Support) and the two users above
- Three categories (Game Servers, VPS, Web Hosting) with sample products
- A
WELCOME10coupon, a US sales-tax rate, and a EUR currency - All payment gateways, server modules and resale modules as disabled extension rows, ready to configure under Admin → Extensions
- A demo order, service, paid + pending invoice, and a support ticket
| Command | Purpose |
|---|---|
npm run dev |
Development server with hot reload |
npm run build |
Production build |
npm run start |
Serve the production build |
npm run typecheck |
TypeScript check |
npm run db:push |
Sync schema to the database (dev) |
npm run db:migrate |
Apply migrations (production) |
npm run db:seed |
Seed demo data |
npm run db:reset-admin |
Reset a staff password (-- --list to see accounts) |
See CLI & scripts for the full list.
Can't reach database server— checkDATABASE_URLin.envand that Postgres is running and reachable on that host/port.- Prisma client errors after pulling changes — run
npm run db:generate(ornpx prisma generate) to regenerate the client. - Port 3000 in use — set
PORT=3001in your environment. On a Docker install, the installer offers the free ports nearby and--reconfiguremoves an existing install to another port. - Locked out of the admin account — reset it from the shell, see Default logins above.