
Invoice Ninja
Invoicing, quotes, and payment management
Deploy Invoice Ninja in 3 Steps
Connect Your VPS
Add your server credentials to Server Compass
Select Invoice Ninja
Choose from our template library
Deploy & Configure
Fill in settings and click Deploy
Deploy Invoice Ninja via Command Line
Prefer the command line? Follow this step-by-step guide to deploy Invoice Ninja manually on your VPS.
Connect to Your Remote Server
Begin by establishing a secure connection to your server through the terminal.
# Access your VPS
ssh root@YOUR_SERVER_IP
# With SSH key authentication
ssh -i ~/.ssh/your-private-key root@YOUR_SERVER_IPFirst time? Ensure Docker is installed first: curl -fsSL https://get.docker.com | sh
Set Up Your App Folder
Create a dedicated folder for your application files.
# Create and navigate to project directory
mkdir -p ~/apps/invoice-ninja
cd ~/apps/invoice-ninjaSet Up Docker Compose
Create the following docker-compose.yml in your project directory:
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:
PORTHost port(default: 8080)APP_URLFull application URL with http:// (auto-populated)APP_KEYLaravel app key (auto-generated)IN_PASSWORDInitial admin passwordDB_PASSWORDDB passwordSpin Up the Stack
Run Docker Compose to launch your application.
# Launch the stack
docker compose up -d
# Verify container status
docker compose ps
# Follow the logs
docker compose logs --followOpen the Application Port
Configure UFW to allow traffic to your application.
# Allow the application port through firewall
sudo ufw allow 8080/tcp
sudo ufw reload
# Access your app at:
# http://your-server-ip:8080Make 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
After Deployment
After deploying Invoice Ninja with Server Compass, complete these steps to finish setup
Create admin account
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


