Introduction
As a headless CMS, Strapi makes it possible to create a back-end application that can be customized according to the user’s needs, and which generates an API for those needs. The user is then free to use the technology or framework of his choice, and call on this API to display the content on his website.
In this article, we explain how to install Strapi 5. The steps are:
- Create a sub-domain.
- Create a Node.js application.
- Create a MySQL database and import your local database.
- Import your project.
- Complete the configuration to get Strapi up and running.
Prerequisites
- Make sure your Strapi project is up and running locally.
- As recommended, you should have at least the following resources: 4 CPU 4 MEM and 8 MB/s IO.
- Enter the following address in your web browser: https://mg.n0c.com/en/.
Step 1 – Create a Subdomain
We need to start by installing our Strapi back-end application on a subdomain. As explained in the article How to Manage Domains:
- Go to your N0C interface and click on Domains -> Domain management.
- Click on the Add and Subdomain buttons.
- Enter the desired subdomain (in our example, “strapi”) in the SUBDOMAIN NAME field:

- Click on the CREATE button.
Step 2 – Create Your Node.js Application
Strapi works with Node.js.
To set up a new Node.js application via the N0C interface, as explained in the article How to Manage Node.js Applications:
- Go to Languages -> Node.js and click on the Create button:

- Select the most recent VERSION.
- Enter the APP DIRECTORY (in our example, “strapi”).
- Set the BOOT FILE to “server.js”.
- Choose production in APPLICATION MODE.
- Click on the CREATE button.
Step 3 – Create the MySQL Database
Create a MySQL database called strapi and a user with full privileges, as explained in the How to Manage MySQL and PostgreSQL Databases article.
- Choose Databases -> My SQL from the left-hand context menu.
- In the MySQL interface, click on the Create button.

- Check CREATE DATABASE USER.
- Create a DATABASE and a user with full privileges in this interface.
- Do not forget to click on the CREATE button.
Once this is done, import your local database into your created database, as explained in How to Manage Databases with PhpMyAdmin.
Step 4 – Import Your Project
Now all that is left to do is import your Strapi project into the node directory, here named “Strapi”. Please refer to the article How to Manage Node.js Applications.
- Be sure to empty any files already present before importing your own. You can do this :
- via SSH;
- by FTP connection; or
- via our file manager.
- Once you have done this, you can install the dependencies. To do this, run the “source” command displayed with the parameters of your Node.js application on N0C :

- This command can be executed via SSH or via the terminal in the Files section on N0C.
- Next, run the “npm install” command.
- Once you have finished, run the “npm run build” command.
Your project is now ready for production, with just a few adjustments to make.
Step 5 – Complete the Configuration
The final step is to make sure that everything is properly configured to run Strapi.
- You can activate Passenger’s debug mode. This is explained in the article How to Debug a Node.js, Ruby or Python Application.
- If you do not have a “server.js” file at the root of your directory, you need to create one with the following content.
- If the application has been created with the Javascript :
` const strapi = require('@strapi/strapi'); strapi.createStrapi(/* {...} */).start(); `
- If the application has been created with Typescript :
` const strapi = require('@strapi/strapi'); const app = strapi.createStrapi({ distDir: './dist' }); app.start(); `
- Make sure your “.env” file is correctly configured. In our case, it looks like this:
` HOST=0.0.0.0 PORT=1337 APP_KEYS=key1,key2,key3,key4 API_TOKEN_SALT= ADMIN_JWT_SECRET= TRANSFER_TOKEN_SALT= # Database DATABASE_CLIENT=mysql DATABASE_HOST=127.0.0.1 DATABASE_PORT=3306 DATABASE_NAME=strapi DATABASE_USERNAME=strapiadminuser DATABASE_PASSWORD= DATABASE_SSL=false JWT_SECRET= `
- As explained in the article How to Manage Node.js Applications, remember to restart your Node.js application in the N0C interface:

Conclusion
That is it! Your Strapi application is up and running, and so is its API.
At this point, you can use the framework of your choice for your front-end application.