Strapi

Click to deploy Strapi, a content backend and headless CMS, to Koyeb


Overview

Strapi is a headless CMS that helps you build content-based sites with the frontend of your choice by providing a reliable, customizable API backend. Strapi allows you to define your own content types, includes a feature-rich admin panel, and provides all of the building blocks you need to develop a comprehensive editing and publication workflow.

This Starter deploys Strapi on Koyeb in one click. It is configured to use a PostgreSQL database for data persistence and an S3-compatible object storage provider for storing files and uploads. This example instance of Strapi comes preconfigured with a few of the standard content types you would expect from a blog.

Requirements

  • A web-accessible PostgreSQL database. You can start up a PostgreSQL database on Koyeb using Koyeb Database Services.
  • An S3-compatible object storage bucket and connection credentials. These are used to store uploads and other files externally so that Strapi can scale and redeploy without issues.

Configuration

Strapi requires a Koyeb Instance of size eMedium or larger to fulfill the recommended minimum of 1 core and 2GB of memory.

When deploying Strapi on Koyeb, the following environment variables are used for configuration. Take care to set the required variables with the appropriate values if not set.

  • HOST: Set to 0.0.0.0. This tells Strapi to listen for connections on all interfaces.
  • NODE_ENV: Set to production. This disables development-only features and enables the production-specific configuration.
  • DATABASE_CLIENT: Set to postgres to use a PostgreSQL database instead of a local SQLite database. This is required for data persistence.
  • DATABASE_URL: The connection string to connect to and authenticate with the PostgreSQL database. Set this to the psql connection string you copied from your Koyeb database detail page and append ?ssl_mode=require to the end to force the connection to use TLS/SSL.
  • S3_ENDPOINT: The object storage bucket endpoint URL. Enter the "Endpoint" value from your S3-compatible object storage provider.
  • S3_REGION: The region where the object storage bucket is hosted. For non-AWS providers, this is usually a component within the endpoint URL.
  • S3_BUCKET: The name of your object storage bucket.
  • S3_ACCESS_KEY_ID: The key ID to use when authenticating to the object storage provider.
  • S3_ACCESS_SECRET: The secret key to use when authenticating to the object storage provider.
  • APP_KEYS: A comma-separated list of application keys to be used by middleware. Generate these with openssl rand -base64 32. For example, to set two keys, it might look like: APP_KEYS=<first_key>,<second_key>.
  • API_TOKEN_SALT: The salt used to generate new API keys. Generate with openssl rand -base64 32.
  • JWT_SECRET: A random string used to create new JSON Web Tokens (JWT). Generate with openssl rand -base64 32.
  • ADMIN_JWT_SECRET: A separate random string used to create new JSON Web Tokens (JWT) for the admin panel. Generate with openssl rand -base64 32.
  • TRANSFER_TOKEN_SALT: A salt used to generate transfer tokens. Generate with openssl rand -base64 32.

Other resources related to Strapi

Related One-Click Apps in this category

  • Astro

    Deploy a simple application written using Astro, a high-performance, content-oriented framework.

  • Beego

    Deploy a basic application written with Beego, a high-performance web framework for Go.

  • Bun

    A simple HTTP server using Bun, the all-in-one JavaScript runtime & toolkit designed for speed

The fastest way to deploy applications globally.