---
title: "Deploy Bigcapital"
description: "Double-entry accounting and invoicing software for small businesses"
category: "Other"
url: https://railway.com/deploy/bigcapital-accounting
---

# Deploy Bigcapital

Double-entry accounting and invoicing software for small businesses

**[Deploy Bigcapital on Railway](https://railway.com/template/bigcapital-accounting)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/bigcapital-accounting/manifest.json

- **Creator:** A3A
- **Category:** Other
- **Total deploys:** 1

## Template content

### gateway https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/caddy.svg

- **Image:** caddy:2-alpine
- **Start command:** `/bin/sh -c 'printf %s "$CADDY_CONFIG" > /etc/caddy/config.json; caddy validate --config /etc/caddy/config.json || exit 1; exec caddy run --config /etc/caddy/config.json'`
- **Health check:** /healthz
- **Public domain:** Yes

### webapp https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/bigcapital.svg

- **Image:** bigcapitalhq/webapp:v0.25.41
- **Health check:** /

### gotenberg https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/gotenberg.png

- **Image:** gotenberg/gotenberg:8
- **Health check:** /health

### server https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/bigcapital.svg

- **Source:** https://github.com/gridalpha/bigcapital-railway
- **Health check:** /api/system_db

### mariadb https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mariadb.svg

- **Image:** mariadb:10.11
- **Start command:** `/bin/sh -c 'exec docker-entrypoint.sh mariadbd --bind-address=* --innodb-buffer-pool-size=1024M --max-connections=300'`

### clickhouse https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/clickhouse.svg

- **Image:** clickhouse/clickhouse-server:24.8

### redis https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.svg

- **Image:** redis:8.2-alpine
- **Start command:** `/bin/sh -c 'rm -rf /data/lost+found; exec docker-entrypoint.sh redis-server --bind :: 0.0.0.0 --protected-mode no --appendonly yes --dir /data'`

## Buckets

- **bigcapital-storage**

## Documentation

# Deploy and Host Bigcapital on Railway

Bigcapital is open-source double-entry accounting software for small businesses,
bookkeepers and finance teams who want QuickBooks-style invoicing, bills and financial
statements without a per-seat subscription. It covers the full cycle: a chart of accounts,
customers and vendors, items, sales invoices, purchase bills, expenses, manual journals,
inventory, and reports from the balance sheet to receivable aging. Multi-currency and
multi-organization support are built in, and every figure traces to a journal entry.

Deploy Bigcapital on Railway and you get the whole production topology, not a single
container. The `gateway` service is the one public origin: it serves the `webapp` React
front end and forwards `/api` to the `server` NestJS backend, which keeps the session
cookie and the API on the same host. `mariadb` holds the ledger, `redis` backs the job
queue, `gotenberg` renders invoice PDFs, `clickhouse` stores analytics roll-ups, and a
Railway object-storage bucket keeps document attachments. Self-hosting Bigcapital
elsewhere means wiring those seven pieces together yourself; here they arrive connected,
with volumes, health checks and private networking set.

![Diagram of the Bigcapital services deployed on Railway](https://res.cloudinary.com/rroe4rtk/image/upload/f_auto,q_auto/v1789660123/bigcapital-architecture.webp)

## Getting Started with Bigcapital on Railway

Set `SIGNUP_ALLOWED_EMAILS` on the `server` service to your own email address before you
deploy — that address becomes the only one allowed to create an account, which keeps a
public URL from being claimed by whoever finds it first. Everything else has a default.

There is no shipped admin password. Open the deployed URL at `/auth/register`, sign up with
that allow-listed address, and you become the owner of a new organization. The sign-up link
is hidden on the login page by design; the route still works. A short wizard then asks for
legal name, business location, base currency, fiscal year and time zone. Saving it
provisions a dedicated database for your organization and seeds a full chart of accounts.

To prove the deployment works end to end, add a customer under **Contacts**, add an item
under **Items**, then create a sales invoice under **Sales** and mark it delivered. Open
**Reports → Balance Sheet** and the total appears under Accounts Receivable; record a
payment and it moves into your bank account row. Set the `MAIL_*` variables before inviting
colleagues, since invitations and password resets are emailed.

![Bigcapital invoice list showing paid and outstanding sales invoices](https://res.cloudinary.com/rroe4rtk/image/upload/f_auto,q_auto/v1789660126/bigcapital-invoices-list.webp)
![Bigcapital balance sheet with cash and receivable totals](https://res.cloudinary.com/rroe4rtk/image/upload/f_auto,q_auto/v1789660128/bigcapital-balance-sheet.webp)
![Bigcapital receivable aging summary for a customer account](https://res.cloudinary.com/rroe4rtk/image/upload/f_auto,q_auto/v1789660129/bigcapital-receivable-aging.webp)

## About Hosting Bigcapital

Hosted bookkeeping platforms price per user, per company or per transaction. Self-hosting
Bigcapital gives an accountant with several client companies, or a business that wants its
ledger inside its own infrastructure, the same feature surface at infrastructure cost.

Key capabilities:

- Double-entry general ledger with a seeded, editable chart of accounts
- Sales invoices, estimates, receipts and credit notes, plus purchase bills
- Customer and vendor records with running receivable and payable balances
- Expense tracking, manual journals, and banking with account reconciliation
- Inventory items with cost and sell prices, and landed-cost allocation
- Balance sheet, profit and loss, cash flow, general ledger, trial balance and aging reports
- Multi-currency with exchange rates, and multiple organizations under one login

Each service has one job. `server` is the NestJS API that owns the ledger logic and the
background job processors. `webapp` is the compiled React front end on nginx. `gateway` is a
Caddy reverse proxy putting both behind one hostname, so the browser never makes a
cross-site request. `mariadb` stores a system database plus one database per organization,
created on demand. `redis` carries the BullMQ queues behind notifications, exports and
analytics syncs. `gotenberg` turns invoice HTML into PDFs. `clickhouse` holds ledger deltas
for fast workspace totals.

## Why Deploy Bigcapital on Railway

Railway removes the assembly work this stack normally needs:

- Seven services, three volumes and an object-storage bucket in one click
- Private networking between the app, database, cache and PDF renderer
- Persistent volumes for MariaDB, Redis and ClickHouse
- Health checks and automatic restarts on every service
- Free HTTPS on a generated domain, or bring your own

## Common Use Cases

- A small business running its own books instead of paying per-seat for QuickBooks or Xero
- An accountant keeping several client organizations in one installation
- A startup that wants invoicing, expenses and statements it can query directly
- A company with data-residency rules covering its ledger

## Dependencies for Bigcapital

- `gridalpha/bigcapital-railway` — the API server image, built on `bigcapitalhq/server`
- `bigcapitalhq/webapp` — the React front end on nginx
- `caddy:2-alpine` — single-origin reverse proxy
- `mariadb:10.11` — the ledger; Bigcapital creates one database per organization
- `redis:8.2-alpine` — BullMQ job queues and rate-limit counters
- `gotenberg/gotenberg:8` — PDF rendering for invoices and reports
- `clickhouse/clickhouse-server:24.8` — analytics roll-ups for workspace totals
- A Railway object-storage bucket for document attachments

### Environment Variables Reference

| Variable | Service | Purpose |
|---|---|---|
| `SIGNUP_ALLOWED_EMAILS` | server | Comma-separated addresses allowed to register |
| `SIGNUP_DISABLED` | server | Keep `true`; the allow-list is what re-opens sign-up |
| `APP_JWT_SECRET` | server | Signs authentication tokens; changing it logs everyone out |
| `BASE_URL` | server | Public URL used in emailed links |
| `MAIL_*` | server | SMTP host, port, credentials and sender identity |
| `CLICKHOUSE_ENABLED` | server | Set `false` to skip analytics roll-ups |
| `THROTTLE_AUTH_LIMIT` | server | Login attempts allowed per minute per client |
| `STRIPE_PAYMENT_SECRET_KEY` | server | Optional; enables customer payment links |

### Deployment Dependencies

- Source: 
- Images:  and 
- Documentation: 
- Runtime: Node.js 18, MariaDB 10.11, Redis 8

## Hardware Requirements for Self-Hosting Bigcapital

| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 2 vCPU total | 4 vCPU |
| RAM | 3 GB total | 6 GB or more |
| Storage | 5 GB volumes | 10 GB plus bucket growth |
| Runtime | Node.js 18, MariaDB 10.11, Redis 8 | Same |

The API server and MariaDB are the two that matter. ClickHouse is optional; `CLICKHOUSE_ENABLED=false` frees roughly a gigabyte.

## Self-Hosting Bigcapital with Docker

Upstream ships a production Compose file. Clone the repository:

```
git clone https://github.com/bigcapitalhq/bigcapital.git
cd bigcapital
cp .env.example .env
```

Generate the two secrets the stack refuses to start without, then bring it up:

```
echo "APP_JWT_SECRET=$(openssl rand -base64 48)" &gt;&gt; .env
echo "CLICKHOUSE_PASSWORD=$(openssl rand -base64 32)" &gt;&gt; .env
docker compose -f docker-compose.prod.yml up -d
```

You are then responsible for the reverse proxy, TLS certificates, volume backups and the
S3-compatible storage attachments expect. The Railway template covers that part.

## Is Bigcapital Free to Self-Host?

Bigcapital is open source under AGPL-3.0, so the software costs nothing and there are no
per-user or per-company fees. The company sells a hosted cloud plan; self-hosting has no
licence key and no feature gate. On Railway you pay only for the compute, memory and
storage the seven services consume.

## FAQ

**What is Bigcapital?**

Bigcapital is open-source accounting software with double-entry ledgers, invoicing,
expenses, inventory and financial statements — a self-hostable alternative to QuickBooks,
Xero and Wave.

**What does this Railway template deploy?**

Seven services: the API server, the React front end, a Caddy gateway giving both one public
origin, MariaDB, Redis, Gotenberg for PDF rendering and ClickHouse for analytics, plus a
managed object-storage bucket for attachments.

**Why does Bigcapital need MariaDB and Redis?**

MariaDB holds the ledger, and Bigcapital creates a separate database per organization, so
it needs an account that can create databases. Redis backs the queues that send
notifications, build exports and sync analytics in the background.

**How do I create the first admin user in self-hosted Bigcapital?**

There is no default password. Visit `/auth/register` on the deployed URL and sign up with
an address listed in `SIGNUP_ALLOWED_EMAILS`; the first account becomes the organization
owner. Leave `SIGNUP_DISABLED=true` so nobody else can register.

**Can I use my own SMTP server for invoices and invitations?**

Yes. Set `MAIL_HOST`, `MAIL_PORT`, `MAIL_USERNAME`, `MAIL_PASSWORD`, `MAIL_SECURE`,
`MAIL_FROM_NAME` and `MAIL_FROM_ADDRESS` on `server`. Without them the app runs fine, but
invitations, password resets and emailed invoices will not send.

**Does self-hosted Bigcapital support multiple companies?**

Yes. One login can own several organizations, each with its own database and chart of
accounts. Switch between them from the organization menu in the top-left corner.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/bigcapital-accounting
