---
title: "Deploy FOSSBilling"
description: "Host Fossbilling on Railway!"
category: "Starters"
url: https://railway.com/deploy/fossbilling
---

# Deploy FOSSBilling

Host Fossbilling on Railway!

**[Deploy FOSSBilling on Railway](https://railway.com/template/fossbilling)**

- **Creator:** Sofia Vicedomini's Projects
- **Category:** Starters
- **Total deploys:** 7

## Template content

### FOSSBilling https://raw.githubusercontent.com/FOSSBilling/FOSSBilling/refs/heads/main/src/themes/admin_default/favicon.ico

- **Image:** ghcr.io/blacksoulgem95/fossbilling-railway:latest

### MySQL https://devicons.railway.app/i/mysql.svg

- **Image:** mysql:9.6
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G`

## Documentation

# Deploy and Host FOSSBilling on Railway

[FOSSBilling](https://fossbilling.org/) is an open-source billing and client-management platform for hosting providers and IT businesses. It handles invoices, orders, support tickets, and automation around products and services. You run it on a PHP stack with a relational database and scheduled tasks so recurring billing and reminders stay reliable.

## About Hosting FOSSBilling

Hosting FOSSBilling means running a long-lived PHP application behind a web server, keeping PHP-FPM available for requests, and running periodic jobs (for example invoicing and maintenance). You also need a MySQL-compatible database for configuration and data. This template ships a Docker image that bundles FOSSBilling with **Nginx**, **PHP 8.4-FPM**, **Supervisor** (to run Nginx, PHP-FPM, and cron together), and **system cron** executing `cron.php` every five minutes. **MySQL is preconfigured** in the template, so you connect the app during the web installer instead of provisioning the database service yourself. Railway injects `PORT` for Nginx; on first start the entrypoint can populate `/app` from the bundled application files when a volume is empty. After deploy, open your Railway URL and complete FOSSBilling’s setup wizard.

## Common Use Cases

- **Web hosting & VPS providers** — sell and bill recurring services with client portals and automation.
- **Agencies and IT shops** — centralize quotes, invoices, and support for multiple customers.
- **Internal billing** — track products, subscriptions, and payments with a self-hosted stack.

## Dependencies for FOSSBilling Hosting

- **MySQL** (or MariaDB-compatible) — required; provided and pre-wired in this Railway template.
- **PHP runtime** — **8.4-FPM** with common extensions (see implementation details).
- **Web server** — **Nginx** in front of PHP-FPM; **Supervisor** supervises processes; **cron** for scheduled PHP tasks.

### Deployment Dependencies

- [FOSSBilling](https://fossbilling.org/) — project home and documentation  
- [FOSSBilling Docker image](https://hub.docker.com/r/fossbilling/fossbilling) — upstream image used as the application source in the multi-stage build  
- [Railway](https://railway.com/) — hosting and environment variables (e.g. `PORT`)

### Implementation Details

Multi-stage `Dockerfile`: stage one copies `/var/www/html` from `fossbilling/fossbilling:latest`; stage two is `php:8.4-fpm` with Nginx, cron, and Supervisor. PHP extensions include `intl`, `pdo_mysql`, `gd` (FreeType, JPEG, PNG, WebP, XPM, AVIF), `bz2`, and `imagick`. Nginx and PHP-FPM run as unprivileged `appuser` (uid 1001); Nginx uses `cap_net_bind_service` to bind the listening port.

## Why Deploy FOSSBilling 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 FOSSBilling 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.

## Similar templates

- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [caring-vibrancy](https://railway.com/deploy/caring-vibrancy) — Deploy and Host caring-vibrancy with Railway
- [Appsmith](https://railway.com/deploy/appsmith-1) — Low-code platform for internal tools, dashboards, and admin panels.

Open this page in a browser: https://railway.com/deploy/fossbilling
