[SOLVED] V5 installed via docker 500 error on pdf generation


I’ve installed v5 on Ubuntu 20.04 server using the docker instructions provided on the GitHub.

I cannot view pdfs for invoices or quotes, I keep getting a 500 | Internal Server Error.

I’ve tried going through the issues posted on GitHub and the suggestions posted in both the forum and the troubleshooting section but to no avail.

Any help please?

I’d set things up for the chromium renderer… it generally well for me. Quotes in the .env file can also cause 500 errors.

Check your /var/www/html/ninja/.env file and set:


an remove the quotes around /usr/bin/chromium-browser in the following:


Perhaps you’d also need chromium-browser installed…

Hi Cwl,

I’ve tried both ways currently on the chromium, I’m using the docker-compose file provided, so I’m not 100% where the env file is as it’s not in the docker instructions.

I’d have thought that the chromium binaries are part of the docker images pulled as part of the docker-compose up command? Or do I need it on my host system?

EDIT: Removing the quotes from the line:


Within the docker-compose.yaml file worked a treat and now it’s all working

Thanks Cwl for the inspiration!

1 Like

Great… glad you made the progress needed.

I’ve been confused about the .env file too with docker-compose. The idea is this:

#1. Don’t use any “environment” statements in your docker-compose.yml file. I had started using them, and I just copied them - eventually to be added to the .env file.
#2. In your docker-compose.yml under the invoiceninja “app” section include a reference to “env file: .env”

#3. So, with that, you create the actual file, and it’s supposed to go in the same directory as your docker-compose.yml file. For me, I had done the git clone of “dockerfles,” so my .env file is in that folder on the server.

#4. As to what the .env looks like, here’s the example provided with the InvoiceNinja binaries. You just place that in the .env and edit to suit your environment and then do docker compose up - all of those environment variables will populate into your container and update from there.