Deploy Invoice Ninja
Invoice Ninja 5 invoicing, quotes and payments with MySQL and PDF output
MySQL
Just deployed
/var/lib/mysql
Invoice Ninja
Just deployed
/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.53image, pinned by digest) - MySQL 8.4 (
mysql:8.4.13, pinned by digest) with a volume
Deployment Dependencies
- Invoice Ninja source code and v5.13.53 release notes
- Official Docker image and self-hosting documentation
- Start script used by this template
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'sIN_PASSWORDvariable. 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_USERNAMEandMAIL_PASSWORDfor an SMTP provider, emails are written to the log and not sent.MAIL_FROM_ADDRESSdefaults 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_URLtohttps://your-domainand 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
MySQL
mysql:8.4.13Invoice Ninja
invoiceninja/invoiceninja-debian:5.13.53IN_USER_EMAIL
