Admin doesn't work in production

default discord avatar
.lucascamargo
2 months ago
8

Admin route does not work with the application in production hosted on vercel. I'm using custom-server. Locally it works, in prod it doesn't.

  • default discord avatar
    notchr
    2 months ago

    Hello @.lucascamargo ! Good morning



    When setting up payload to be on a different url, like

    /payload


    there is some additional configuration



    check out:

    https://nouance.io/articles/how-to-host-payloadcms-on-a-subdomain-and-subpath-with-nginx


    Which has some solid information about payload base route changes



    If you still need help after, let us know!

  • default discord avatar
    .lucascamargo
    2 months ago

    Helloo. hmm, understood. I also tested it without this additional configuration that I made "/payload", and it still wasn't working.



    can you help me?

  • default discord avatar
    notchr
    2 months ago

    Good morning!



    Hmmm



    @.lucascamargo Could you please give me a little context for the issue - happy to help!



    For instance, is this based on a template or the default installation of payload?

  • default discord avatar
    .lucascamargo
    2 months ago

    I just cloned the official repo and tried to upload the custom-server on vercel. But the admin route doesn't work.

  • default discord avatar
    notchr
    2 months ago

    hmm



    Can you share some of the errors youre getting?



    Admin route not working generally means an initial config issue

  • discord user avatar
    jarrod_not_jared
    Payload Team
    2 months ago

    @.lucascamargo what repo?

  • default discord avatar
    .lucascamargo
    2 months ago
    https://github.com/payloadcms/payload/tree/master/examples/custom-server


    I just cloned and tried to climb the vercel. I don't know if I need to do any additional configuration for this to work

  • discord user avatar
    jarrod_not_jared
    Payload Team
    2 months ago

    Custom servers cannot be deployed on Vercel, Vercel is

    serverless

    . We do have a repo that will deploy serverless:

    https://github.com/payloadcms/next-payload-demo

    Please read the "Known gotchas" in the README though.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.