{"id":531,"date":"2024-03-11T14:33:40","date_gmt":"2024-03-11T14:33:40","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2024\/03\/11\/9054766-how-to-use-the-strapi-vps-template-at-hostinger\/"},"modified":"2026-03-16T12:12:00","modified_gmt":"2026-03-16T12:12:00","slug":"9054766-how-to-use-the-strapi-vps-template-at-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/9054766-how-to-use-the-strapi-vps-template-at-hostinger\/","title":{"rendered":"How to Use the Strapi VPS Template at Hostinger"},"content":{"rendered":"<p class=\"no-margin\">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 <b><a href=\"\/support\/4965922-how-to-change-the-operating-system-of-vps\" target=\"_blank\" class=\"intercom-content-link\">Ubuntu 24.04 64bit with Strapi<\/a> <\/b>VPS template on Hostinger, Strapi comes pre-installed on the <b>CloudPanel <\/b>control panel and utilizes <b>PM2<\/b> as the process manager, making the setup process smoother and faster. <\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">If you don&rsquo;t have a VPS yet, check the available options here: <b><a href=\"https:\/\/www.hostinger.com\/vps\/strapi-hosting\" target=\"_blank\" class=\"intercom-content-link\">Strapi VPS Hosting<\/a> &#128640; <\/b><\/p>\n<\/div><p class=\"no-margin\">\n<\/p><h2 id=\"h_13e0b24607\">Understanding the Environment<\/h2><p class=\"no-margin\">This template has three main components:<\/p><ul>\n<li>\n<p class=\"no-margin\"><b>Strapi<\/b> &ndash; pre-installed and configured, ready to use.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>CloudPanel<\/b> &ndash; a modern control panel for managing your server, including databases, domains, and more<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>pm2<\/b> &ndash; a process manager for Node.js applications that will keep Strapi running smoothly<\/p>\n<\/li>\n<\/ul><h2 id=\"h_42c96a39ca\">Configuring Strapi<\/h2><p class=\"no-margin\">Access the Strapi admin panel by opening your browser and navigating to:<\/p><pre><code>http:\/\/[your-vps-hostname]\/admin <\/code><\/pre><p class=\"no-margin\">Make sure to replace [your-vps-hostname] with the <b><a href=\"\/support\/4805490-how-to-change-your-vps-hostname\" target=\"_blank\" class=\"intercom-content-link\">hostname of your VPS<\/a><\/b>.<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2024\/03\/0806dd95-b498-4f0d-ba93-1dcf39f18fd0.jpg\" width=\"350\"><\/div><p class=\"no-margin\">Next, follow the on-screen instructions to complete the initial setup, including creating an admin user.<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_4d28523b92\">Managing Strapi with pm2<\/h2><p class=\"no-margin\">If Strapi isn&rsquo;t running, you can start it using <b>PM2<\/b>. Run the following command from the Strapi project directory:<\/p><pre><code>pm2 start npm --name \"strapi\" -- start<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">To start Strapi in development mode, add <b>NODE_ENV<\/b> variable at the start of the command, as follows:<\/p><pre><code>NODE_ENV=development pm2 start npm --name \"strapi\" -- start<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">To check the logs for your Strapi application, use:<\/p><pre><code> pm2 logs strapi<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">The output will look similar to this:<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2024\/03\/03471e97-ae17-4db5-a79c-5b3f0887842a.jpg\"><\/div><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">You can restart your Strapi application with pm2 using the following command:<\/p><pre><code> pm2 restart strapi<\/code><\/pre><p class=\"no-margin\">\n<\/p><h3 id=\"h_310e407b86\">Deploying Your Frontend<\/h3><p class=\"no-margin\">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.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">If you want Strapi to run on your domain, just point your domain to a VPS IP address, <b><a href=\"\/support\/4805490-how-to-change-your-vps-hostname\" target=\"_blank\" class=\"intercom-content-link\">change the server hostname<\/a><\/b>, and reinstall the server.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">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.<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">For more detailed information on how to use Strapi, visit the official <b><a href=\"https:\/\/docs.strapi.io\/dev-docs\/intro\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">Strapi documentation<\/a><\/b> &#128161; <\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Getting started with the Strapi VPS template<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[206],"tags":[],"class_list":["post-531","post","type-post","status-publish","format-standard","hentry","category-vps-os-and-templates"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/9054766-how-to-use-the-strapi-vps-template-at-hostinger\/","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=531"}],"version-history":[{"count":1,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/531\/revisions"}],"predecessor-version":[{"id":2511,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/531\/revisions\/2511"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}