Account and data deletes itself after a few hours


I’ve deployed strapi on heroku, registered and starting posting content. I use nextjs to access this content on the frontend but this does not matter.

The problem is that after a few hours, it asks me to register an account again on strapi, and when I do, all my old data is lost. I try the auth/login end point but I just get redirected back to the register page.

I’m hoping I can get this sorted out as I do like strapi, but this is unacceptable and i’m thinking of trying instead.



Please read this:

As a short answer: That’s not a strapi’s issue. Heroke deletes everything from the server each time the dyno is restarted. That’s how heroku is working.

To keep your data:
-Database - Do not use sqlite, instead use a dedicated DB.
-Files (Uploads) - Use an upload provider like cloudinary and store your uploaded files outside the heroku’s dyno.