EthioDeploy
DocsPricingDomainsBlogToolsChangelog
Deploy guides/Strapi

Deploy a Strapi app

Strapi 5 builds and starts with its own scripts, and its config already reads PORT and DATABASE_URL. Copy the secrets from your local .env into env vars, set DATABASE_CLIENT=postgres, add a Postgres addon, and push.

Last updated November 17, 2026

What we run by default
Detected by
package.json
Install
npm ci / pnpm / yarn (from your lockfile)
Build
npm run build (strapi build)
Start
npm start (strapi start)

These run automatically, so leave the command fields blank. Only override them in Settings → Build if you need something different.

Fix this first: Set DATABASE_CLIENT=postgres or your content lives in SQLite

Strapi's database config uses SQLite unless DATABASE_CLIENT says otherwise, even when DATABASE_URL is set. The app starts and looks fine, but everything is written to .tmp/data.db inside the container, and the next deploy starts from an empty database. Add DATABASE_CLIENT=postgres next to the Postgres addon.

Prepare your app

  1. Install the Postgres driver. A project created with SQLite doesn't have it:
    npm install pg
  2. Add a Postgres addon to the project. It sets DATABASE_URL, which Strapi's default config/database.ts already reads.
  3. Add these env vars in the project's settings. The six secrets are in your local .env, which is in .gitignore, so they don't reach the deploy any other way:
    DATABASE_CLIENT=postgres
    APP_KEYS=<two or more, comma-separated>
    API_TOKEN_SALT=...
    ADMIN_JWT_SECRET=...
    TRANSFER_TOKEN_SALT=...
    JWT_SECRET=...
    ENCRYPTION_KEY=...

Use new random values for production rather than the ones from your laptop, for example openssl rand -base64 32 for each. Then keep them: they sign admin and user logins and API tokens, so changing them later signs everyone out and can break existing tokens.

Nothing else needs changing. config/server.ts reads PORT and listens on 0.0.0.0 by default, and Strapi 5 runs on the default Node 22.

Create the first admin right away

Until an admin account exists, anyone who opens /admin can register as the super admin. Open https://<project-slug>.ethiodeploy.app/admin as soon as the first deploy is live and create your account. Strapi creates and updates its database tables itself when it starts, so there's no migration step to run first.

Build content types locally

A deployed Strapi runs strapi start, which is production mode, and the Content-Type Builder is read-only there. Trying to edit shows:

Strapi is in production mode, editing content types is disabled. Please switch to development mode by starting your server with strapi develop.

That's by design: content types are code in src/api and src/components. Create or change them with npm run develop on your machine, commit, and push. The deploy picks them up and Strapi adds the new tables and columns on start. Entries, media and users are data, so you add those in the deployed admin panel.

Media uploads

Strapi's default upload provider saves files to public/uploads inside the container. Each deploy starts a fresh container, so those files disappear and the media library shows broken images. Store media in an S3 bucket instead, with Strapi's official provider:

npm install @strapi/provider-upload-aws-s3
// config/plugins.ts
export default ({ env }) => ({
  upload: {
    config: {
      provider: 'aws-s3',
      providerOptions: {
        baseUrl: env('CDN_URL'),
        s3Options: {
          credentials: {
            accessKeyId: env('AWS_ACCESS_KEY_ID'),
            secretAccessKey: env('AWS_ACCESS_SECRET'),
          },
          region: env('AWS_REGION'),
          params: {
            Bucket: env('AWS_BUCKET'),
          },
        },
      },
    },
  },
});

s3Options goes to the AWS SDK's S3 client, so an S3-compatible service such as Cloudflare R2 needs its endpoint there as well. One more step: Strapi's default security headers only allow images from its own domain and a couple of CDNs, so the media library can't show files from the bucket. Replace 'strapi::security' in config/middlewares.ts with a config that adds the bucket's domain:

{
  name: 'strapi::security',
  config: {
    contentSecurityPolicy: {
      useDefaults: true,
      directives: {
        'img-src': ["'self'", 'data:', 'blob:', 'your-bucket.s3.amazonaws.com'],
        'media-src': ["'self'", 'data:', 'blob:', 'your-bucket.s3.amazonaws.com'],
      },
    },
  },
},

Health check

Strapi redirects / to /admin, and a redirect counts as healthy, so the default path works. Strapi also answers /_health with 204 if you prefer a path that doesn't touch the admin panel. Set it as the Health Check Path in Settings.

Can Strapi run on the Free plan?

