← Gamma ERP

Self-host Gamma ERP with Docker: install it in a few minutes

Add as preferred source on Google

Gamma ERP runs as three containers: PostgreSQL 16, the API (which also brings the database up to date when it starts) and the web container, which serves the screens and passes the API’s paths through, so everything lives on one address. The images are published for amd64 and arm64, so a normal Linux server, a Mac with Apple silicon or an ARM cloud machine all work.

What you need

  • A server or computer with Docker and Docker Compose.
  • Git, to get the compose file and the settings template.
  • For real use: a domain name and a reverse proxy that ends TLS (Caddy, nginx, Traefik or your cloud’s load balancer).

1. Get the compose file

git clone https://github.com/Gamma-Wallet/GammaERP.git
cd GammaERP/deploy
cp .env.example .env

2. Set your values in .env

Open .env and change at least these:

Setting What to put
POSTGRES_PASSWORD A long, random database password.
AUTH_REDIRECT_URI The address people will open, followed by /signed-in, e.g. https://erp.example.com/signed-in.
AUTH_REQUIRE_HTTPS true by default. Set it to false only when a reverse proxy in front ends TLS (step 5), or for a first local try.
AUTH_SIGNING_CERTIFICATE, AUTH_ENCRYPTION_CERTIFICATE, AUTH_CERTIFICATE_PASSWORD Two PFX certificates in deploy/certs. Without them, every restart signs everyone out.
MAIL_* Your SMTP server, so documents can be e-mailed and forgotten-password codes sent. Leave MAIL_HOST empty to keep e-mail off.
ERP_TAG The image version: gamma for the latest Gamma release, or an exact one such as 0.1.0-gamma.

.env holds secrets: never commit it.

3. Start it

docker compose up -d
curl http://127.0.0.1:8090/health    # answers "Healthy"

Compose pulls ghcr.io/gamma-wallet/gamma-erp-api and ghcr.io/gamma-wallet/gamma-erp-web, starts PostgreSQL, and the API creates the database schema on its first start. If you would rather build the images from the code, run docker compose up -d --build instead.

The screens answer on http://127.0.0.1:8090. Both published ports, the screens and the database, are bound to 127.0.0.1 only, so nothing is open to the internet until you put your reverse proxy in front.

4. Create the first company

Gamma ERP has no public sign-up. The first company and its administrator are made on the server, and that administrator then makes every other user:

docker compose exec -e ERP_ADMIN_PASSWORD='<at least 12 characters>' erp \
  dotnet /app/Gamma.Erp.Api.dll create-company --username owner --country AL --company "Company name"
  • --country picks the country’s starter pack: its chart of accounts, VAT rates and document types. Review it with your accountant before posting real documents.
  • Leave out ERP_ADMIN_PASSWORD and the command makes a password itself. Either way, the administrator must change it at the first sign-in.
  • The command also prints the administrator’s first Claude token once, for connecting Claude through the ERP’s MCP server.

Then open the address, sign in as owner, and add your users, roles and cost centres.

5. Put it on the internet safely

  • Put a reverse proxy that ends TLS in front of the web container.
  • Set AUTH_REDIRECT_URI to https://<your address>/signed-in, AUTH_REQUIRE_HTTPS=false (the proxy ends TLS) and keep FORWARDED_HEADERS=true.
  • Keep the database port on 127.0.0.1.

Back up

Back up both Docker volumes:

  • db-data: the database.
  • erp-data: uploaded files and the sign-in cookie keys.

A file row in the database without its bytes in erp-data cannot be read back, so keep the two backups together.

Update

docker compose pull
docker compose up -d

The API brings the database to the new schema when it starts. Back up first, and read the release notes on GitHub releases.

If something goes wrong

  • docker compose logs erp shows the API’s log, including the database migration at start.
  • docker compose ps shows whether each container is healthy.
  • The full guide is deploy/README.md in the repository. Questions and bugs go to GitHub issues; security problems go privately through the repository’s Security tab.