Self-host Invoice Ninja with Levelrail

Self-hosted invoicing, quotes, and payments for freelancers and small businesses.

  • Authorinvoiceninja
  • LicenceElastic-2.0
  • Memory512 MiB
  • Archarm64
  • Services3

How to self-host Invoice Ninja

  1. Pull the images

    3 images are pulled on your server.

    Show images
    • mariadb:11
    • invoiceninja/invoiceninja:5
    • redis:7.4-alpine
  2. Create the app

    3 services start in a single Compose app, with 3 named volume mounts for your data, on port 80.

  3. Fill in the secrets

    4 secrets are generated and stored encrypted, 7 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

Invoice Ninja requirements

Memory
About 512 MiB
Architectures
amd64 image published, arm64 image published
Ports
80
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
Elastic-2.0, source available
  • Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
  • Host ports. It publishes port 80 on the host, so open them in the VPS firewall only if you want that.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Invoice Ninja. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the Invoice Ninja docs page.

Deploy Invoice Ninja your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy Invoice Ninja from the CLI

levelrail-cli templates deploy invoice-ninja --name my-invoice-ninja

Deploy Invoice Ninja with the API

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/invoice-ninja/deploy

Invoice Ninja configuration

Invoice Ninja services

ServiceImagePortsVolumes
db mariadb:11 none invoiceninja_db_data -> /var/lib/mysql
invoiceninja invoiceninja/invoiceninja:5 80 invoiceninja_data -> /var/www/app/storage
redis redis:7.4-alpine none invoiceninja_redis_data -> /data

Invoice Ninja environment variables

VariableServiceValue
MYSQL_DATABASE db Preset by the template
MYSQL_PASSWORD db Generated at deploy
MYSQL_ROOT_PASSWORD db Generated at deploy
MYSQL_USER db Preset by the template
APP_KEY invoiceninja Generated at deploy
APP_URL invoiceninja Preset by the template
DB_DATABASE invoiceninja Preset by the template
DB_HOST invoiceninja Preset by the template
Show all 11 variables
  • DB_PASSWORDinvoiceninjaGenerated at deploy
  • DB_USERNAMEinvoiceninjaPreset by the template
  • REDIS_HOSTinvoiceninjaPreset by the template

Ports and volumes

Ports
80
Volumes
3 named mounts: invoiceninja_db_data -> /var/lib/mysql, invoiceninja_data -> /var/www/app/storage, invoiceninja_redis_data -> /data

Invoice Ninja FAQ

How much memory does Invoice Ninja need?

The catalog lists about 512 MiB of memory for Invoice Ninja across its 3 services.

Does Invoice Ninja run on arm64?

For Invoice Ninja, an arm64 image is published; amd64 is image published.

What licence is Invoice Ninja under?

Invoice Ninja is licensed under Elastic-2.0, which is source-available, so read the terms before commercial use.

Does Invoice Ninja need configuration before it starts?

No. The template fills in its own defaults and generates secrets at deploy time.

Which database does Invoice Ninja bundle?

The template includes MySQL and Redis, running as its own service.

Which ports does Invoice Ninja use?

Invoice Ninja listens on port 80 inside the stack.

Where does Invoice Ninja keep its data?

In named volumes: invoiceninja_db_data mounted at /var/lib/mysql, invoiceninja_data mounted at /var/www/app/storage and invoiceninja_redis_data mounted at /data.

Can I deploy Invoice Ninja on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Invoice Ninja, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image mariadb:11, invoiceninja/invoiceninja:5, redis:7.4-alpine is what you deploy there.

levelrail-cli templates deploy invoice-ninja --name my-invoice-ninja