Installation, configuration, and usage guide for Tier 4 Billing.
The fastest way to get started.
cp .env.example .env
Edit .env and set your JWT_SECRET (generate with openssl rand -hex 32).
docker-compose up -d
The app will be available at http://localhost:3001. The setup wizard will guide you through initial configuration.
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;"
npm ci
npm run build
psql -U tier4 -d tier4_platform -f migrations/001_phase5_tables.sql
node dist/server.js
All configuration is done through environment variables in .env:
JWT_SECRET — Secret key for authentication tokensDATABASE_URL — PostgreSQL connection stringGMAIL_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)On first launch, the setup wizard will guide you through:
Go to Settings → Gmail to connect your Gmail account. This enables sending invoices and notifications directly from your email address.
Set STRIPE_SECRET_KEY and STRIPE_PUBLISHABLE_KEY in your .env file to enable online payments.
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
Create backups at Settings → Backup. Backups are PostgreSQL dumps that can be restored with:
psql -U tier4 -d tier4_platform < backup_file.sql