Deploy Strapi 5 to Render with Postgres and Cloudinary

The standard way to run Strapi on Render is a Web Service (Strapi itself) plus Render Postgres (data) plus Cloudinary (images and other media). Render's free web services have no persistent disk, so uploaded images go to Cloudinary instead. This guide uses Strapi 5 (v5.65.0), the latest version as of December 2026, and covers the steps, what changed from v4, and the limits of running it on Render's free tier.

Updated December 2026: rewrote this previously unfinished post as a full Strapi 5 deployment guide. Strapi v4 reached end of support on April 30, 2026, so use v5 for new projects.

Architecture and prerequisites

This guide assumes you already have accounts on:

  • GitHub
  • Render
  • Cloudinary
RoleServiceKey points
Strapi (admin panel + API)Render Web Service (Node)Build: npm install && npm run build / Start: npm run start
DatabaseRender PostgresCreate it in the same region as Strapi and connect via the Internal Database URL
Media (images, video)CloudinarySwitch the storage target with @strapi/provider-upload-cloudinary

Strapi is an open-source headless CMS: you enter content in its admin panel and deliver it through REST or GraphQL APIs. It is often paired with a frontend such as Next.js, and deploying it to Render gives you an API server for free or at low cost.

Architecture of Strapi 5 on Render: Strapi runs on a Render Web Service deployed from GitHub on push, connects to Render Postgres via the Internal URL and to Cloudinary via the upload provider, and serves the API to the frontend
How the work is split between the Web Service, Postgres and Cloudinary

Strapi v5 vs v4 (what matters for deployment)

The original version of this post targeted Strapi v4. These are the changes in v5:

Itemv4v5 (December 2026)
Support statusEnd of support April 30, 2026 (last release 4.26.2)Latest release 5.65.0
Project creation commandnpx create-strapi-app@latestnpx create-strapi@latest (the old command still works)
Supported Node.js—v22 / v24 / v26 (LTS only; odd-numbered versions are not supported)
Default languageJavaScriptTypeScript (--js for JavaScript)
--quickstartAvailableDeprecated. Use --non-interactive
REST API responsesValues nested under data.attributesattributes removed, flat format. documentId is the identifier
Server-side data accessEntity Service APIDocument Service API (Entity Service deprecated)
PostgreSQL—Recommended 17.0, minimum 14.0

If your frontend expects v4-style responses (attributes), adding the request header Strapi-Response-Format: v4 returns the old format as a temporary measure. To migrate an existing v4 project, back up the database and use the official upgrade tool (there is no automatic way back from v5 to v4).

Limits on Render's free tier

As of December 2026, Render's official docs list these free-tier limits:

ServiceFree-tier limits
Web Service (Free)0.1 CPU / 512MB RAM. Spins down after 15 minutes without traffic and takes about a minute to start on the next request. No persistent disk: files saved locally are lost on redeploy, restart or spin-down. Up to 750 hours per month
Postgres (Free)1GB of storage. Expires 30 days after creation, and is deleted with all its data unless you upgrade to a paid plan within 14 days after that. One per workspace, no backups

Strapi's official deployment requirements are at least 1 CPU core and 2GB RAM (2+ cores and 4GB+ recommended). Render's free web service (512MB) falls below that, so treat the free tier as being for testing and learning only. For ongoing use, budget for a 2GB web service instance ($25/month) and a paid Postgres plan (from $6/month).

Because free Postgres stops working after 30 days, you can't keep running on the free tier indefinitely. To keep your data, upgrade to a paid plan before it expires, or take a dump and move it to another database.

Render's free web service has 512MB, below Strapi's 2GB minimum and 4GB+ recommendation. Free Postgres expires 30 days after creation and is deleted with its data after a 14-day grace period
Free-tier memory and the Postgres expiry (December 2026)

Step 1: Create a PostgreSQL database on Render

  1. In the Render dashboard, choose "+ New" → "Postgres"
  2. Set the name, region (the same region as the Web Service you will create next), PostgreSQL version (13 to 18) and plan, then create it
  3. Once it is created, copy the Internal Database URL from the database's page
Render Postgres connection details: Hostname, Port 5432, Database, Username, Password and Internal Database URL fields
Connection details on the database's page (Internal Database URL). Source: Create and Connect to Render Postgres (Render Docs)

The Internal URL works only from Render services in the same account and the same region, and traffic stays on Render's private network. To connect from outside, such as from your own computer, use the External URL instead; it always requires TLS (connections with sslmode=disable are rejected).

Step 2: Create the Strapi project locally

Create an empty repository on GitHub, then create the project locally. Use a Node.js LTS release, v22 or later.

npx create-strapi@latest strapi-render-project
cd strapi-render-project

When asked about the database, you can keep the default, SQLite (SQLite for local development, Postgres in production). When I ran npx create-strapi@latest while writing this article, it created a v5.65.0 project. config/database.ts switches the database with the DATABASE_CLIENT environment variable (sqlite / postgres / mysql) and, for Postgres, reads DATABASE_URL as the connection string. Random values such as APP_KEYS are generated in .env, which is excluded by .gitignore.

