Updating zip install 4.5.23

Hi everyone,

I have installed v4.5.23 via zip file and want to update to the last v4.x to prepare for v5. I have read that via zip install it should update automatically, but it doesn’t. So I have read more and came to https://invoiceninja.github.io/docs/self-host-updating.

Ok, the ninja folder belongs to www-data.
Ok, I have installed git.
What is the scheduler? Is that this one?

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

So the path is where I have unzipped the download I guess, but it doesn’t do anything. I see in the logs that it starts, but nothing more.

If I run php artisan schedule:run manually, I get:
No scheduled commands are ready to run.

So, my question is:
What is the right way to update or what am I missing?




There’s info on updating v4 here:


1 Like

Thanks, hillel, that was easy. :slight_smile: I am on 4.5.34 now.

Does it work on selfhosted zip install the same way for v5 or do I need to do extra work?

Sorry, I’m not sure I understand.

To upgrade from v4 you need to install v5 as a separate app and then use the migration tool in the latest version of v4 on Settings > Account Management.

Oh, I see. I have thought when updating v4 was that easy, going to v5 is eventually too. :slight_smile:

So that means I could unpack the v5 zip to another folder on my webserver and use the migration tool inside v4?

Yup, that is correct

Thanks for your time, hillel, very appreciated. So, let’s say, the folder was ninja4, I unpack v5 to ninja5, the new active folder will be ninja5 and ninja4 could be deleted if everything works?

Yup, that’s right

When you complete the migration v5 will be in a deactivated state, once you’re happy you can activate and switch over.

Sorry, I don’t understand how to migrate. I would like to be able to migrate to the same domain and machine v4 is on. I have put v5 in the folder /var/www/html/ninja5, v4 resides in /var/www/html/ninja.

When pointing the webserver to /ninja5, it is like a new install, isn’t it? Or do I need to have a new domain for v5? So, when using the migration tool inside v4 I need to link to the new app domain? That couldn’t be the right migration way, couldn’t it?

Both apps can be on the same server/domain, you can put the two versions in different folders or subdomains.

If I have bill.gates.com (for example), I could do the migration still with bill.gates.com? Or do I need bill5.gates.com? How would the migration tool know if there is a second folder for v5? :exploding_head:

You would need to either use a different subdomain or a subfolder

I see. Thanks for your patience. Now I have understood. So, let’s go to v5. Thank you so far, hopefully the migration will be successful. :crossed_fingers:

Of course it doesn’t work. Do I have to have the v5 running, so not only to have got the setup screen?

Ok, if that’s the case, setting up was fine, but logging in gives me: Error 500.

Can you please check for details about the error in storage/logs/

[2021-03-05 11:04:38] production.ERROR: Trying to get property ‘id’ of non-object {“userId”:1,“exception”:"[object]
(ErrorException(code: 0): Trying to get property ‘id’ of non-object at /var/www/html/ninja5/app/Models/User.php:16
#0 /var/www/html/ninja5/app/Models/User.php(161): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(
8, ‘Trying to get p…’, ‘/var/www/html/n…’, 161, Array)

As I have to setup a fresh install, should I also create a new DB for that?

Yes, v5 needs its own database

1 Like