Back to all templates
Invoice Ninja logo

Invoice Ninja

Application512MB+ RAM

Invoicing, quotes, and payment management

invoicingbillingpayments

Deploy Invoice Ninja in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select Invoice Ninja

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
Step-by-step deployment guide

Deploy Invoice Ninja on a VPS with Server Compass

Use the Invoice Ninja template in Server Compass to deploy a self-hosted invoicing and billing platform with MySQL-backed web application on your VPS, then verify the Invoice Ninja web UI in a browser.

About 7 minutesBrowser verified
1
Step 1

Open the server Apps tab

Select your VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Server Compass Apps tab before creating an Invoice Ninja app
2
Step 2

Choose an app template

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Choosing to deploy an app from a Server Compass template
3
Step 3

Search for Invoice Ninja

Use the template picker search to find Invoice Ninja in the Server Compass template catalog.

Searching for Invoice Ninja in the Server Compass template picker
4
Step 4

Select the Invoice Ninja template

Choose the Invoice Ninja template. Server Compass fills the Invoice Ninja app, Nginx web server, and MySQL database services.

Invoice Ninja template selected in Server Compass
5
Step 5

Review the Invoice Ninja settings

Confirm the app name and compose services. In this run, the app was named invoice-ninja-demo and used host port 8080.

Reviewing Invoice Ninja project settings and compose services
6
Step 6

Deploy Invoice Ninja

Review the generated environment values, confirm the port is available, and click Deploy Now.

Reviewing Invoice Ninja environment variables and port before deployment
7
Step 7

Watch the deployment progress

Keep the deployment modal open while Server Compass uploads the compose file, pulls the Invoice Ninja image, starts the container, and verifies the stack.

Server Compass deploying the Invoice Ninja template on the VPS
8
Step 8

Confirm Invoice Ninja is running

After deployment finishes, return to the Apps tab and confirm the Invoice Ninja app is marked Running with its application URL available.

Invoice Ninja template running in the Server Compass Apps tab
9
Step 9

Open Invoice Ninja in the browser

Open the application URL in a browser. The Invoice Ninja web UI confirms the site is reachable.

The deployed Invoice Ninja web UI loaded in a browser

After Invoice Ninja Opens

  • Sign in with the initial admin account and configure company details before production use.
  • Configure company settings, HTTPS, mail delivery, and invoice numbering before production use.
  • Add a domain and HTTPS before exposing Invoice Ninja to users.
  • Back up the Invoice Ninja MySQL volume before relying on it for production billing data.

Verified Result

The Invoice Ninja web UI loaded successfully in a browser.

Invoice Ninja deployment questions

What does the Invoice Ninja template deploy?

It deploys Invoice Ninja with an Nginx web front end and MySQL database storage.

Which port did the tutorial use?

The tutorial used host port 8080, which maps to the Invoice Ninja Nginx web service on container port 80.

Why does the guide stop at the login or setup web UI?

The tutorial verifies the clean Invoice Ninja web UI because company settings, email delivery, invoice numbering, and payment configuration depend on the production server.

Should this become a blog post?

No. The deployment guide should live on the Invoice Ninja template detail page and be linked from the reusable template deployment docs page.

Do It Yourself

Deploy Invoice Ninja via Command Line

Prefer the command line? Follow this step-by-step guide to deploy Invoice Ninja manually on your VPS.

1

Connect to Your Remote Server

Begin by establishing a secure connection to your server through the terminal.

terminal
# Access your VPS
ssh root@YOUR_SERVER_IP

# With SSH key authentication
ssh -i ~/.ssh/your-private-key root@YOUR_SERVER_IP

First time? Ensure Docker is installed first: curl -fsSL https://get.docker.com | sh

2

Set Up Your App Folder

Create a dedicated folder for your application files.

terminal
# Create and navigate to project directory
mkdir -p ~/apps/invoice-ninja
cd ~/apps/invoice-ninja
3

Set Up Docker Compose

Create the following docker-compose.yml in your project directory:

