If you’re looking to build a custom CMS or API backend with flexibility and speed, Strapi v5 is a great choice. In this guide, we’ll walk through installing Strapi v5 on a Debian 12 server using npm.
This setup assumes that Node.js (v20 or higher) and MariaDB are already installed and configured.
- asas
- as
Step 1, Install Required Build Tools
Before creating the Strapi project, we need to install a few essential tools. These are required to compile native Node.js modules that Strapi relies on, such as bcrypt
.
Run the following command:
0 1 2 3 |
sudo apt update sudo apt install -y build-essential python3 |
Step 2, Create the Strapi Project
Use npm to create a new Strapi v5 project with the latest version available:
0 1 2 |
npm create strapi@latest my-strapi-app |
Replace my-strapi-app
with the name of your project directory.
You’ll be guided through an interactive setup:
- Choose Custom (manual settings) when asked for installation type.
- Select MySQL / MariaDB as the database.
- Enter your database details:
- Host:
127.0.0.1
- Port:
3306
- Database: your existing MariaDB database name (e.g.
strapi
) - Username: database user (e.g.
strapiuser
) - Password: the corresponding user password
- Host:
- Skip Strapi Cloud login or setup if prompted.
Once the setup completes, the dependencies will be installed and your project will be ready.
Step 3, Start the Development Server
Navigate to the project directory and start Strapi in development mode:
0 1 2 3 |
cd my-strapi-app npm run develop |
The first time you run this, Strapi will launch at http://localhost:1337
and prompt you to create an admin account.
What’s Next?
At this point, you have a fully working Strapi v5 development environment. You can start building custom content types, set up role-based permissions, or integrate third-party services.
For production deployments, consider using a process manager like PM2, reverse proxying with Nginx, and enabling HTTPS.