Just to add to Stevan's reply: if you're using Vite, any variables with the VITE_ prefix are statically replaced at build time. So if you build locally, the build will use your local VITE_ variables not the server’s .env. Make sure the correct values are set before building.