Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Server url not setting properly on production

default discord avatar
geersing2 years ago
2

I have trouble getting the server url right on production. I have set the

serverUrl

property to

process.env.SERVER_URL || http://localhost:4000

. That env variable is also set inside the docker container to the production url. But when I open it is stuck on the first user screen having the popup loading in the middle.

  • discord user avatar
    jmikrut
    2 years ago

    use the variable name

    process.env.PAYLOAD_PUBLIC_SERVER_URL

    because if you don't prefix your env var with

    PAYLOAD_PUBLIC_

    , it won't be accessible in your admin panel



    if you

    do

    prefix it like that, we will automatically expose it for you

  • default discord avatar
    geersing2 years ago

    Yup, that fixes it. Thanks!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.