Invoice Ninja Droplet not working: Error: app is already configured, backup then delete the .env file to re-run the setup

I deployed the following droplet It’s currently hosted as at When I accessed that IP, I got a message that Invoice Ninja was being installed, then got redirected to a page saying:" Error: app is already configured, backup then delete the .env file to re-run the setup:"

The droplet is not working properly, since I expected to get to the Setup screen but I got an error instead. The documentation at does not mention any additional steps. Ideally, this droplet should work without me having to troubleshoot any issues like this.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I experienced the same thing - whilst I didn’t actually do any sort of troubleshooting, I assume the deployment might have needed a droplet with more RAM causing something like composer to fail or take a long time. The documentation mentions Invoice Ninja updating when the Droplet is deployed so that could have been an issue as well.

The “fix” was relatively simple. I copied the .env file to .env.bak, reloaded the droplet IP, and could then see the setup page. I grabbed the mysql password from the .env.bak file I created, setup completed successfully and I can now sign in. Should take about 2 minutes to complete, if you want the steps involved here they are:

cp /var/www/html/ninja/.env /var/www/html/ninja/.env.bak
cat /var/www/html/ninja/.env.bak

The cat on the .env.bak file should be enough to see the database name and password so you can copy and paste into the Invoice Ninja setup page. Apologies this is not more technical, I was just spinning up a preview on the spot for a client.