shootify's picture

Hello guys, when are you going to upload or have available ninja invoice V5... looking forward. thanks

Jeremy Davis's picture

Hi there. Firstly, a warm welcome to TurnKey! :)

Next up, yes we do plan to. Ideally it will be sooner rather than later, but there is currently blocker.

For v4.x, we provided a local install of PhantomJS to do the PDF generation. However, PhantomJS is abandonware and isn't being maintained. As such, the InvoiceNinja devs don't provide support for locally installed PhantomJS in v5.x. That's probably wise. So the options for processing PDFs are the online PhantomJS service (which is free, but requires that your Invoice Ninja server is public facing; and you need to trust the service to process your PDFs) or a local Chrome install. (Whilst the docs say "Chrome", it's open source cousin; Chromium should work fine, and that's what we'd use - so from here on in when I say "Chrome", please read "Chromium").

For us, the requirement of a 3rd party service is unacceptable. If you are happy to use the 3rd party service, then that's fine. But we don't want to make that decision for you... So that leaves using Chrome. The problem there is that whilst the actual functionality is headless (i.e. you can use Chrome via the commandline to generate the PDFs) there isn't a minimalist headless Chrome install. Installing Chrome on TurnKey makes the image ~500MB bigger! So that's unacceptable too!

I have some ideas of how we might move forward, but I we're currently in the process of rebuilding/refreshing the library. So I don't currently have the time or energy to test them out and play around...

shootify's picture

thank you very much for letting me know. hopefully you can get it working since they already released it. 

Peter McGrath's picture

FWIW SnapPDF seems to be a good alternative to PhantomJS. Invoice Ninja V5 is working for me with SnapPDF.
Jeremy Davis's picture

Thanks for posting Peter. That's useful info.

Is there anything special required to install/include that? Or is it a default component if you do a manual install? I had a quick look at the install docs and couldn't find anything specific?! Although I did find a note recommending use of the built in snappdf package - so I guess it's included?!

Regardless, I do hope to create a new Invoice Ninja5 appliance in the not too distant future. However, Debian 11/Bullseye is very close to release, so it won't happen until after that...

Peter McGrath's picture

Ive always built Invoice Ninja on CentOS so not sure about Debian but it should work similar. The read me for snap PDF is here: snappdf/ at master · beganovich/snappdf · GitHub I had some issues but created a post about what fixed SnapPDF for me here SnapPDF on CentOS8 - Self-Hosted | v5 - Discourse ( Having said that  I think this is somewhat out of date as when i install the latest version of invoice ninja all of the dependencies seem to already be there. You just have to edit the .env file (for me thats in /var/www/html/ninja and change PDF_GENERATOR=snappdf Then whenever editing .env I run:
sudo -u nginx php artisan optimize
Jeremy Davis's picture

Thanks for sharing Peter! :)

kebel87's picture

Thanks Jeremy, I'll be amongst those interested in using invoiceninja v5 when it will be ready. 
Lee Chambers's picture

Just wondering if there was any progress with invoice ninja v5 yet?, if not is there a way of installing it on the turnkey lamp stack as now they have unsupported v4 and v5 is now the only version that is recieving fixes along with the mobile app ... i would have a go myself but really have no clue where to start with linux but v4 is now starting to cause problems, Thanks in advance
Jeremy Davis's picture

We're currently still busy working on v17.0. Once we have Core and TKLDev released as stable v17.0, then LAMP should be fairly close behind. Once that's done, then work can start on Invoice Ninja v5.

And unfortunately, it seems that you can't just upgrade. You need to migrate. I was going to suggest that you try installing v5 alongside and do the migration. However, it looks like Invoice Ninja v5 requires PHP 7.4. You'll need (the as yet unreleased) TurnKey v17.x to get that by default (although you could install PHP from third party).

Having said that, I note that they published "Minor fixes" for v4; v4.5.48 - 5 days ago. So whilst it may not be getting new features, it does appear that they are still providing some degree of maintenance.

Regardless, hopefully we can push it out in the coming months...

Lee Chambers's picture

im not seeing a way to update v4 within invoice ninja itself to obtain any of the fixes for v4, there must be a secret im unaware of, they have removed the mobile app for v4 off the playstore now and the only app published only works with v5 
Jeremy Davis's picture

I'm not sure, but my guess is that you need to manually download the update and copy it over the existing files. Don't do that without a backup though; just in case... Actually, yep looks like I'm right.

Bugger about the app though. Until you have v5 you may need to just use the web UI. I'm sure that sucks, but unfortunately I can't go any faster than I already am...

Some quick pointers:

By default the user is "root", but the webserver user needs ownership of the /var/www/invoiceninja files. Do that like this:

chown -R www-data:www-data /var/www/invoiceninja

The docs not using composer and artisan, again, these need to be run as the www-data user. You can do that with the included 'runuser' command (or 'su') or you can install 'sudo' and use that instead.

runser (or su - the format is exactly the same):

runuser - www-data -s /bin/bash

Or sudo:

apt update && apt install sudo -y
sudo -u www-data COMMAND
sudo -u www-data ANOTHER_COMMAND

Add new comment