Installation
Quick Install (Recommended)
Run the one-liner to download and launch the interactive TUI installer:
curl -fsSL https://github.com/RantAI-dev/RustBill/releases/latest/download/install.sh | sudo bashThe installer guides you through mode selection, configuration, database setup, and service creation.
Manual Install
Download the installer binary directly from the latest release :
curl -LO https://github.com/RantAI-dev/RustBill/releases/latest/download/rustbill-installer-x86_64-linux-musl
chmod +x rustbill-installer-x86_64-linux-musl
sudo ./rustbill-installer-x86_64-linux-musl installNon-Interactive Install
For scripted or CI deployments, use the --non-interactive flag:
sudo ./rustbill-installer-x86_64-linux-musl install \
--non-interactive \
--mode full \
--db-password "your-secure-password" \
--api-port 3001 \
--frontend-port 3000All available flags:
| Flag | Default | Description |
|---|---|---|
--mode | full | full, backend, frontend, or dev |
--install-dir | /opt/rustbill | Installation directory |
--db-host | localhost | PostgreSQL host |
--db-port | 5432 | PostgreSQL port |
--db-name | rantai_billing | Database name |
--db-user | rantai_billing | Database user |
--db-password | (auto-generated) | Database password |
--api-port | 3001 | Rust API server port |
--frontend-port | 3000 | Next.js frontend port |
Installation Modes
| Mode | What it installs |
|---|---|
| full | PostgreSQL + Rust API + Next.js frontend + systemd services |
| backend | PostgreSQL + Rust API only + systemd service |
| frontend | Next.js frontend only + systemd service (connects to existing backend) |
| dev | Clones repo, builds from source, no systemd |
What the Installer Does
- Preflight checks — verifies OS, architecture, RAM, disk, ports
- Installs dependencies — PostgreSQL 17, system packages
- Sets up database — creates user and database
- Downloads binaries — static
rustbill-serverbinary from GitHub Releases - Downloads frontend — pre-built Next.js standalone tarball from GitHub Releases
- Generates configuration —
production.tomland.envwith your settings - Creates systemd services —
rustbill-backendandrustbill-frontend - Verifies installation — health checks on all services
Migrations run automatically when the backend starts. A default admin user (admin@rustbill.local / admin123) is created on first boot.
Verify
curl http://localhost:3001/health
# => {"status":"ok"}Check service status:
sudo systemctl status rustbill-backend
sudo systemctl status rustbill-frontendView logs:
sudo journalctl -u rustbill-backend -fUninstall
sudo rustbill-installer uninstallThis stops services, removes binaries and config, but preserves the database. To drop it manually:
sudo -u postgres dropdb rantai_billing
sudo -u postgres dropuser rantai_billingNext Steps
- Quick Start — Make your first API calls
- Configuration — Customize server settings, auth, and payment providers
Last updated on