# Render

✋ CAUTION

This third-party deployment guide might not be up-to-date with Strapi v4. Contributions (opens new window) are most welcome.

This guide explains how to update an existing Strapi project so it can be deployed on Render (opens new window).

With persistent disks and managed PostgreSQL databases, Render gives you multiple different ways to store your content. Render services come with fully managed SSL, so it's no longer necessary to set up a proxy server to secure your Strapi app. Since Render services are automatically restarted if they become unresponsive, you don't need to use a process manager like pm2 either.

💡 TIP

For more information consult Render's Deploy Strapi guide (opens new window).

# Step 1: Create a Render Account

Visit the Render dashboard (opens new window) to create an account if you don't already have one.

# Step 2: Choose Your Content Storage Method

You have to choose which database system to use for storing structured content, and where to store uploaded media library files.

Below are descriptions of 3 approaches that make different trade-offs between scalability, availability, simplicity, and cost.

# Step 3: Add a render.yaml File

Select the render.yaml file (opens new window) that matches your storage preferences and add it to the root of your Strapi project.

Alternatively, you can manually configure your service and database in the Render dashboard, instead of using infrastructure as code (opens new window).

# Step 4: Configure Strapi for Production

Copy config/env/production and its contents from the example repository that corresponds to your storage preference.

If you attach a custom domain (opens new window) to your Render service, use it as the url attribute in server.js.

For PostgreSQL, install the pg package from npm. If you're using Cloudinary, install strapi-provider-upload-cloudinary.

💡 TIP

The Configuration doc has more info on configuring Strapi

# Step 5: Deploy

  1. Commit your changes and push them to GitHub or GitLab.
  2. In the Render dashboard select YAML in the side navigation and click the New From YAML button.
  3. Give Render permission to access your GitHub or GitLab repository if you haven't already.
  4. Select the repository and branch for your Strapi project and follow the prompts that appear. If you're using Cloudinary, you'll be asked to enter your account credentials as environment variables. Render encrypts environment variables and stores them securely.

# Step 6: Scale

For vertical scaling, upgrade your service to a plan with more CPU and RAM per instance. If you're using a managed database you can upgrade its plan as well. Visit Render's pricing page (opens new window) and consider the recommended requirements in choosing the best plan for your needs. To upgrade, change the plan field(s) (opens new window) in your render.yaml file.

Render services without attached disks can be horizontally scaled. Add a numInstances field (opens new window) in your render.yaml file to get multiple instances of your Strapi application running in parallel. Render automatically load balances requests among your instances.

For manually-managed infrastructure you can change the plan and number of instances from the Settings tab in the Render dashboard.