After deploy, I can't access admin page

  1. Check build logs: Make sure there are no errors in the build logs. You can access the build logs from the DigitalOcean App Platform dashboard. If there are any errors, try to address them and redeploy the application.
  2. Verify environment variables: Ensure that you have set the correct environment variables required by Strapi, such as DATABASE_URL, ADMIN_JWT_SECRET, etc. You can verify and manage these environment variables from the DigitalOcean App Platform dashboard.
  3. Check the Strapi public path: Sometimes, the issue could be related to the public path configuration. In your Strapi project, open the config/server.js file and ensure that the admin.path and admin.build.backend values are set correctly:
module.exports = ({ env }) => ({
  // ...
  admin: {
    // ...
    path: '/admin',
    build: {
      backend: env('ADMIN_BUILD_BACKEND', 'https://your-app-url.com'),
    },
  },
});

Replace https://your-app-url.com with the correct URL for your DigitalOcean App Platform deployment.

  1. Rebuild the admin panel: In case there is an issue with the built admin panel, you can try rebuilding it by running the following command in your Strapi project directory:
npm run build

This command will rebuild the Strapi admin panel. After the build is complete, commit the changes and redeploy the application on DigitalOcean App Platform.

  1. Check the routing rules: Ensure that the routing rules are correctly set up in the DigitalOcean App Platform. You can check the routing rules by navigating to the ‘Components’ section in the DigitalOcean dashboard. Make sure that the routing rules are set to forward all requests to your Strapi application.

If you’ve tried all these steps and the issue persists, consider sharing more details about your Strapi setup and any error messages you encounter. This will help in identifying the root cause of the issue and provide a more accurate solution.

1 Like