Admin page returns a blank page

Hi, I have a problem. I have a NextJS app with Strapi backend for blog posts. Everything is Dockerized and I use NGINX for routing NextJS to / and Strapi calls to /api. Everything works well on my machine on localhost and I can connect from other devices on the same network.

But when I try to run on a VPS online, the admin page just won’t load. Every else API point loads fine, but not the admin. My full code is here: GitHub - kristianka/kristiankahkonen.com: Portfolio and blog site - Kristian Kähkönen

The Strapi .env file is pretty standard, just database/strapi credentials. The server URL in there is URL=https://kristiankahkonen.com/api/ which is referenced in strapi/config/server.js.

I have been troubleshooting this since yesterday, tried ChatGPT, Copilot and tons of StackOverflow answers and read Strapi documentation but no dice.

https://kristiankahkonen.com/api/
https://kristiankahkonen.com/api/admin

This topic has been created from a Discord post (1261382799274020884) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

No errors on console

nginx

    worker_connections 1024;
}

http {
    # Redirect HTTP to HTTPS
    server {
        listen 80;
        server_name kristiankahkonen.com www.kristiankahkonen.com;
        return 301 https://$server_name$request_uri;
    }

    # Allow only HTTPS connections for security reasons
    # Using Cloudflare Full (strict) SSL/TLS, so no extra headers/proxy_ so it works
    # you may want to add some headers if not using Cloudflare
    server {
        listen 443 ssl;
        server_name kristiankahkonen.com www.kristiankahkonen.com;

        ssl_certificate /etc/nginx/certs/domain.cert.pem;
        ssl_certificate_key /etc/nginx/certs/private.key.pem;

        location / {
            proxy_pass http://nextjs:3000;
        }

        # Strapi API
        location /api/ {
            proxy_pass http://strapi:1337/;
        }
    }
}```

Seems like running with NODE_ENV=development flag fixes this. How bad is it to run like this? I found this issue so I’m not the only one: Deployment on different servers not working · Issue #19330 · strapi/strapi · GitHub