How to install Invoice Ninja v5 on Digital Ocean Plesk Ubuntu Image?

Hi,

From the forum, I gathered there are users of Plesk running Invoice Ninja. Just wondering if anyone has tips on the installation & configurations?

Here are the software versions (Plesk Hosting | DigitalOcean Marketplace 1-Click App):

  • OS - Ubuntu 20.04
  • Plesk - 18.0.42 Update #1
  • PHP - 7.4.28
  • MariaDB - 10.3.34
  • Invoice Ninja - v5.3.79

I have a WordPress website on the xxdomain.com running on Plesk and it works fine.

I’m trying to install on a subdomain referring to the guide. On a vanila setup of Plesk, I copied the invoiceninja.zip to the document root at say, invoice.xxdomain.com and point browser to invoice.xxdomain.com/setup. Unfortunately it brings to “500 - Server Error”, so the Invoice Ninja setup page did not display.

There are not much logs:

Plesk - Apache SSL/TLS access

storage/logs - empty

I believe it’s some nginx / apache configurations needed. Looking for ways to input the options through Plesk panel. Any ideas?

Thank you.

Hi,

Are there any errors in the web server error logs?

@david any thoughts?

@hillel

I have just moved the Invoice Ninja files folder to root domain folder (i.e. xxdomain.com), and it’s having the same 500 server error.

For Plesk, the current setting is PHP runs as ‘FPM Application Served by Apache’, and Nginx proxies requests to Apache.

So far there isn’t much from the web server logs.

In /var/www/vhosts/system/xxdomain.com/logs, there are few log files:

  • access_log (N.A.)
  • access_ssl_log
  • error_log (N.A.)
  • proxy_access_ssl_log
  • proxy_error_log (N.A.)

When accessing either xxdomain.com or xxdomain.com/setup, here’s what I see:

access_ssl_log
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:30:53 +0800] “GET / HTTP/1.0” 500 7181 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:31:04 +0800] “GET / HTTP/1.0” 500 5732 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 Edg/100.0.1185.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:31:24 +0800] “GET /setup HTTP/1.0” 500 5736 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:31:28 +0800] “GET / HTTP/1.0” 500 5732 “-” “Go-http-client/1.1”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:32:09 +0800] “GET / HTTP/1.0” 500 5732 “-” “Go-http-client/1.1”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:33:15 +0800] “GET /setup HTTP/1.0” 500 5736 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:33:50 +0800] “GET / HTTP/1.0” 500 5732 “-” “Go-http-client/1.1”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:34:53 +0800] “GET /setup HTTP/1.0” 500 7185 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:35:40 +0800] “GET /setup HTTP/1.0” 500 7185 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:35:52 +0800] “GET / HTTP/1.0” 500 5732 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:35:58 +0800] “GET / HTTP/1.0” 500 5732 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 Edg/100.0.1185.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:36:53 +0800] “GET / HTTP/1.0” 500 5732 “-” “Go-http-client/1.1”

proxy_access_ssl_log
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:28:14 +0800] “GET /public/vendor/cookieconsent@3/cookieconsent.min.js HTTP/2.0” 200 20693 “https://xxdomain.com/public/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 Edg/100.0.1185.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:28:14 +0800] “GET /public/vendor/[email protected]/alpine.js HTTP/2.0” 200 80898 “https://xxdomain.com/public/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 Edg/100.0.1185.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:28:14 +0800] “GET /public/vendor/cookieconsent@3/cookieconsent.min.css HTTP/2.0” 200 4958 “https://xxdomain.com/public/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 Edg/100.0.1185.36”
xxx.xxx.xxx.xxx - - [12/Apr/2022:14:28:14 +0800] “GET /public/images/client-portal-new-image.jpg HTTP/2.0” 200 637229 “https://xxdomain.com/public/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 Edg/100.0.1185.36”

When accessing xxdomain.com, it should get ‘setup’ going for Invoice Ninja. But in this case it is not and just displaying 500 server error. Would Invoice Ninja have captured any logs?

Could the document root or any other settings causing issues?

Thank you.

If there are no error logs generated in storage/logs/ then it will be a permissions issue.

Turn on Debug mode

@david

As installation didn’t begin, .env wasn’t created so I’m unable to set it (also laravel.log is not created yet). Or is there a way to enable debug mode prior to running setup and before seeing the 500 server error?

I was doing a random installation of a lower version v5.2.14, and it goes into the setup screen! Here’re some tests I’ve done on the same Plesk setup with different versions of Invoice Ninja installations:

  • v5.3.79 - fail
  • v5.3.77 - fail
  • v5.3.66 - fail
  • v5.3.52 - fail
  • v5.3.40 - fail
  • v5.3.32 - fail
  • v5.3.31 - fail
  • v5.3.30 - fail
  • v5.3.29 - can setup
  • v5.3.19 - can setup
  • v5.3.10 - can setup
  • v5.3.2 - can setup
  • v5.2.14 - can setup

Is there something that has changed in the setup process starting v5.3.30 that could prevent installation on Plesk to fail with error 500?

Thank you.

@david wondering if you have any idea about the observation above?

@myinvoice

So to confirm,

After copying the files over did you copy the .env.example file to .env ?

Are you attempting to reach to /setup URL ?

@david

I have just extracted the invoiceninja.zip files into webroot folder created on Plesk, and accessing accessing either xxdomain.com or xxdomain.com/setup without copying the .env.example file to .env file.

I’m looking at the guide again, did I miss this step?

Could this explain why it used to work without need to copy the sample .env file, since the zip package had the .env on v5.3.29 and below?

Yes I was just trying to do a new installation on virtualhost on Plesk…

Thank you.

@myinvoice

Yes, this could be it. Does copying the .env over fix the issue?

@david

Thank you for pointing out. It’s good now!

1 Like