Deploy Nitro apps to Render.

Preset: render_com (switch to this preset)

Nitro supports deploying on Render with minimal configuration.

Set up application

  1. Create a new Web Service and select the repository that contains your code.
  2. Ensure the 'Node' environment is selected.
  3. Depending on your package manager, set the build command to yarn && yarn build, npm install && npm run build, or pnpm i --shamefully-hoist && pnpm build.
  4. Update the start command to node .output/server/index.mjs
  5. Click 'Advanced' and add an environment variable with NITRO_PRESET set to render_com. You may also need to add a NODE_VERSION environment variable set to 18 for the build to succeed (docs).
  6. Click 'Create Web Service'.

Infrastructure as Code (IaC)

  1. Create a file called render.yaml with following content at the root of your repository.

This file followed by Infrastructure as Code on Render

  - type: web
    name: <PROJECTNAME>
    env: node
    branch: main
    startCommand: node .output/server/index.mjs
    buildCommand: npm install && npm run build
    - key: NITRO_PRESET
      value: render_com
  1. Create a new Blueprint Instance and select the repository containing your render.yaml file.

You should be good to go!