Deploy Invoice Ninja

Invoice Ninja 5 invoicing, quotes and payments with MySQL and PDF output

Deploy Invoice Ninja

Just deployed

/var/lib/mysql

/var/www/html/storage

Deploy and Host Invoice Ninja on Railway

Invoice Ninja is an open-source invoicing and billing app for freelancers and small businesses. It creates quotes, invoices, recurring invoices and credits, tracks expenses, time and payments, and gives each client a portal where they can view, download and pay invoices. This template runs the self-hosted v5 edition.

About Hosting Invoice Ninja

Upstream's Docker setup runs the PHP app in one container and nginx in another, and the two share folders. Railway volumes can't be shared between services, so this template runs everything in one service built from the official image. A short start script adds the Caddy web server next to PHP-FPM, the queue workers and the scheduler, all under the image's own supervisor. On first boot the image migrates the database and creates your admin account from the deploy variables, so the setup wizard is never left open. MySQL holds the data, and a volume keeps uploads, logos and generated files. PDFs are rendered by the Chrome build bundled in the image.

Common Use Cases

  • Sending branded invoices and quotes, and collecting payments through gateways such as Stripe or PayPal
  • Recurring billing for retainers, subscriptions and hosting clients
  • Giving clients a self-service portal to view, download and pay their invoices

Dependencies for Invoice Ninja Hosting

  • Invoice Ninja 5.13.53 (official invoiceninja/invoiceninja-debian:5.13.53 image, pinned by digest)
  • MySQL 8.4 (mysql:8.4.13, pinned by digest) with a volume

Deployment Dependencies

Implementation Details

  • Sign in: open your Railway domain and sign in with the email you entered as IN_USER_EMAIL. The password is in the Invoice Ninja service's IN_PASSWORD variable. Both are read only on the first boot, so change the password under Settings > User Details afterwards.
  • Email: until you set MAIL_HOST, MAIL_PORT, MAIL_USERNAME and MAIL_PASSWORD for an SMTP provider, emails are written to the log and not sent. MAIL_FROM_ADDRESS defaults to the admin email. The client-portal links work without email.
  • Background work: two queue workers and the scheduler run in the same service, with the queue stored in MySQL. Redis isn't needed.
  • Custom domain: after adding one, change APP_URL to https://your-domain and redeploy, so links and PDFs use it.
  • Upgrades: change the image tag. Migrations run on every start.

Why Deploy Invoice Ninja on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Invoice Ninja on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
52