Next, add the PostgreSQL driver and the Cloudinary upload provider.

npm install pg @strapi/provider-upload-cloudinary

Step 3: Configure the Cloudinary upload provider

In the v5 template, config/plugins.ts already contains an upload setting (the allowed file types). Add provider and the related options to its config.

// config/plugins.ts (upload section only)
upload: {
  config: {
    provider: 'cloudinary',
    providerOptions: {
      cloud_name: env('CLOUDINARY_NAME'),
      api_key: env('CLOUDINARY_KEY'),
      api_secret: env('CLOUDINARY_SECRET'),
    },
    actionOptions: {
      upload: {},
      uploadStream: {},
      delete: {},
    },
    security: {
      allowedTypes: allowedMediaTypes,
      deniedTypes,
    },
  },
},

With only this change, Strapi's security middleware (CSP) prevents Cloudinary thumbnails from showing in the admin panel's Media Library. Replace 'strapi::security' in config/middlewares.ts with the following object.

// config/middlewares.ts
{
  name: 'strapi::security',
  config: {
    contentSecurityPolicy: {
      useDefaults: true,
      directives: {
        'connect-src': ["'self'", 'https:'],
        'img-src': ["'self'", 'data:', 'blob:', 'market-assets.strapi.io', 'res.cloudinary.com'],
        'media-src': ["'self'", 'data:', 'blob:', 'market-assets.strapi.io', 'res.cloudinary.com'],
        upgradeInsecureRequests: null,
      },
    },
  },
},

You can find your Cloudinary cloud_name, API Key and API Secret in the Cloudinary console. To try it locally as well, add CLOUDINARY_NAME / CLOUDINARY_KEY / CLOUDINARY_SECRET to .env.

Step 4: Create content types and push to GitHub

In Strapi, you can't create or modify content types in production. Make schema changes with the Content-Type Builder under npm run develop locally, then push the generated files under src/api to GitHub to deploy them.

Create schemas with the Content-Type Builder locally (npm run develop, SQLite), then git push to production on Render (Postgres). Content types can't be created or edited in production
Create and change content types locally, then push them to production
npm run develop   # register an admin and create content types at http://localhost:1337/admin
git init
git add .
git commit -m "init strapi"
git branch -M main
git remote add origin https://github.com/<your-username>/strapi-render-project.git
git push -u origin main

Make sure .env is not committed. Production values are set as environment variables on Render.

Step 5: Create a Web Service on Render

Choose "+ New" → "Web Service", select the repository, and configure it as follows.

FieldValue
LanguageNode
RegionSame region as Postgres
Build Commandnpm install && npm run build
Start Commandnpm run start
ComputeFree for testing, 2GB or more for ongoing use

Set the following under Environment Variables. Strapi's official docs note that these values are needed both at build time and at runtime.

KeyValue
NODE_ENVproduction
DATABASE_CLIENTpostgres
DATABASE_URLThe Internal Database URL you copied in Step 1
APP_KEYSComma-separated random strings (for example, 2 to 4 of them)
API_TOKEN_SALT / ADMIN_JWT_SECRET / JWT_SECRET / TRANSFER_TOKEN_SALT / ENCRYPTION_KEYA random string each
CLOUDINARY_NAME / CLOUDINARY_KEY / CLOUDINARY_SECRETValues from the Cloudinary console

You can generate random strings with a command like the one below. Reusing the values from your local .env works, but separate production values are safer.

openssl rand -base64 32

You don't need to set a port. In v5, config/server.ts uses host 0.0.0.0 and reads the port from the PORT environment variable, so Strapi listens on the PORT Render provides (default 10000). For Node.js, services created on or after October 21, 2026 default to 24.x, which is within Strapi 5's supported range (engines in package.json is >=22.0.0 <=26.x.x). To pin it, use the NODE_VERSION environment variable or a .node-version file in the repository.

Step 6: Check that it works

When the deploy finishes, open https://your-app.onrender.com/admin and create the production admin account (it is a different database from your local SQLite one, so you need a separate admin). Upload an image from the Media Library; if the file appears in the Cloudinary console, the setup is complete. To expose the API publicly, go to "Settings" → "Users & Permissions" → "Roles" → "Public" and allow find / findOne for the content types you want to publish.

Common pitfalls

  • Images disappeared after a few days: the upload provider is still the default local storage. Files are lost on a free web service, so check the Cloudinary configuration
  • Can't connect to the database: the Internal URL doesn't work if the Web Service and Postgres are in different regions. When connecting from outside via the External URL, set DATABASE_SSL=true
  • The database stopped working after 30 days: the free Postgres expired. Upgrade to a paid plan within the 14-day grace period
  • Build or startup crashes partway: 512MB may not be enough memory. Upgrade the instance
  • Content types can't be edited in the admin panel: that is by design in production. Change them locally and push

For Render errors in general, including Python apps, see Render deploy errors and how to fix them; for Streamlit, see How to deploy a Streamlit app on Render.

References

Title and URL copied