I've been asked several times to install InvoiceNinja, and no matter how I tried, it never seemed to work, but gave errors in the log every single time.  So, I started looking for other open source invoicing solutions.  I tried a bunch of them.  Invoice Lion, Crater, Invoice Ninja, Invoice Plane, and several others, and none of them would install correctly, or were intuitive enough to get running, or had decent documentation.

Then, I found Solid Invoice.  It took a little bit of effort to create a Docker Compose file that would setup both the DB and the Solid Invoice image together, but minimal effort at best.  So, today, we are going to go through installing Solid Invoice, an open source, self hosted invoicing system.

What you'll need

  • A server to run it on (this can be a VPS like on Digital Ocean, or a personal computer).
  • Docker-CE (Community Edition) installed
  • Docker-Compose installed
  • A Domain / Sub-domain for the solid invoice install with an A Record pointed at your server's public IP address (optional, but recommended)
  • NGinX Proxy Manager (optional, but recommended)
  • About 30 minutes to an hour of time.

Installing Docker-CE and Docker-Compose

I have several script sfor various Linux distros on my github page. If you'd like to use one of these scripts, I highly recommend it.

GitHub - bmcgonag/docker_installs: Docker and Docker-Compose install scripts for various linux distros and versions
Docker and Docker-Compose install scripts for various linux distros and versions - GitHub - bmcgonag/docker_installs: Docker and Docker-Compose install scripts for various linux distros and versions

Just do a git pull, or click on the version you want, and highlight the entire script code.

Now on your server where you'll run Dolibarr, create a new file called docker-install.sh.

nano docker-install.sh

Now pasted the contents into this file (for Linux you can use CTRL + Shift + V to paste).

Save the file with CTRL + O, then Enter, and exit nano with CTRL + X.

Now change the file permissions to make it executable.

chmod +x docker-install.sh

Now you can run the script with the command

./docker-install.sh

Allow the script to finish.  Once complete, you can log out and back in, or reboot the server.  This will allow your user to run docker commands without having to use the sudo keyword each time.

Install NGinX Proxy Manager

I have covered this on several other videos and posts, so I'll link the post here if you need to install this application.

Putting it All Together
Putting it all together Using Docker, Docker-Compose, Port Forwarding, and NGinX Proxy Manager all together to host multiple servers. Almost all of my content covers installing a free, open source, self hosted server or service. Occasionally I cover an open source application or tool that isn’t ru…

Install Solid Invoice using Docker-CE and Docker-Compose

On your server create a new folder called "solidinvoice", then move into that folder:

mkdir solidinvoice

cd solidinvoice

Now create a new file called "docker-compose.yml" and open it for editing:

nano docker-compose.yml

Now, copy the script below, and paste it into the editor.  If you are editing in nano as I suggest, then you can paste with the hotkey combination CTRL + Shift + V.

version: "3.3"

services:
  db:
    image: "mysql:5.7"
    volumes:
      - /home/brian/solidinvoice/db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_DATABASE: solidinvoice
      MYSQL_ROOT_PASSWORD: "your_super_complex_password_here"
      MYSQL_USER: "solidinvoice"
      MYSQL_PASSWORD: "your_super_complex_different_password_here"
  app:
    image: solidinvoice/solidinvoice
    depends_on:
      - db
    ports:
      - "8000:80"
    restart: always

volumes:
  db_data: {}

Now, save that file with CTRL + O, then Enter, then CTRL + X.

Next, create the folder "db_data" inside your solidinvoice folder:

mkdir db_data

Finally, you can run docker-compose up -d to start pulling down the Solid Invoice, and MySQL images and get them up and running.

Once they've completed, and you see the "done" message for each in the terminal, give it a few minutes, then see if you can reach your site at it's IP address, or domain / subdomain name and port 8000.

For me, I used:

http://invoice.opensourceisawesome.com:8000

Test it out at https://invoice.opensourceisawesome.com , and use the following credentials

user: demo@demouser.fake
password: DemoUser1234

Once I saw that it loaded the system checks page, I moved on to setup my NGinX Proxy Manager entry and my Lets Encrypt certificates for SSL.

Follow along in the video for setting up a domain, NGinX Proxy Manager host entry, and LetsEncrypt.

Also, check out the video for the basic setup of Solid Invoice.

Support my Efforts at Patreon

Support my Channel and ongoing efforts through Patreon: https://www.patreon.com/bePatron?u=234177