Report this

What is the reason for this report?

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

Posted on November 20, 2020

I deployed the following droplet https://marketplace.digitalocean.com/apps/invoice-ninja It’s currently hosted as https://marketplace.digitalocean.com/apps/invoice-ninja at 134.122.33.63 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 https://marketplace.digitalocean.com/apps/invoice-ninja does not mention any additional steps. Ideally, this droplet should work without me having to troubleshoot any issues like this.



This textbox defaults to using Markdown to format your 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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.