docker-compose.yml
services:
  web:
    image: nginx:alpine
    ports:
      - "8080:80"
    volumes:
      - invoiceninja_public:/var/www/app/public:ro
      - invoiceninja_storage:/var/www/app/storage:ro
    depends_on:
      - invoiceninja
    command: |
      /bin/sh -c "cat > /etc/nginx/conf.d/default.conf <<'EOF'
      server {
        listen 80;
        server_name _;
        root /var/www/app/public;
        index index.php index.html;
        client_max_body_size 100m;

        location / {
          try_files $$uri $$uri/ /index.php?$$query_string;
        }

        location ~ \.php$$ {
          try_files $$uri =404;
          fastcgi_split_path_info ^(.+\.php)(/.+)$$;
          fastcgi_pass invoiceninja:9000;
          fastcgi_index index.php;
          include fastcgi_params;
          fastcgi_param SCRIPT_FILENAME $$document_root$$fastcgi_script_name;
          fastcgi_param PATH_INFO $$fastcgi_path_info;
        }

        location ~ /\. {
          deny all;
        }
      }
      EOF
      nginx -g 'daemon off;'"
    restart: unless-stopped

  invoiceninja:
    image: invoiceninja/invoiceninja-debian:latest
    environment:
      - APP_URL=<your-app-url>
      - APP_KEY=<your-app-key>
      - APP_ENV=production
      - APP_DEBUG=false
      - [email protected]
      - IN_PASSWORD=<your-in-password>
      - DB_HOST=db
      - DB_DATABASE=ninja
      - DB_USERNAME=ninja
      - DB_PASSWORD=<your-db-password>
      - REQUIRE_HTTPS=false
    volumes:
      - invoiceninja_public:/var/www/app/public
      - invoiceninja_storage:/var/www/app/storage
    restart: unless-stopped
    depends_on:
      db:
        condition: service_healthy

  db:
    image: mysql:8.0
    environment:
      - MYSQL_ROOT_PASSWORD=<your-db-root-password>
      - MYSQL_DATABASE=ninja
      - MYSQL_USER=ninja
      - MYSQL_PASSWORD=<your-db-password>
    volumes:
      - mysql_data:/var/lib/mysql
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p$$MYSQL_ROOT_PASSWORD || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 30s

volumes:
  invoiceninja_public:
  invoiceninja_storage:
  mysql_data:
Configuration Variables
PORTHost port(default: 8080)
APP_URLFull application URL with http:// (auto-populated)
APP_KEYLaravel app key (auto-generated)
IN_USER_EMAILInitial admin email(default: [email protected])
IN_PASSWORDInitial admin password
DB_PASSWORDDB password
4

Spin Up the Stack

Run Docker Compose to launch your application.

terminal
# Launch the stack
docker compose up -d

# Verify container status
docker compose ps

# Follow the logs
docker compose logs --follow
5

Open the Application Port

Configure UFW to allow traffic to your application.

terminal
# Allow the application port through firewall
sudo ufw allow 8080/tcp
sudo ufw reload

# Access your app at:
# http://your-server-ip:8080
Skip the Terminal

Make it simple with Server Compass.

Deploy Invoice Ninja with a beautiful UI instead. No SSH, no YAML editing, no terminal commands. Just click, configure, and deploy in under 3 minutes.

  • No terminal required
  • Point-and-click setup
  • Auto SSL certificates
  • Rolling deployments
  • Health monitoring
  • Instant rollbacks
Download Server Compass$29 one-time • Lifetime license

After Deployment

After deploying Invoice Ninja with Server Compass, complete these steps to finish setup

1

Create admin account

2

Configure company settings

Need help? Check out our documentation for detailed guides.

Invoice Ninja FAQ

Common questions about self-hosting Invoice Ninja

How do I deploy Invoice Ninja with Server Compass?

Simply download Server Compass, connect to your VPS, and select Invoice Ninja from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.

What are the system requirements for Invoice Ninja?

Invoice Ninja requires a minimum of 512MB RAM. We recommend a VPS with at least 1024MB RAM for optimal performance. Any modern Linux server with Docker support will work.

Can I migrate my existing Invoice Ninja data?

Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard Invoice Ninja backup and restore procedures.

How do I update Invoice Ninja to the latest version?

Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest Invoice Ninja image will be pulled and deployed with zero downtime.

Is Invoice Ninja free to self-host?

Invoice Ninja is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.

Ready to Self-Host Invoice Ninja?

Download Server Compass and deploy Invoice Ninja to your VPS in under 3 minutes. No Docker expertise required.

Download Server Compass