Nuxt 3 Release Candidate is out! Discover more about it on v3.nuxtjs.org

Deploy Nuxt on Heroku

How to deploy Nuxt on Heroku?


We recommend you read the Heroku documentation for Node.js .

You can set up and configure your app via the Heroku dashboard or the Heroku CLI .

First, we create our app. Then we add the Node.js buildpack and configure the app to listen on the host 0.0.0.0:

heroku create myapp
heroku buildpacks:set heroku/nodejs
heroku config:set HOST=0.0.0.0

Your app's Settings section on the Heroku dashboard should contain this:

nuxt config vars Heroku

Finally, we can push the app on Heroku with:

git push heroku master

To deploy a non-master branch to Heroku use:

git push heroku develop:master

where develop is the name of your branch.

You can optionally configure automatic deploys from a selected branch of your app's GitHub repository in the Deploy section of your app in the Heroku dashboard.

Voilà! Your Nuxt application is now hosted on Heroku!

Edit this page on GitHub Updated at Tue, Aug 16, 2022