Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
🧑🏽‍🔬 We're testing new AI and search tools ondocs-next.strapi.io! Feel free to have a look andshare your feedback
  • API calls
  • CRON jobs
  • Environment variables
  • Features
  • Middlewares
  • Plugins
  • Server
  • Deployment

    Strapi provides many deployment options for your project or application. Your Strapi applications can be deployed on traditional hosting servers or your preferred hosting provider.

    The following documentation covers the basics of how to prepare Strapi for deployment on with several common hosting options.

    Strapi Cloud

    You can useStrapi Cloud to quickly deploy and host your project.

    Tip

    If you already created a content structure with the Content-Type Builder and added some data through the Content Manager to your local (development) Strapi instance, you can leverage thedata management system to transfer data from a Strapi instance to another one.

    Another possible workflow is to first create the content structure locally, push your project to a git-based repository, deploy the changes to production, and only then add content to the production instance.

    General guidelines

    Hardware and software requirements

    To provide the best possible environment for Strapi the following requirements apply to development (local) and staging and production workflows.

    Before installing Strapi, the following requirements must be installed on your computer:

    • Standard build tools for your OS (thebuild-essentials package on most Debian-based systems)

    • Hardware specifications for your server (CPU, RAM, storage):

      HardwareRecommendedMinimum
      CPU2+ cores1 core
      Memory4GB+2GB
      Disk32GB+8GB
    • A supported database version:

    DatabaseRecommendedMinimum
    MySQL8.08.0
    MariaDB10.610.5
    PostgreSQL14.012.0
    SQLite33
    Database deployment

    Deploying databases along with Strapi is covered in thedatabases guide.

    • A supported operating system:

      Operating SystemRecommendedMinimum
      Ubuntu (LTS)22.0420.04
      Debian11.x10.x
      CentOS/RHEL9.x8.x
      macOS11.010.15
      Windows Desktop1110
      Windows Server20222019

    Application Configuration


    1. Configure

    We recommend using environment variables to configure your application based on the environment, for example:

    /config/server.js

    module.exports=({ env})=>({
    host:env('HOST','0.0.0.0'),
    port: env.int('PORT',1337),
    });

    Then you can create a.env file or directly set environment variables in your chosen deployment platform:

    HOST=10.0.0.1
    PORT=1338
    Tip

    To learn more about configuration details, see theconfigurations documentation.

    2. Launch the server

    Before running your server in production you need to build your admin panel for production:

    • yarn
    • npm
    • windows
    NODE_ENV=productionyarn build

    Run the server with theproduction settings:

    • yarn
    • npm
    • windows
    NODE_ENV=productionyarn start
    Caution

    We highly recommend usingpm2 to manage your process.

    If you need a server.js file to be able to runnode server.js instead ofnpm run start then create a./server.js file as follows:

    path: ./server.js

    const strapi=require('@strapi/strapi');
    strapi.createStrapi(/* {...} */).start();
    Caution

    If you are developing aTypeScript-based project you must provide thedistDir option to start the server.For more information, consult theTypeScript documentation.

    Advanced configurations

    If you want to host the administration on another server than the API,please take a look at this dedicated section.

    Additional resources

    Prerequisites

    Theintegrations page of the Strapi website include information on how to integrate Strapi with many resources, including how to deploy Strapi on the following 3rd-party platforms:

    Deploy Strapi on AWS

    Deploy Strapi on Azure

    Deploy Strapi on DigitalOcean App Platform

    Deploy Strapi on Heroku


    In addition, community-maintained guides for additional providers are available in theStrapi Forum. This includes the following guides:

    Proxying with Caddy

    Proxying with HAProxy

    Proxying with NGinx

    Using the PM2 process manager


    The following external guide(s), not officially maintained by Strapi, might also help deploy Strapi on various environments:

    [Microsoft Community] Deploying on Azure

    Multi-tenancy

    If you're looking for multi-tenancy options, the Strapi Blog has acomprehensive guide.


    [8]ページ先頭

    ©2009-2025 Movatter.jp