How to Self-Host SolidInvoice with Docker Compose
What Is SolidInvoice?
SolidInvoice is an open-source invoicing application built with PHP and Symfony. It handles client management, quote generation, invoicing, and payment tracking. Simpler than Invoice Ninja — fewer features but also fewer things to configure. If you need basic invoicing without the complexity of a full-featured billing platform, SolidInvoice gets the job done. GitHub.
Prerequisites
- A Linux server (Ubuntu 22.04+ recommended)
- Docker and Docker Compose installed (guide)
- 2 GB of free disk space
- 1 GB of RAM (minimum)
- A domain name (optional, for remote access)
Docker Compose Configuration
Create a docker-compose.yml file:
services:
solidinvoice:
image: solidinvoice/solidinvoice:2.3.16
container_name: solidinvoice
restart: unless-stopped
ports:
- "8765:8765"
environment:
# Database connection
SOLIDINVOICE_DATABASE_HOST: "solidinvoice-db"
SOLIDINVOICE_DATABASE_PORT: "3306"
SOLIDINVOICE_DATABASE_NAME: "solidinvoice"
SOLIDINVOICE_DATABASE_USER: "solidinvoice"
SOLIDINVOICE_DATABASE_PASSWORD: "solidinvoice-db-password-change-me"
# Application secret — generate a unique value
SOLIDINVOICE_APP_SECRET: "change-me-to-a-random-32-char-string"
# Optional: set your locale
SOLIDINVOICE_LOCALE: "en"
volumes:
- solidinvoice-data:/var/www/html/var
depends_on:
- solidinvoice-db
networks:
- solidinvoice-net
solidinvoice-db:
image: mysql:8.0
container_name: solidinvoice-db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: "root-password-change-me"
MYSQL_DATABASE: "solidinvoice"
MYSQL_USER: "solidinvoice"
MYSQL_PASSWORD: "solidinvoice-db-password-change-me"
volumes:
- solidinvoice-db:/var/lib/mysql
networks:
- solidinvoice-net
volumes:
solidinvoice-data:
solidinvoice-db:
networks:
solidinvoice-net:
Start the stack:
docker compose up -d
Initial Setup
- Open
http://your-server:8765in a browser. - SolidInvoice runs a setup wizard on first launch.
- Configure your company details: name, address, logo, currency, and tax rates.
- Create your admin account with a strong password.
- Add your first client under Clients → New Client.
- Create a quote or invoice under Quotes/Invoices → New.
Configuration
Key Features
| Feature | Support |
|---|---|
| Client management | Yes — contacts, addresses, credit notes |
| Quotes | Yes — convert to invoices |
| Recurring invoices | Yes — daily, weekly, monthly, yearly |
| Tax rates | Yes — multiple rates, compound tax |
| Multi-currency | Yes |
| PDF generation | Yes — built-in |
| Email sending | Yes — via SMTP |
| Payment tracking | Manual recording only |
| API | Yes — REST API |
SMTP Configuration
To send invoices via email, configure SMTP in the application settings or via environment variables:
environment:
SOLIDINVOICE_MAILER_DSN: "smtp://user:[email protected]:587"
Customization
SolidInvoice supports:
- Custom invoice templates (HTML-based)
- Company logo upload
- Multiple tax rates per region
- Invoice numbering format customization
- Terms and conditions per quote/invoice
Reverse Proxy
Forward traffic to SolidInvoice’s port 8765:
invoices.example.com {
reverse_proxy solidinvoice:8765
}
See Reverse Proxy Setup for detailed configurations.
Backup
# Database backup
docker exec solidinvoice-db mysqldump -u solidinvoice -p solidinvoice > \
solidinvoice-backup-$(date +%Y%m%d).sql
# Application data backup
docker run --rm -v solidinvoice-data:/data -v $(pwd):/backup alpine \
tar czf /backup/solidinvoice-data-$(date +%Y%m%d).tar.gz -C /data .
See Backup Strategy for automated approaches.
Troubleshooting
Setup Wizard Fails to Connect to Database
Symptom: Database connection error during initial setup.
Fix: Ensure MySQL is fully started before SolidInvoice. Check that SOLIDINVOICE_DATABASE_PASSWORD matches MYSQL_PASSWORD exactly:
docker compose logs solidinvoice-db
Wait 30-60 seconds after starting the stack for MySQL to initialize.
Invoice PDF Generation Fails
Symptom: PDF download produces an error or blank file.
Fix: Check that the var directory is writable:
docker exec solidinvoice ls -la /var/www/html/var/
If permissions are wrong, fix them:
docker exec solidinvoice chown -R www-data:www-data /var/www/html/var
Emails Not Sending
Symptom: Invoices are created but email notifications fail silently.
Fix: Verify your SMTP configuration. Test with a simple mail:
docker exec solidinvoice php bin/console swiftmailer:email:send
Check that port 587 is not blocked by your host firewall.
Resource Requirements
- RAM: 256-512 MB idle, 512 MB - 1 GB under load
- CPU: Low — PHP handles requests synchronously
- Disk: Application is small; grows with invoice attachments and PDFs
| Deployment | RAM | Storage |
|---|---|---|
| Solo freelancer (< 100 invoices/year) | 256-512 MB | < 1 GB |
| Small business (100-1,000 invoices/year) | 512 MB - 1 GB | 1-5 GB |
Verdict
SolidInvoice is a solid choice for freelancers and small businesses that need basic invoicing without the feature overload of Invoice Ninja. It generates professional PDFs, tracks payments, handles recurring invoices, and manages clients. The key limitation: no payment gateway integration — you record payments manually. For automated payment processing (Stripe, PayPal), choose Invoice Ninja instead. For straightforward “create invoice, email it, mark it paid,” SolidInvoice does the job with less complexity.
Related
Get self-hosting tips in your inbox
Get the Docker Compose configs, hardware picks, and setup shortcuts we don't put in articles. Weekly. No spam.
Comments