Skip to main content
All CollectionsVPSVPS OS and Templates
How to Use the Strapi VPS Template
How to Use the Strapi VPS Template

Getting started with the Strapi VPS Template

Updated over 2 months ago

Strapi is a leading open-source headless CMS that is highly customizable and provides you with the freedom to use your favorite tools and frameworks. When you choose the Ubuntu 22.04 64bit with Strapi VPS template on Hostinger, Strapi comes pre-installed on the CloudPanel control panel and utilizes PM2 as the process manager, making the setup process smoother and faster.

If you don't have a VPS yet, check the available options here: Strapi VPS Hosting 🚀

Understanding the Environment

This template has three main components:

  • Strapi - pre-installed and configured, ready to use.

  • CloudPanel - a modern control panel for managing your server, including databases, domains, and more

  • pm2 - a process manager for Node.js applications that will keep Strapi running smoothly

Configuring Strapi

Access the Strapi admin panel by opening your browser and navigating to:

http://[your-vps-hostname]/admin 

Make sure to replace [your-vps-hostname] with the hostname of your VPS.


Next, follow the on-screen instructions to complete the initial setup, including creating an admin user.

Managing Strapi with pm2

If Strapi isn't running, you can start it using PM2. Run the following command from the Strapi project directory:

pm2 start npm --name "strapi" -- start

To start Strapi in development mode, add NODE_ENV variable at the start of the command, as follows:

NODE_ENV=development pm2 start npm --name "strapi" -- start

To check the logs for your Strapi application, use:

 pm2 logs strapi

The output will look similar to this:

You can restart your Strapi application with pm2 using the following command:

 pm2 restart strapi

Deploying Your Frontend

As a headless CMS, Strapi serves your content through an API that any frontend framework of your choice can consume. You can deploy your frontend application on Hostinger, connecting it to Strapi by specifying the API URL in your frontend code.

If you want Strapi to run on your domain, just point your domain to a VPS IP address, change the server hostname, and reinstall the server.

With the Ubuntu 22.04 64bit with Strapi VPS template at Hostinger, launching a Strapi instance is straightforward, allowing you to focus on creating and managing your content. The combination of CloudPanel and pm2 ensures your Strapi application runs efficiently and remains accessible.

For more detailed information on how to use Strapi, visit the official Strapi documentation 💡

Did this answer your question?