Skip to content

solomon2773/openhosting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 OpenHosting

Open-source billing & client management for hosting providers. Storefront, recurring billing, provisioning and support — one modern stack: Next.js 16 · Prisma · PostgreSQL/Supabase · Docker · Kubernetes.

CI License: MIT Next.js 15 Prisma PRs Welcome

OpenHosting storefront

Why OpenHosting?

Selling game servers, VPS or web hosting means gluing together a store, recurring billing, provisioning and support. OpenHosting delivers that entire workflow as a single modern TypeScript app you can deploy anywhere a container runs — a VPS, any cloud, or a Kubernetes cluster — with Postgres or Supabase as the only dependency. No license fees, no legacy stack.

✨ Features

Store & checkout

  • Product catalog with categories, stock control and visibility rules
  • Six billing cycles (one-time → biennially) with setup fees per cycle
  • Configurable options (RAM, disk, …) with per-option pricing that scales with the cycle
  • Cart, coupons (percent/fixed, per-product restrictions, limited uses, expiry) and country-aware tax rates
  • Multi-currency: exchange rates, storefront currency picker, orders locked to their currency

Billing engine

  • Orders → invoices → services, fully automated
  • Automatic renewal invoicing, overdue suspension and termination (cron-driven)
  • 19 payment gateways: cards (Stripe, PayPal, Mollie, Square, Authorize.net, Braintree), crypto (Coinbase Commerce, NOWPayments, BTCPay, CoinGate), SEPA (GoCardless), merchant-of-record (Lemon Squeezy), and regional (Razorpay, Mercado Pago/PIX, Paystack, Flutterwave, Midtrans, Xendit)
  • Account credit balance, zero-total auto-activation, manual admin payments

Provisioning

  • 27 server integrations: game panels (Pterodactyl, Pelican, WISP, TCAdmin2), VPS/cloud (Proxmox, SolusVM, Convoy, VirtFusion, Virtualizor, Hetzner, DigitalOcean, Vultr, Linode), enterprise virt (OpenStack, OnApp, Virtuozzo, VMware vCloud) and web panels (cPanel/WHM, DirectAdmin, Plesk, Enhance, HestiaCP, CyberPanel, CWP, InterWorx, ISPConfig, Webmin/Virtualmin)
  • Automatic create / suspend / unsuspend / terminate on billing events
  • Config options map to environment variables on the provisioned server

Product resale (beyond servers)

  • Domain registrars: Enom, ResellerClub, Namecheap, OpenSRS, Openprovider (register/renew)
  • SSL certificates (GoGetSSL), software licenses (cPanel/LiteSpeed/Softaculous/CloudLinux), and Microsoft 365 / Google Workspace seat resale
  • Customers enter the required details (domain, CSR, seat count) at checkout

Client area

  • Dashboard, services, invoices with online payment, account credit
  • Support tickets with departments, priorities and email notifications
  • Profile, password management and TOTP two-factor auth with QR enrolment

Fraud prevention

  • Order review queue (hold risky orders before provisioning), ban lists (email/domain/IP/country), disposable-email blocking
  • Velocity limits, MaxMind minFraud & FraudLabs Pro scoring, checkout captcha, EU VAT (VIES) reverse charge

Affiliate program

  • Referral links, per-product or default commissions, one-time or recurring, payout threshold, affiliate & admin dashboards

Admin panel

  • Revenue dashboard, orders, invoices (mark paid / cancel), service lifecycle controls
  • Product, category, coupon, tax, user and role management (RBAC permissions)
  • Extension configuration UI, editable email templates, SMTP settings
  • Full audit log and searchable customer list

Platform

  • 6 built-in themes switchable at runtime, plus a two-file recipe for custom ones
  • Multi-language UI (English, Dutch, French, German, Spanish) with a storefront language picker
  • REST API (/api/v1) with scoped API keys, plus a CLI (oh) and an MCP server for AI assistants
  • One-command importers to migrate from other billing panels
  • Email notifications via SMTP with templated, per-event messages
  • Docker image, docker-compose stack, Kubernetes manifests with HPA + CronJob

📸 Screenshots

Storefront Product configurator Cart
Storefront Product Cart
Client dashboard Invoice payment Support ticket
Dashboard Invoice Ticket
Admin dashboard Product editor Extensions
Admin Product editor Extensions
More screenshots
Category Login
Services Account
Products Invoices
Admin ticket Settings

🚀 Quick start

One command on a fresh Linux server — it installs Docker if needed, generates secrets, starts the stack and seeds the first admin account:

curl -fsSL https://raw.githubusercontent.com/solomon2773/openhosting/main/install.sh | bash

Open http://your-server:3000 and sign in with the admin credentials the script prints. Re-run the same command any time to update.

Manual Docker setup
git clone https://github.com/solomon2773/openhosting.git
cd openhosting
export DB_PASSWORD="$(openssl rand -hex 16)" CRON_SECRET="$(openssl rand -hex 32)"
docker compose up -d --build
docker compose exec -e SEED_ADMIN_PASSWORD="a-strong-password" app node prisma/seed.mjs

Open http://localhost:3000 — admin login admin@example.com with the password you chose. See the Docker guide.

Local development

npm install
cp .env.example .env          # point DATABASE_URL at Postgres or Supabase
npm run db:push && npm run db:seed
npm run dev

📚 Documentation

Full documentation lives in docs/ — start with the Introduction. Highlights:

Installation Docker Kubernetes
Configuration Products Billing automation
Payment gateways Server modules Resale modules
Fraud protection Affiliates Tickets
REST API OAuth / SSO Writing extensions
Themes Migrations FAQ
CLI MCP server Roadmap

🏗 Architecture

OpenHosting is a single Next.js App Router application following SOLID principles: payment gateways and provisioning backends are substitutable drivers behind segregated interfaces, and the billing engine depends only on abstractions — adding an integration never touches core code. Read the full tour in ARCHITECTURE.md.

Next.js (App Router, Server Actions)
├── Storefront  ├── Client area  ├── Admin panel  └── REST API /api/v1
src/lib
├── billing.ts            invoice lifecycle & recurring billing
├── services/             orders, payments, provisioning (SOLID service layer)
└── extensions/           GatewayDriver + ServerDriver implementations
PostgreSQL / Supabase (Prisma)

🤝 Contributing & community

PRs are welcome! See CONTRIBUTING.md for the dev setup and how to add a payment gateway or server integration (usually < 100 lines). Check the good first issues for scoped starting points, or ask questions in Discussions.

If OpenHosting looks useful to you, a star helps other hosting providers find it.

📄 License

MIT — free for commercial use.

About

Open-source billing & client management for hosting providers — Next.js, Prisma/Supabase, Stripe/PayPal, Pterodactyl provisioning. Docker & Kubernetes ready.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages