Skip to content

Quickstart

  • Python 3.12+
  • Redis (for background job processing)
  • PostgreSQL (recommended) or SQLite
  • UV package manager
Terminal window
# Install UV if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install
git clone https://github.com/boxbilling/boxbilling.git
cd boxbilling/backend
uv sync
Terminal window
cp .env.example .env

Edit .env with your settings:

Terminal window
APP_DOMAIN=localhost
APP_DATA_PATH=/var/lib/app
APP_DATABASE_DSN=postgresql://user:pass@localhost:5432/boxbilling
REDIS_URL=redis://localhost:6379
Terminal window
alembic upgrade head
Terminal window
fastapi dev app/main.py

The API is now available at http://localhost:8000.

In a separate terminal:

Terminal window
arq app.worker.WorkerSettings

Create your organization and get an API key:

Terminal window
curl -X POST http://localhost:8000/v1/organizations \
-H "Content-Type: application/json" \
-d '{"name": "My Company"}'

The response includes a raw_key — save this, it’s only shown once:

{
"organization": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My Company"
},
"raw_key": "bxb_live_abc123..."
}

Use this key for all subsequent requests:

Terminal window
curl http://localhost:8000/v1/customers \
-H "Authorization: Bearer bxb_live_abc123..."
Terminal window
docker build -t boxbilling .
docker run -p 80:80 --env-file .env boxbilling