Question

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

Posted November 20, 2020 1.6k views
DigitalOcean 1-Click Apps MarketplaceDigitalOcean Droplets

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.

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.

×
Submit an Answer
1 answer

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.