Documentation
Installation, configuration, and usage guide for Tier 4 Billing.
Contents
Requirements
- Docker 20+ and Docker Compose (recommended)
- Or: Node.js 22+, PostgreSQL 16+
- 2 GB RAM minimum, 4 GB recommended
- 1 GB disk space + database storage
Docker Installation (Recommended)
The fastest way to get started.
- Download and extract the release archive
- Copy the environment file:
cp .env.example .env
Edit .env and set your JWT_SECRET (generate with openssl rand -hex 32).
- Start the application:
docker-compose up -d
The app will be available at http://localhost:3001. The setup wizard will guide you through initial configuration.
Manual Installation
- Install Node.js 22+ and PostgreSQL 16+
- Create a database:
createdb -U postgres tier4_platform
createuser -U postgres tier4
psql -U postgres -c "ALTER USER tier4 PASSWORD 'your_password';"
psql -U postgres -c "GRANT ALL ON DATABASE tier4_platform TO tier4;"
- Install dependencies and build:
npm ci
npm run build
- Run migrations:
psql -U tier4 -d tier4_platform -f migrations/001_phase5_tables.sql
- Start the app:
node dist/server.js
Configuration
All configuration is done through environment variables in .env:
Required
JWT_SECRET— Secret key for authentication tokensDATABASE_URL— PostgreSQL connection string
Optional
GMAIL_CLIENT_ID/GMAIL_CLIENT_SECRET— For Gmail email integrationSTRIPE_SECRET_KEY/STRIPE_PUBLISHABLE_KEY— For online paymentsANTHROPIC_API_KEY— For AI assistant featuresLICENSE_SERVER_URL— License validation endpoint (default: https://billing.tier4support.com)
Setup Wizard
On first launch, the setup wizard will guide you through:
- License Key — Enter your license key (or skip for Starter tier)
- Company Info — Set your business name
- Admin Account — Create your first user
- Business Type — Choose your industry vertical (IT, Legal, Creative, General)
Integrations
Gmail
Go to Settings → Gmail to connect your Gmail account. This enables sending invoices and notifications directly from your email address.
Stripe
Set STRIPE_SECRET_KEY and STRIPE_PUBLISHABLE_KEY in your .env file to enable online payments.
Updates
Check for updates at Settings → System Updates. Updates are also checked automatically on login.
To update with Docker:
docker-compose pull
docker-compose up -d
Backup & Restore
Create backups at Settings → Backup. Backups are PostgreSQL dumps that can be restored with:
psql -U tier4 -d tier4_platform < backup_file.sql