Self Hosted Version 5 Setup Errors

Hi Community

I have a fresh V 5.2.17 installed.

The SMTP function doesn’t work. I have to set the option to ‘MAIL’ and use my smtp settings for it to go through. I do get the test email successfully but find the 500 | Server Error.

At this point, I find this in the LAVAREL LOG:
[2021-08-08 09:13:48] production.INFO: db fails
[2021-08-08 09:22:05] production.INFO: Mailer [mail] is not defined.
[2021-08-08 09:22:05] production.INFO: account table not found
[2021-08-08 09:22:55] production.INFO: account table not found

I change the .env file to show error and modify the mail to smtp in the mail section:


This removes the mail config error but shows a database error namely: SQLSTATE[42S02]: Base table or view not found.

Here’s a summary below…

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘gadmimxhjjn_db6.accounts’ doesn’t existPDOException
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘gadmimxhjjn_db6.accounts’ doesn’t exist

I cannot get into the app or beyond this.


Can you confirm the database credentials in the .env file are correct.

Hi Hillel. Thank you for your reply. Yes, they are 100% correct. Any ideas for a fix?

Do you see the accounts table in the database?

It may help to run: php artisan migrate:fresh --seed

Thanks Hillel. Right now, it puzzles me that the database is empty. I am running a self hosted instance on a host. What would be the URL to use for this function php artisan migrate:fresh --seed?

You would need to run the command from the CLI

@david do you have any suggestions?

In this case, I guess I will have to get the host run this for me? Will hear from @david view perhaps? :slightly_smiling_face:

calling the route /update?secret=

will attempt to migrate and seed your database, that would be the first thing to try.

Thanks @david … I am now getting this error now that I can log in:

Error: please check that Invoice Ninja v5 is installed on the server

@eddie Most likely your APP_URL isn’t configured to the correct endpoint. You may be missing a /public somewhere.

@david I am going to rather try another installation (fresh installation) on another domain with a fresh database again. Which version (instance) would you suggest I go for? Is v5.2.17 stable? I found it on github?

5.2.17 is stable for sure.