Skip to main content

Installing from CLI

Caution

The content of this page has not been updated to Strapi v5 yet.

Strapi CLI (Command Line Interface) installation scripts are the fastest way to get Strapi running locally. The following guide is the installation option most recommended by Strapi.

Preparing the installation

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

  • Node.js: Only Active LTS or Maintenance LTS versions are supported (currently v18 and v20). Odd-number releases of Node, known as "current" versions of Node.js, are not supported (e.g. v19, v21).
  • Your preferred Node.js package manager:
  • Python (if using a SQLite database)

A supported database is also required for any Strapi project:

DatabaseRecommendedMinimum
MySQL8.08.0
MariaDB10.610.3
PostgreSQL14.012.0
SQLite33
Caution

Strapi v4 does not support MongoDB.

Creating a Strapi project

Follow the steps below to create a new Strapi project, being sure to use the appropriate command for your installed package manager:

  1. In a terminal, run the following command:

    yarn create strapi-app my-project
    # 'yarn create' creates a new project
    # 'strapi-app' is the Strapi package
    # 'my-project' is the name of your Strapi project
  2. Choose an installation type:

    • Quickstart (recommended), which uses the default database (SQLite)
    • Custom (manual settings), which allows to choose your preferred database
  3. (Custom installation type only) Among the list of databases, choose a database for your Strapi project.

  4. (Custom installation type only) Name your project's database.

CLI installation options

The above installation guide only covers the basic installation option using the CLI. There are other options that can be used when creating a new Strapi project, for example:

  • --quickstart: Directly create the project in quickstart mode.
  • --template: Create a project with pre-made Strapi configurations (see Templates).
  • --typescript/--ts: Create a project in TypeScript.
  • --no-run: Prevent Strapi from automatically starting the server (useful in combination with --quickstart).

For more information on available flags, see our CLI documentation.

Strapi also offers a starters CLI to create a project with a pre-made frontend application (see our dedicated blog post).

💡 Tip

Experimental Strapi versions are released every Tuesday through Saturday at midnight GMT. You can create a new Strapi application based on the latest experimental release using npx create-strapi-app@experimental.

Please use these experimental builds at your own risk. It is not recommended to use them in production.

Running Strapi

To start the Strapi application, run the following command in the project folder:

yarn develop