
Deploy Invoice Ninja | (Just Updated) FreshBooks Alternative That Finishes Setting Itself Up
Self-configuring: admin seeded, queue workers running, uploads persist
invoice-ninja
Just deployed
/var/www/app/storage
mysql
Just deployed
/var/lib/mysql
Deploy and Host Invoice Ninja on Railway
Invoice Ninja is the open-source invoicing, quoting and payments platform — a self-hosted FreshBooks / Bill.com alternative. Create clients, send invoices and quotes, take card payments through dozens of gateways, track expenses and time, and let recurring invoices and payment reminders go out on their own.
This template finishes setting itself up: the database is created and migrated, the lookup data is seeded, your admin account exists before the URL is live, and the scheduler and queue workers actually run.
About Hosting Invoice Ninja
The stack is two services: the Invoice Ninja application and a MySQL 9 database, each on its own Railway volume. The application container runs nginx on the port Railway injects, php-fpm, the Laravel scheduler and two queue workers under supervisord — so recurring invoices, reminders, autobilling and outbound email are processed in the background rather than inside a web request.
Boot order matters and is handled for you. The container waits for MySQL, creates
the application database if it is missing, runs migrations and seeds, then creates
your administrator account — all before nginx opens the public port, so the setup
wizard is never served to a stranger. Your admin password is re-applied on every
boot, which makes a redeploy a working password reset. The APP_KEY that encrypts
stored payment-gateway credentials is generated per deployment onto the volume
instead of being shared by every deploy, and uploaded logos and attachments are
written to the volume rather than to the disposable container layer.
Why Deploy Invoice Ninja on Railway?
Railway supplies the HTTPS domain, the managed MySQL volume and one-click redeploys; the template supplies a working instance rather than a blank installer. The image is pinned to a specific Invoice Ninja release and prebuilt, so deploys are a pull rather than a source build, and the MySQL buffer pool is sized from the container's own memory limit instead of a fixed guess. The database is on the private network with no public proxy.
Common Use Cases
- Freelancers and agencies sending invoices, quotes and recurring billing.
- Small businesses taking online card payments and tracking expenses.
- Self-hosting client and billing data instead of leaving it with a SaaS vendor.
Dependencies for Invoice Ninja
- Invoice Ninja 5.13.37 (pinned in the wrapper image).
- MySQL 9.4.
Deployment Dependencies
- MySQL is included in this template; nothing external is required.
- SMTP is optional. Configure it in the app if you want email delivery of invoices and reminders; the instance works without it.
Template Content
invoice-ninja
ghcr.io/bon5co/invoice-ninja-railway:5.13.37mysql
mysql:9.4