Almost EVERYONE who tried headless systems said they saw benefits. Download the state of CMS now!

Storyblok now on AWS Marketplace: Read more

O’Reilly Report: Decoupled Applications and Composable Web Architectures - Download Now

Empower your teams & get a 582% ROI: See Storyblok's CMS in action

Skip to main content

Setting Up HTTPS on localhost in Nuxt 3

  • FAQ
  • Setting Up HTTPS on localhost in Nuxt 3

During development, apps are usually served via HTTP. However, Storyblok v2 requires your app to be served via HTTPS. Please follow the steps below to enable this in a Nuxt 3 project.

  • Install mkcert on your system The installation instructions for macOS, Windows and Linux can be found in the mkcert Github repository.

  • Create a valid certificate by running the following command in your project folder:

mkcert localhost
  • In the project's package.json, change the nuxt dev command to the following:
NODE_TLS_REJECT_UNAUTHORIZED=0 nuxt dev --https --ssl-cert localhost.pem --ssl-key localhost-key.pem