Error when deploy adonis app on heroku

I think that might answer your question :


Thanks @CrBast


I have tried the above one but, no use still getting the same issue.

Adonis needs APP_KEY to be defined as an environment variable.

  1. Generate one in your local terminal with adonis key:generate

  2. Open your .env file. You should now have APP_KEY=hM6Dw7upoPA7gFHZShefy539oFq2n2KC inside.

  3. Read this to learn how to add environment variables to Heroku. Add the APP_KEY environment variable.


Thanks @ LeCoupa
Its working
I have already APP_KEY in .env file
just i run this command, its working

heroku config:set APP_KEY= <your Adonis APP_KEY> 

Thanks a lot


Yes, I don’t think Heroku is reading the .env file. Always define your environment variable in production with:

heroku config:set ...
1 Like