After deploy, I can't access and run localhost strapi

System Information
  • Strapi Version: 4.9.0
  • Operating System: Windows
  • Database: sqlite/postgresql
  • Node Version:
  • NPM Version:
  • Yarn Version:

After I deploy, I run with yarn develop but no longer has the sqlite database but postgresql (as on the deployment environment), is there a way to restore the previous sqlite database?
Meanwhile I also installed postgresql on Windows

Now I show you the error :
server wasnt able to start properly. [2023-04-25 12:56:24.840] error: middleware strapi::session: app keys are required. please set app.keys in confiserver.js (ex: keys: [mykeya, mykeyb]) error: middleware strapi::session: app keys are required. please set app.keys in config/server.js (ex: keys: [mykeya, mykeyb]) strapi

do you have different environment variables for local development and for production?

Hello @nicooh,

For the app keys error, check the following:

  1. config/server.js file to see if there is the following code inside the file:
// previous code
app: {
    keys: env.array('APP_KEYS'),
  },
// more code
  1. And the .env file should contain the app keys. You can create a few random keys (this is probably missing)

APP_KEYS=abcdefghijklmn==,abcdefghijklmn==

If you do not have a .env, use the .env.example to see how to create one.

As for the migration of data from sqlite to postgresql, you have to use some tool/plugin.

no, but I have two different environment database for production (postgresql) and for development(sqlite)