It starts, but it's tight. In our test, Strapi 5 with Postgres used between 140 and 230 MB of memory right after starting, with Node's heap capped the way the Free plan caps it. The Free container has 256 MB, so editing in the admin panel or a burst of API requests can push it over and restart it. It's fine for trying Strapi out. For a CMS a site depends on, use Pro: 1 GB of memory, always on, and a 5 GB database, for $10 or 1,399 ETB a month.

Free apps also sleep after 30 minutes without traffic. A frontend that fetches from Strapi at build time doesn't notice, but one that fetches on every request waits for Strapi to wake.

Deploy

  1. Sign in with GitHub and install the EthioDeploy app on the repo.
  2. Click “New Project” and pick the repo.
  3. Watch the build in the dashboard. When the health check passes, your app is live at <project-slug>.ethiodeploy.app. Every push to the default branch redeploys, and the old version keeps serving until the new one is healthy.

Troubleshooting

Middleware "strapi::session": App keys are required+

Cause: APP_KEYS (and the other secrets) are only in your local .env, which isn't committed.

Fix: Add APP_KEYS, API_TOKEN_SALT, ADMIN_JWT_SECRET, TRANSFER_TOKEN_SALT, JWT_SECRET and ENCRYPTION_KEY as env vars and redeploy.

Cannot find module 'pg'+

Cause: DATABASE_CLIENT is postgres but the driver isn't installed.

Fix: Run npm install pg, commit the lockfile, and push.

Content, users or the admin account are gone after a deploy+

Cause: DATABASE_CLIENT isn't set, so Strapi used SQLite inside the container.

Fix: Add a Postgres addon and set DATABASE_CLIENT=postgres.

Images in the media library are broken after a deploy+

Cause: The local upload provider wrote them to public/uploads in the old container.

Fix: Switch to @strapi/provider-upload-aws-s3 with an S3 or R2 bucket and upload them again.

Strapi is in production mode, editing content types is disabled+

Cause: The Content-Type Builder only edits in strapi develop.

Fix: Change content types locally with npm run develop, commit and push.

The app restarts while editing on the Free plan+

Cause: Strapi runs close to the 256 MB memory limit.

Fix: Move the project to Pro for 1 GB.

Still stuck? Check the deployment's build log in the dashboard, or see Troubleshooting.

Questions

You can try it on the Free plan, which includes a 512 MB Postgres database. Strapi 5 uses most of the Free container's 256 MB after starting, so for a CMS a site depends on, Pro ($10/month) gives 1 GB of memory and keeps it always on.

Strapi's default database config uses SQLite unless DATABASE_CLIENT is set. Without it, data is written to a file inside the container, and each deploy starts a new container. Set DATABASE_CLIENT=postgres and add a Postgres addon.

No. Production Strapi has the Content-Type Builder locked. Create content types locally with npm run develop, commit the files in src/api, and push. Entries, media and users are managed in the deployed admin panel.

In an S3-compatible bucket, using @strapi/provider-upload-aws-s3. The default provider writes to the container's disk, which is replaced on every deploy.

Ready to deploy?

Sign in with GitHub and pick your repo. No Dockerfile, no YAML.

More guides

LLovableBoltClaude Code & Cursor

All guides on the deploy guides page. Custom domains, env vars, addons and billing are in the docs.

On this page
Prepare your appCreate the first admin right awayBuild content types locallyMedia uploadsHealth checkCan Strapi run on the Free plan?DeployTroubleshootingQuestions
Deploying with an agent?Point it at llms.txt. Every guide is in one file there.Open llms-full.txt →
EthioDeploy

Agentic first development and deployment, started in Ethiopia, built for developers everywhere.

Telegram community
Product
PricingAI coding agentAgent mode docsDomainsCLIFree backend hostingHosting in EthiopiaChangelog
Deploy guides
Next.jsNode.jsPythonSvelteKitTanStack StartAstroNuxtReact RouterHonoStrapiDjangoFastAPIFlaskStreamlitExpressNestJSLaravelRailsGoTelegram botDiscord botLovableBoltReplitv0Google AI StudioBase44Firebase StudioClaude Code & Cursor
Compare
vs Herokuvs Vercelvs Rendervs Railwayvs Fly.iovs Netlifyvs KoyebHeroku alternativesVercel alternativesNetlify alternativesRender alternativesRailway alternativesFly.io alternativesReplit alternativesPythonAnywhere alternativesDigitalOcean App Platform alternativesGlitch alternatives
Resources
DocsBlogFree toolsAboutSupportContactllms.txt
© 2026 EthioDeployPay by card in USD or bank transfer in ETBTermsPrivacy