Recently, Lee Robinson of Vercel gave a tutorial on how to self-host NextJS in a VPS. He used DigitalOcean. I also tried it in Hetzner using Ubuntu instance and it worked. The example used Docker to deploy NextJS. It has all the dependencies like Nginx and a Postgres database, also run in Docker.
Full article