{"id":138599,"date":"2025-12-24T12:32:13","date_gmt":"2025-12-24T12:32:13","guid":{"rendered":"\/tutorials\/?p=138599"},"modified":"2026-03-09T19:16:05","modified_gmt":"2026-03-09T19:16:05","slug":"automate-vps-management-using-n8n","status":"publish","type":"post","link":"\/ng\/tutorials\/automate-vps-management-using-n8n","title":{"rendered":"How to automate VPS management using n8n and Hostinger API"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>Automating Hostinger virtual private server (VPS) management using n8n and our public API helps streamline repetitive tasks, such as monitoring uptime and sending alerts on Slack. In addition to making the task more efficient, it reduces human errors and enables you to focus on crucial tasks that require more complex configurations, like fine-tuning firewall rules.<\/p><p>You can accomplish this using two key tools: <strong>n8n<\/strong>, a powerful open-source low-code automation platform, and the <strong>Hostinger API<\/strong>, which provides the programmatic interface to manage your servers, in this case through n8n. The process of automating your VPS tasks with these tools is straightforward:<\/p><ol class=\"wp-block-list\">\n<li>Get your Hostinger API token from <strong>hPanel<\/strong>.<\/li>\n\n\n\n<li>Set up or self-host an n8n instance and connect your Hostinger API by adding the API token as the <strong>HTTP request<\/strong> node&rsquo;s authentication credential.  <\/li>\n\n\n\n<li>Configure your n8n workflow using specific API endpoints and nodes based on the VPS management tasks you want to automate.   <\/li>\n<\/ol><p>Examples of simple tasks that can be automated using n8n and the Hostinger API include alerting you to downtime, logging the latest backup for historical data, notifying you of potentially compromised VPS, and creating Jira tickets for traffic spikes.<\/p><p>Before diving into building these workflows, let&rsquo;s explore the basics by understanding the tools that make this automation possible.<\/p><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-is-vps-management-and-why-automate-it\"><strong>What is VPS management and why automate it?<\/strong><\/h2><p>VPS management involves overseeing and maintaining the performance, security, software, and system updates of a virtual server. It includes tasks such as configuring server settings, monitoring uptime, managing storage and backups, and applying security patches.<\/p><p>Proper VPS management is essential to ensure smooth, reliable, and secure operations. However, it can be time-consuming, repetitive, and prone to human error &ndash; especially as you add more servers.<\/p><p>Automating VPS management can streamline routine tasks, reduce risk, and free up time for more strategic work, among other benefits.<\/p><h3 class=\"wp-block-heading\"><strong>Benefits of automating VPS management<\/strong><\/h3><p>Automating your VPS management tasks with n8n and the Hostinger API delivers various benefits that extend beyond simple efficiency, impacting reliability, consistency, and resource allocation.<\/p><ul class=\"wp-block-list\">\n<li><strong>Significant time and effort savings. <\/strong>By automating operations like fetching daily resource metrics and logging malware scan results, you can focus on complex tasks that require more human judgment or intervention.<\/li>\n\n\n\n<li><strong>Drastically reduced downtime. <\/strong>Creating an automated monitoring and alerting system enables you to identify issues on your VPS and respond to them promptly. The automation&rsquo;s ability to run 24\/7 without supervision ensures immediate detection of interruptions or anomalies. <\/li>\n\n\n\n<li><strong>Minimized human errors and improved data consistency. <\/strong>Performing manual, repetitive administrative tasks is inherently prone to human error. Automated and tested workflows consistently perform the same steps, ensuring data consistency. <\/li>\n\n\n\n<li><strong>Streamlined multi-VPS management. <\/strong>Administrators can monitor and receive alerts about multiple VPS instances on a centralized hub.<strong> <\/strong>The n8n-Hostinger API integration is also scalable, meaning you can easily expand your workflow to automate tasks across multiple server instances. <\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-what-are-the-tools-for-automating-vps-management\"><strong>What are the tools for automating VPS management?<\/strong><\/h2><p>Automating Hostinger VPS management requires two tools: <strong>n8n <\/strong>and our <strong>public API<\/strong>.<\/p><p>n8n runs the workflow for automating the task, while the API facilitates the communication between the automation platform and your VPS.<\/p><h3 class=\"wp-block-heading\"><strong>What is n8n?<\/strong><\/h3><p><a href=\"\/ng\/tutorials\/what-is-n8n\">n8n is an open-source platform<\/a> that lets you automate various tasks by connecting different applications and setting custom logic to manipulate data as it moves.<\/p><p>In automated VPS management, n8n fetches data from your VPS via API, filters it according to specific rules, and executes a predefined sequence of actions if certain conditions are met.<\/p><p>What makes n8n suitable for this task is its low-code nature. This means you don&rsquo;t need to be a professional developer to build sophisticated server management workflows.<\/p><p>You can build workflows in n8n by dragging and dropping <strong>nodes<\/strong>. Each node performs a specific function, whether it&rsquo;s sending an API call, setting a filter rule, sending a notification on third-party apps, or scheduling task execution.<\/p><p><div><p class=\"important\"><strong>Important!<\/strong> n8n isn&rsquo;t a drop-in replacement for tools like <strong>Grafana<\/strong> and <strong>Prometheus<\/strong> due to the lack of features specifically designed for server monitoring. However, it&rsquo;s a more beginner-friendly option for basic tasks like alerting and is much easier to use, especially for non-developers.<\/p><\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\"><strong>What is Hostinger&rsquo;s API?<\/strong><\/h3><p>Hostinger&rsquo;s <a href=\"\/ng\/tutorials\/what-is-a-public-api\">public API<\/a> is a tool that enables you to interact with your Hostinger account and products programmatically. It allows your third-party applications, such as n8n, to connect and exchange data with your Hostinger account, including the associated VPS.<\/p><p>The Hostinger API is crucial for automating VPS management because it enables n8n to fetch data from your server, which is necessary for determining whether the tasks should be performed.<\/p><p>APIs typically have multiple endpoints &ndash; addresses that allow you to request particular data or take a specific action. For example, Hostinger API has endpoints that let you fetch data about backup, VPS information, and malware scanner summary, among others.<\/p><p>Hostinger API endpoints are also helpful for administering various aspects of your server. For instance, you can create a new Docker project or set a new firewall rule without directly interacting with your VPS. To learn more about all available endpoints and their usage, refer to <a href=\"https:\/\/developers.hostinger.com\/\">our API documentation<\/a>.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-set-up-your-vps-management-workflow\"><strong>How to set up your VPS management workflow<\/strong><\/h2><p>By <a href=\"\/ng\/tutorials\/n8n-api\">integrating n8n and the API<\/a> from Hostinger, you can set up a VPS management automation workflow in only three simple steps.<\/p><h3 class=\"wp-block-heading\"><strong>1. Generate your Hostinger API token<\/strong><\/h3><p>The API token is a unique authentication key that allows the Hostinger system to verify requests coming from third-party sources, like n8n.<\/p><p>Generating an API key at Hostinger takes these simple steps:<\/p><ol class=\"wp-block-list\">\n<li>Log in to <strong>hPanel<\/strong>.<\/li>\n\n\n\n<li>Click your <strong>account icon <\/strong>on the top right corner of your screen and select<strong> Account information<\/strong>. <\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b768106\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"1262\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hpanel-account-drop-down-menu-account-information-button.png\/public\" alt=\"hPanel's account drop-down menu with the Account Inspiration button highlighted\" class=\"wp-image-138617\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hpanel-account-drop-down-menu-account-information-button.png\/w=710,fit=scale-down 710w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hpanel-account-drop-down-menu-account-information-button.png\/w=169,fit=scale-down 169w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hpanel-account-drop-down-menu-account-information-button.png\/w=576,fit=scale-down 576w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hpanel-account-drop-down-menu-account-information-button.png\/w=84,fit=scale-down 84w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Select<strong> API<\/strong> from the left sidebar. <\/li>\n\n\n\n<li>Click <strong>New token<\/strong>.<\/li>\n\n\n\n<li>Add a name for your token and select an expiration date. Hit <strong>Generate<\/strong>. <\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b76aa1d\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1310\" height=\"678\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hostinger-api-key-generation-window.png\/public\" alt=\"The Hostinger API token key generation window\" class=\"wp-image-138620\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hostinger-api-key-generation-window.png\/w=1310,fit=scale-down 1310w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hostinger-api-key-generation-window.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hostinger-api-key-generation-window.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hostinger-api-key-generation-window.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/hostinger-api-key-generation-window.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1310px) 100vw, 1310px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Copy the generated token and store it in a safe location, like an encrypted password manager. This is important because you won&rsquo;t be able to see it again after closing the API token generation page.<\/p><p>Keeping the token safe prevents this credential from being compromised, which is crucial since cybercriminals can use it to obtain sensitive data or modify critical server settings.<\/p><p><div><p class=\"important\"><strong>Important!<\/strong> In addition to storing your token in a safe location, choosing a shorter expiration date safeguards your API token. The more frequently you update your token, the more difficult it becomes for cybercriminals to obtain a valid one.<\/p><p>At the same time, however, updating your token frequently can be tedious. In that case, choose an expiration period that best balances security and maintenance according to your needs.    <\/p><\/div>\n\n\n\n<\/p><p>After obtaining your API token, let&rsquo;s check whether it works properly. You can easily do this by copying commands at the bottom of the token generation page and running them on your computer&rsquo;s command-line application.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b76d7e5\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"2094\" height=\"508\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/api-token-test-commands-on-hpanel.png\/public\" alt=\"The API token test commands on hPanel\" class=\"wp-image-138621\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/api-token-test-commands-on-hpanel.png\/w=2094,fit=scale-down 2094w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/api-token-test-commands-on-hpanel.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/api-token-test-commands-on-hpanel.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/api-token-test-commands-on-hpanel.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/api-token-test-commands-on-hpanel.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/api-token-test-commands-on-hpanel.png\/w=1536,fit=scale-down 1536w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/api-token-test-commands-on-hpanel.png\/w=2048,fit=scale-down 2048w\" sizes=\"auto, (max-width: 2094px) 100vw, 2094px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>If you don&rsquo;t receive any error message, it means the API token is valid, and we can proceed with setting up n8n.<\/p><p>After verifying the API token, obtain your VPS ID, which the API will use to identify the server and fetch the data. Here&rsquo;s how to do so:<\/p><ol class=\"wp-block-list\">\n<li>Go to <strong>hPanel <\/strong>&rarr; <strong>sidebar<\/strong> &rarr; <strong>VPS<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Manage <\/strong>on the VPS you want to monitor. <\/li>\n\n\n\n<li>Check the page URL. Your VPS ID is the number next to <strong>\/vps<\/strong>. In this URL example, the ID is <strong>123456<\/strong>:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">https:\/\/hpanel.hostinger.com\/vps\/123456\/overview<\/pre><h3 class=\"wp-block-heading\"><strong>2. Set up n8n on your VPS<\/strong><\/h3><p>You can set up n8n using two methods: manually on a self-hosted environment or using the official cloud plan.<\/p><p>We recommend self-hosting n8n in a VPS. Not only is this method more cost-effective than the cloud plan, but it also gives you complete control over the hosting environment and your data, resulting in a higher level of flexibility.<\/p><p><div><p class=\"important\"><strong>Important!<\/strong> Avoid hosting your n8n instance on the same VPS you want to monitor because your workflow will also fail if the server experiences downtime.<\/p><\/div>\n\n\n\n<\/p><p>In addition, VPS providers offer various features that help you configure and manage your n8n instance more easily. For example, <a href=\"\/ng\/self-hosted-n8n\">Hostinger&rsquo;s self-hosted n8n plan<\/a> provides <strong>OS templates<\/strong> that enable you to deploy n8n with just a few clicks, all without any commands.<\/p><p>If you want to see this template in action or learn how to manually deploy this automation platform, check out our tutorial on <a href=\"\/ng\/tutorials\/how-to-install-n8n\">installing n8n<\/a>.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/ng\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/public\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p>Once n8n is deployed, use the API to connect this tool to your VPS.<\/p><h3 class=\"wp-block-heading\"><strong>3. Connect n8n to Hostinger<\/strong><\/h3><p>Connecting n8n to Hostinger via API involves setting up the token as the <strong>HTTP node<\/strong>&rsquo;s authentication method. Here&rsquo;s how to do it:<\/p><ol class=\"wp-block-list\">\n<li>Open and log in to your n8n instance.<\/li>\n\n\n\n<li>On the main page, click<strong> Create Workflow<\/strong> in the top right corner. <\/li>\n\n\n\n<li>Click the <strong>plus<\/strong> icon to bring up the node selector. From this menu, choose <strong>HTTP request<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b7711db\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"542\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/the-http-request-node-on-n8n.png\/public\" alt=\"The HTTP request node on n8n\" class=\"wp-image-138622\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/the-http-request-node-on-n8n.png\/w=760,fit=scale-down 760w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/the-http-request-node-on-n8n.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/the-http-request-node-on-n8n.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>In the <strong>URL<\/strong> field, enter your API endpoint. For testing, use the following endpoint, with <strong>123456 <\/strong>being your actual server ID:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">https:\/\/developers.hostinger.com\/api\/vps\/v1\/virtual-machines\/123456<\/pre><ol start=\"5\" class=\"wp-block-list\">\n<li>Open the<strong> Authentication menu<\/strong>, click <strong>Generic Credential Type<\/strong>. <\/li>\n\n\n\n<li>Select<strong> Bearer auth<\/strong>. <\/li>\n\n\n\n<li>Expand the<strong> Bearer Auth<\/strong> dropdown menu and click <strong>Create new credential<\/strong>. <\/li>\n\n\n\n<li>On the credential creation menu, enter your API token into the <strong>Bearer Token <\/strong>field and hit <strong>Save<\/strong>. <\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b77393c\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1992\" height=\"1150\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/n8n-bearer-authentication-configuration-menu.png\/public\" alt=\"The n8n bearer authentication configuration menu\" class=\"wp-image-138624\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/n8n-bearer-authentication-configuration-menu.png\/w=1992,fit=scale-down 1992w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/n8n-bearer-authentication-configuration-menu.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/n8n-bearer-authentication-configuration-menu.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/n8n-bearer-authentication-configuration-menu.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/n8n-bearer-authentication-configuration-menu.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/n8n-bearer-authentication-configuration-menu.png\/w=1536,fit=scale-down 1536w\" sizes=\"auto, (max-width: 1992px) 100vw, 1992px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>This HTTP node is now connected to your VPS via the Hostinger API. Check if the integration works properly by clicking the <strong>Execute step<\/strong> button.<\/p><p>If the node&rsquo;s right pane shows details about your VPS, the integration is successful. Otherwise, there might be issues like:<\/p><ul class=\"wp-block-list\">\n<li><strong>Incorrect VPS ID<\/strong>. Check your VPS ID against the data on hPanel. If it&rsquo;s incorrect, the API can&rsquo;t find the destination to send the HTTP request. <\/li>\n\n\n\n<li><strong>Misconfigured credential<\/strong>. Make sure you enter the correct API key. Also,<strong> <\/strong>use<strong> Bearer Auth<\/strong> as the node&rsquo;s authentication method. <\/li>\n\n\n\n<li><strong>Expired API token<\/strong>. Use a fresh API token because the older one might already be expired and invalid. If you lost the previous key, simply regenerate a new one. <\/li>\n\n\n\n<li><strong>Wrong or mistyped endpoint<\/strong>. Verify if you use the correct endpoint. A type can cause the endpoint to be invalid, while using a different endpoint can cause errors because it may require specific parameters. <\/li>\n<\/ul><p>Once you have a working integration, create an actual workflow by adding and connecting more nodes. There are various tasks you can automate with n8n and the Hostinger API, but we&rsquo;ll explore the simplest ones in the following section.<\/p><h2 class=\"wp-block-heading\" id=\"h-practical-vps-automation-examples\"><strong>Practical VPS automation examples<\/strong><\/h2><p>Here are several examples of simple VPS management tasks you can automate with n8n and the Hostinger API.<\/p><h3 class=\"wp-block-heading\"><strong>1. Monitoring server status<\/strong><\/h3><p>You can create a workflow that constantly monitors your server status and alerts you of potential downtime on a third-party app. This enables you to take the necessary actions immediately as soon as an issue arises.<\/p><p>To achieve this, you need to retrieve the server status using the API and set a rule that triggers alerts if the status indicates downtime. Here&rsquo;s how to create it:<\/p><ol class=\"wp-block-list\">\n<li>Add the<strong> On schedule<\/strong> trigger to determine when the workflow will fetch the server status. In the configuration window, set the frequency according to your needs. <\/li>\n\n\n\n<li>Connect and configure an <strong>HTTP request <\/strong>node. Use the following endpoint, but remember to replace the server ID with the actual value:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">https:\/\/developers.hostinger.com\/api\/vps\/v1\/virtual-machines\/123456<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Set <strong>Bearer auth <\/strong>as the authentication method.<\/li>\n\n\n\n<li>Add the <strong>If<\/strong> node to filter the server status. Set a rule with this condition:\n<ul class=\"wp-block-list\">\n<li><strong>{{ $json.state }}<\/strong> <strong>is not equal to running<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Connect the <strong>False<\/strong> condition to the <strong>Do nothing<\/strong> node to end the workflow. <\/li>\n\n\n\n<li>For the <strong>True<\/strong> condition, connect another <strong>If<\/strong> node and set the VPS status that will trigger the alert. You can set multiple rules with an <strong>OR <\/strong>condition, such as:\n<ul class=\"wp-block-list\">\n<li><strong>{{ $json.state }}<\/strong> <strong>is equal to stopped<\/strong><\/li>\n\n\n\n<li><strong>{{ $json.state }}<\/strong> <strong>is equal to destroyed<\/strong><\/li>\n\n\n\n<li><strong>{{ $json.state }}<\/strong> <strong>is equal to suspended<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Connect the <strong>True<\/strong> condition with the platform where you want to receive the alert. For example, use the<strong> Slack: Send a message <\/strong>node.<\/li>\n\n\n\n<li> Integrate your Slack account and select the channel or user to whom you want to send the alert. To learn more about the steps, check out n8n&rsquo;s official guide on <a href=\"https:\/\/docs.n8n.io\/integrations\/builtin\/credentials\/slack\/#using-api-access-token\">configuring Slack credentials<\/a>.<\/li>\n\n\n\n<li> Enter the notification message. For example, you can pass the current server status dynamically using the following:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&#9888;&#65039;**Critical!** Potential downtime detected. Server status: {{ $json.state }} <\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b776561\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"792\" height=\"1194\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/slack-send-a-message-configuration.png\/public\" alt=\"The Slack send a message node configuration\" class=\"wp-image-138627\" style=\"width:679px;height:auto\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/slack-send-a-message-configuration.png\/w=792,fit=scale-down 792w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/slack-send-a-message-configuration.png\/w=199,fit=scale-down 199w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/slack-send-a-message-configuration.png\/w=679,fit=scale-down 679w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/slack-send-a-message-configuration.png\/w=99,fit=scale-down 99w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/slack-send-a-message-configuration.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p><div><p class=\"important\"><strong>Important!<\/strong> When choosing the condition for your <strong>If<\/strong> node, pay attention to the type of data you are working with, whether it is a <strong>string<\/strong>, <strong>array<\/strong>, <strong>object<\/strong>, or another type.<\/p><\/div>\n\n\n\n<\/p><p>The completed workflow looks like this:<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b778d5e\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"2150\" height=\"604\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-uptime-monitoring-workflow-on-n8n.png\/public\" alt=\"The VPS uptime monitoring workflow on n8n\" class=\"wp-image-138631\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-uptime-monitoring-workflow-on-n8n.png\/w=2150,fit=scale-down 2150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-uptime-monitoring-workflow-on-n8n.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-uptime-monitoring-workflow-on-n8n.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-uptime-monitoring-workflow-on-n8n.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-uptime-monitoring-workflow-on-n8n.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-uptime-monitoring-workflow-on-n8n.png\/w=1536,fit=scale-down 1536w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-uptime-monitoring-workflow-on-n8n.png\/w=2048,fit=scale-down 2048w\" sizes=\"auto, (max-width: 2150px) 100vw, 2150px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Note that this workflow will still alert you during planned downtime, like a scheduled maintenance or deliberate restart, because it shows the <strong>stopped <\/strong>status.<\/p><p>To get around this, connect the <strong>if <\/strong>and <strong>wait <\/strong>node to set a logic that alerts you if the downtime lasts longer than the typical maintenance duration. Alternatively, you can pause the workflow by comparing the execution time and your restart schedule listed on a platform like Jira.<\/p><h3 class=\"wp-block-heading\"><strong>2. Backup logging<\/strong><\/h3><p>Automating backup logging enables you to track the available restoration points of your server, ensuring data integrity. You can also set up an alert to notify you whenever the latest automatic backup is logged.<\/p><p>You can accomplish this by retrieving the latest backup date from the Hostinger system and comparing it to the dates in the logs in a Google sheet. Here&rsquo;s how to do it:<\/p><ol class=\"wp-block-list\">\n<li>Add the <strong>On schedule<\/strong> trigger to set the time when your workflow will start.<\/li>\n\n\n\n<li>Connect and configure the <strong>HTTP request<\/strong> node with the following endpoint:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">https:\/\/developers.hostinger.com\/api\/vps\/v1\/virtual-machines\/123456\/backups<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>According to the endpoint specification, add a query parameter named <strong>page <\/strong>and set its value to <strong>1<\/strong>.<\/li>\n\n\n\n<li>Add the <strong>Google Sheets get row <\/strong>node and <a href=\"\/ng\/tutorials\/how-to-integrate-n8n-to-google-sheets\">connect n8n to your spreadsheet<\/a> where you log the backup date. <\/li>\n\n\n\n<li>Click <strong>Add option<\/strong> and select <strong>Data Location on Sheet<\/strong>. <\/li>\n\n\n\n<li>Select <strong>Specify Range (A1 Notation)<\/strong> as the <strong>Range Definition.<\/strong><\/li>\n\n\n\n<li>Enter the column where you log the backup date as the Range. For example, enter <strong>C:C<\/strong> if the dates are in the <strong>C<\/strong> column.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b77b540\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"1248\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/the-backup-logging-google-sheets-node-configuration.png\/public\" alt=\"The Google Sheets node configuration menu for the backup logging automation\" class=\"wp-image-138628\" style=\"width:656px;height:auto\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/the-backup-logging-google-sheets-node-configuration.png\/w=802,fit=scale-down 802w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/the-backup-logging-google-sheets-node-configuration.png\/w=193,fit=scale-down 193w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/the-backup-logging-google-sheets-node-configuration.png\/w=658,fit=scale-down 658w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/the-backup-logging-google-sheets-node-configuration.png\/w=96,fit=scale-down 96w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/the-backup-logging-google-sheets-node-configuration.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"8\" class=\"wp-block-list\">\n<li>Connect the <strong>Aggregate <\/strong>node to consolidate the logged dates into an array. <\/li>\n\n\n\n<li>Add an <strong>If<\/strong> node with the following configuration. This means the condition equals <strong>True <\/strong>if the sheet already has the latest backup date:\n<ul class=\"wp-block-list\">\n<li><strong>{{ $json[&lsquo;Creation date&rsquo;] }} contains {{ $(&lsquo;API GET&rsquo;).item.json.data[1].created_at.toDateTime().format(&lsquo;yyyy-MM-dd HH mm ss&rsquo;) }}<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Connect the <strong>True<\/strong> condition to the<strong> Do nothing <\/strong>node and <strong>False <\/strong>to a<strong> Google Sheets append row<\/strong> node.<\/li>\n\n\n\n<li>Open the <strong>Google Sheets append row<\/strong> node and connect it to the same spreadsheet. <\/li>\n\n\n\n<li>Under the <strong>Value to send<\/strong> section, specify the columns you want to populate with data from the API. For example, if you wish to log the backup ID, size, and date, the fields are:\n<ul class=\"wp-block-list\">\n<li><strong>ID &ndash; {{ $(&lsquo;API GET&rsquo;).item.json.data[1].id }}<\/strong><\/li>\n\n\n\n<li><strong>Size &ndash; {{ $(&lsquo;API GET&rsquo;).item.json.data[1].size }}<\/strong><\/li>\n\n\n\n<li><strong>Date &ndash; {{ $(&lsquo;API GET&rsquo;).item.json.data[1].created_at.toDateTime().format(&lsquo;yyyy-MM-dd HH mm ss&rsquo;)}}<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Connect the<strong> Google Sheets append row<\/strong> node to the <strong>Slack send a message<\/strong> node to configure the alerting system. For example, use the following message:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&#9989;**Backup logged!** Latest backup is added to the log. <\/pre><p><div><p class=\"important\"><strong>Important!<\/strong> If you can&rsquo;t see the columns in the Google Sheets node, make sure you selected the correct sheet and created the columns beforehand.  <\/p><\/div>\n\n\n\n<\/p><p>The completed workflow looks like this:<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b77ded6\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1754\" height=\"612\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-backup-logging-and-alerting-workflow-on-n8n.png\/public\" alt=\"The VPS backup logging and alerting workflow on n8n\" class=\"wp-image-138632\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-backup-logging-and-alerting-workflow-on-n8n.png\/w=1754,fit=scale-down 1754w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-backup-logging-and-alerting-workflow-on-n8n.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-backup-logging-and-alerting-workflow-on-n8n.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-backup-logging-and-alerting-workflow-on-n8n.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-backup-logging-and-alerting-workflow-on-n8n.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-backup-logging-and-alerting-workflow-on-n8n.png\/w=1536,fit=scale-down 1536w\" sizes=\"auto, (max-width: 1754px) 100vw, 1754px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h3 class=\"wp-block-heading\"><strong>3. Reporting malware scan results<\/strong><\/h3><p>Hostinger VPS features built-in Monarx anti-malware, allowing for automatic scans. You can use the API to fetch scan results, create logs for security audits, and send notifications when malicious files are found.<\/p><p>Here&rsquo;s how to create the workflow:<\/p><ol class=\"wp-block-list\">\n<li>Add the<strong> On schedule<\/strong> trigger.<\/li>\n\n\n\n<li>Connect and configure the <strong>HTTP request<\/strong> node. Use the following endpoints:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">https:\/\/developers.hostinger.com\/api\/vps\/v1\/virtual-machines\/123456\/monarx<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Add the<strong> If<\/strong> node and set the filtering rules. For example, enter the following to set the condition as <strong>True<\/strong> if the scan result detects any malicious file:\n<ul class=\"wp-block-list\">\n<li><strong>{{ $json.malicious }} is greater than 0<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>If you want to get an alert about any compromised file, include this additional rule in the same node with<strong> OR <\/strong>condition:\n<ul class=\"wp-block-list\">\n<li><strong>{{ $json.compromised }} is greater than 0<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Connect the <strong>False <\/strong>point to the <strong>Do nothing<\/strong> node. <\/li>\n\n\n\n<li>Add the <strong>Google Sheets append row<\/strong> node to the <strong>True<\/strong> condition. <\/li>\n\n\n\n<li>Go to your <strong>Google Workspace<\/strong> and create a <strong>Google sheet <\/strong>with these three columns for your data:\n<ul class=\"wp-block-list\">\n<li><strong>Last scan &ndash; <\/strong>the date of the latest scan<strong>.<\/strong><\/li>\n\n\n\n<li><strong>Compromised files &ndash; <\/strong>the number of detected compromised files<strong>.<\/strong><\/li>\n\n\n\n<li><strong>Malicious files &ndash; <\/strong>the number of scanned malicious files<strong>. <\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Return to your n8n canvas. Then, connect your scan log spreadsheet and enter the data you want to write into each column. For example, we have three columns with these values:\n<ul class=\"wp-block-list\">\n<li><strong>Last scan &ndash; {{ $json.scan_started_at.toDateTime().format(&lsquo;yyyy-MM-dd HH mm ss&rsquo;) }}<\/strong><\/li>\n\n\n\n<li><strong>Compromised files &ndash; {{ $json.compromised }}<\/strong><\/li>\n\n\n\n<li><strong>Malicious files &ndash; {{ $json.malicious }}<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b780abd\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"790\" height=\"1302\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/malware-logging-n8n-workflow-google-sheets-update-rows-node-configuration.png\/public\" alt=\"The Google Sheets update rows node configuration for the malware scan result n8n automation workflow\" class=\"wp-image-138635\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/malware-logging-n8n-workflow-google-sheets-update-rows-node-configuration.png\/w=790,fit=scale-down 790w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/malware-logging-n8n-workflow-google-sheets-update-rows-node-configuration.png\/w=182,fit=scale-down 182w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/malware-logging-n8n-workflow-google-sheets-update-rows-node-configuration.png\/w=621,fit=scale-down 621w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/malware-logging-n8n-workflow-google-sheets-update-rows-node-configuration.png\/w=91,fit=scale-down 91w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/malware-logging-n8n-workflow-google-sheets-update-rows-node-configuration.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"9\" class=\"wp-block-list\">\n<li>Add and configure the<strong> Slack send a message<\/strong> node to send the notification, such as:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&#9888;&#65039;**Critical!** Last Monarx scan detected  {{ $json.malicious }} malicious files and {{ $json.compromised }} compromised files.  <\/pre><p>Your finished workflow looks something like this:<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b78326e\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1356\" height=\"576\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-malware-monitoring-and-alerting-workflow-on-n8n.png\/public\" alt=\"The VPS malware monitoring and alerting workflow on n8n\" class=\"wp-image-138633\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-malware-monitoring-and-alerting-workflow-on-n8n.png\/w=1356,fit=scale-down 1356w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-malware-monitoring-and-alerting-workflow-on-n8n.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-malware-monitoring-and-alerting-workflow-on-n8n.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-malware-monitoring-and-alerting-workflow-on-n8n.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-malware-monitoring-and-alerting-workflow-on-n8n.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1356px) 100vw, 1356px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h3 class=\"wp-block-heading\"><strong>4. Detecting usage spikes<\/strong><\/h3><p>Automating resource usage monitoring enables you to receive automated alerts if your server load exceeds specific thresholds and automatically creates issues on Jira for further investigation.<\/p><p>To achieve this, use the API to fetch usage data, set a rule to determine whether it exceeds the normal threshold, and notify you of overly high loads.<\/p><p>Note that this workflow is significantly more complex than the previous ones, as it involves modifying the JSON in transit and requires interaction with additional external systems. For example, our specific setup requires the <strong>OpenAI <\/strong>and<strong> Jira APIs<\/strong>, as well as permission to your Jira workspace.<\/p><p>We&rsquo;ll use the <strong>OpenAI API<\/strong> to connect an LLM into our workflow to analyze the usage spike. Then, we use the <strong>Jira API<\/strong> to create an issue in our workspace using the AI analysis results.<\/p><p>Here&rsquo;s how to create the workflow:<\/p><ol class=\"wp-block-list\">\n<li>Add the <strong>On schedule<\/strong> trigger node. <\/li>\n\n\n\n<li>Connect and set up the <strong>HTTP request<\/strong> node with the following endpoint:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">https:\/\/developers.hostinger.com\/api\/vps\/v1\/virtual-machines\/1268054\/metrics<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Add two query parameters to choose the time range for getting the server resource usage. For example, use these to fetch the usage of the past 24 hours:\n<ul class=\"wp-block-list\">\n<li><strong>date_from &ndash; {{ $now.minus(24 &lsquo;hours&rsquo;) }}<\/strong><\/li>\n\n\n\n<li><strong>date_to &ndash; {{ $now }}<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Connect the <strong>Edit field<\/strong> node to calculate the average resource usage. Add the following fields:\n<ul class=\"wp-block-list\">\n<li><strong>cpu_usage.avg &ndash; {{ $json.cpu_usage.usage.values().average() }}<\/strong><\/li>\n\n\n\n<li><strong>ram_usage.avg &ndash; {{ $json.ram_usage.usage.values().average() }}<\/strong><\/li>\n\n\n\n<li><strong>out_traffic.avg &ndash; {{ $json.outgoing_traffic.usage.values().average() }}<\/strong><\/li>\n\n\n\n<li><strong>inc_traffic.avg &ndash; {{ $json.incoming_traffic.usage.values().average() }}<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Add the<strong> If<\/strong> node to determine whether the average resource usage exceeds a specific value. The rules look as follows, but you can change the threshold based on your needs:\n<ul class=\"wp-block-list\">\n<li><strong>{{ $json.cpu_usage.avg }} is greater than 1<\/strong><\/li>\n\n\n\n<li><strong>{{ $json.ram_usage.avg }} is greater than 20000000<\/strong><\/li>\n\n\n\n<li><strong>{{ $json.out_traffic.avg() }} is greater than 5000<\/strong><\/li>\n\n\n\n<li><strong>{{ $json.inc_traffic.avg }} is greater than 5000<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Connect the <strong>False<\/strong> condition to the <strong>Do nothing<\/strong> node and <strong>True<\/strong> to the <strong>Google Sheets append row<\/strong> node.<\/li>\n\n\n\n<li>Go to your <strong>Google Workspace<\/strong> and create a <strong>Google sheet <\/strong>with five columns to log your server usage data:\n<ul class=\"wp-block-list\">\n<li><strong>Date &ndash;<\/strong> the date the server usage data is fetched. <\/li>\n\n\n\n<li><strong>CPU avg &ndash; <\/strong>the average CPU usage.<\/li>\n\n\n\n<li><strong>RAM avg <\/strong>&ndash; the average RAM consumption.<\/li>\n\n\n\n<li><strong>Out avg <\/strong>&ndash; the average number of outgoing traffic.<\/li>\n\n\n\n<li><strong>Inc avg <\/strong>&ndash; the average number of incoming traffic.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Configure the <strong>Google Sheets append rows<\/strong> node and connect the spreadsheet where you want to log the historical server usage. Set these values to send:\n<ul class=\"wp-block-list\">\n<li><strong>Date &ndash; {{ $now.format(&lsquo;yyyy-MM-dd HH mm ss&rsquo;) }}<\/strong><\/li>\n\n\n\n<li><strong>CPU avg &ndash; {{ $json.cpu_usage.avg }}<\/strong><\/li>\n\n\n\n<li><strong>RAM avg &ndash; {{ $json.ram_usage.avg }}<\/strong><\/li>\n\n\n\n<li><strong>Out avg &ndash; {{ $json.out_traffic.avg }}<\/strong><\/li>\n\n\n\n<li><strong>Inc avg &ndash; {{ $json.inc_traffic.avg }}<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Connect the OpenAI send a message node and connect your account by <a href=\"https:\/\/docs.n8n.io\/integrations\/builtin\/credentials\/openai\/\">configuring the OpenAI credentials<\/a>.<\/li>\n\n\n\n<li>Select your preferred AI model and add a prompt with <strong>User <\/strong>as the <strong>Role <\/strong>to classify the server resource usage. For example:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"atomic\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Analyze the following 24-hour resource usage metric of my VPS:\n\nCPU average: {{ $json['CPU avg'] }}\n\nRAM average: {{ $json['RAM avg'] }}\n\nOutgoing traffic average: {{ $json['Out avg'] }}\n\nIncoming traffic average: {{ $json['Inc avg'] }}\n\nClassify whether the usage is mildly concerning, concerning, or critical<\/pre><p>Based on your classification, identify potential causes and actionable steps for minimizing the usage.<\/p><ol start=\"11\" class=\"wp-block-list\">\n<li>Add another prompt, but this time select<strong> System<\/strong> as the <strong>Role<\/strong> to set how you want the AI to respond. For instance:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"atomic\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Format your analysis as follows:\n\nThe usage is: high\/medium\/normal\n\nI identify the problem lies in your (areas where the issue that causes the spike)\n\nI suggest you do the following: \n\n1. Solution 1\n\n2. Solution 2<\/pre><ol start=\"12\" class=\"wp-block-list\">\n<li>Scroll down and enable <strong>Output Content as JSON<\/strong> and <strong>Simplify Output<\/strong> settings to process the AI output more easily later.<\/li>\n\n\n\n<li>Connect the<strong> Jira create an issue <\/strong>node and <a href=\"https:\/\/docs.n8n.io\/integrations\/builtin\/credentials\/jira\/\">configure the Jira credentials<\/a> to connect your workspace with n8n. This node will automatically create a Jira ticket for further resolution of this problem. <\/li>\n\n\n\n<li>Select the<strong> Project <\/strong>where you want to create the issue and set the <strong>Summary<\/strong> for the ticket. You can include the date when the issue is created, like so:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Resource spike at {{ $now.format('yyyy-MM-dd HH mm ss') }}<\/pre><ol start=\"15\" class=\"wp-block-list\">\n<li>Click <strong>Add fields<\/strong> to include more information in your ticket. For example, add <strong>Description <\/strong>to put details about the AI analysis to your Jira issue:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">VPS resource usage exceeded the threshold. \n\nSeverity: {{ $json.message.content[\"The usage is\"] }}\n\nPotential causes: {{ $json.message.content[\"I identify the problem lies in your\"] }}\n\nSuggested solutions: {{ $json.message.content[\"I suggest you to do the following\"] }}<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b785f5e\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"794\" height=\"1324\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/jira-create-an-issue-configuration.png\/public\" alt=\"The Jira create an issue node configuration for the automatic ticket creation for VPS traffic spikes\" class=\"wp-image-138636\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/jira-create-an-issue-configuration.png\/w=794,fit=scale-down 794w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/jira-create-an-issue-configuration.png\/w=180,fit=scale-down 180w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/jira-create-an-issue-configuration.png\/w=614,fit=scale-down 614w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/jira-create-an-issue-configuration.png\/w=90,fit=scale-down 90w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/jira-create-an-issue-configuration.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"16\" class=\"wp-block-list\">\n<li>Set up the<strong> Slack send a message <\/strong>node to configure where and how you want to receive the alert. Then add the notification message, like:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&#9888;&#65039;**Critical!** VPS resource usage exceeded threshold. Automatically created Jira issue on: {{ $json.self }} <\/pre><p>A finished workflow looks like this:<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e197b7886f2\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1916\" height=\"434\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-resource-usage-monitoring-and-alerting-workflow-on-n8n.png\/public\" alt=\"The VPS resource usage monitoring and alerting workflow on n8n\" class=\"wp-image-138634\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-resource-usage-monitoring-and-alerting-workflow-on-n8n.png\/w=1916,fit=scale-down 1916w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-resource-usage-monitoring-and-alerting-workflow-on-n8n.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-resource-usage-monitoring-and-alerting-workflow-on-n8n.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-resource-usage-monitoring-and-alerting-workflow-on-n8n.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-resource-usage-monitoring-and-alerting-workflow-on-n8n.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/12\/vps-resource-usage-monitoring-and-alerting-workflow-on-n8n.png\/w=1536,fit=scale-down 1536w\" sizes=\"auto, (max-width: 1916px) 100vw, 1916px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p><div><p class=\"important\"><strong>Important!<\/strong> Since AI is unpredictable, sometimes each output is formatted differently. If this happens, your JSON might not pass the data correctly because the placeholder, such as <strong>The usage is<\/strong> in <strong>{{ $json.message.content[&ldquo;The usage is&rdquo;] }}<\/strong>, changes.<\/p><p>In the workflow, we already minimized this issue by providing the output format that the AI will follow as a <strong>System<\/strong> prompt. However, it&rsquo;s crucial to test the workflow thoroughly to ensure the output remains consistent.<\/p><\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-scale-your-n8n-vps-automation\"><strong>How to scale your n8n VPS automation<\/strong><\/h2><p>The Hostinger API offers additional endpoints that enable you to scale your n8n workflow to automate a broader range of tasks beyond simple status monitoring. You can check the complete list of endpoints in the API documentation page, among them:<\/p><ul class=\"wp-block-list\">\n<li><strong>Snapshot<\/strong>. Lets you create, get, and delete a snapshot of your VPS. This enables you to create a workflow that automatically creates a restoration point of your server before a scheduled major system maintenance. <\/li>\n\n\n\n<li><strong>Firewall. <\/strong>Enables you to manage various aspects of your VPS firewall and its rules. For example, you can create a workflow that temporarily disables stale or unused rules to reduce performance overhead during traffic spikes.    <\/li>\n\n\n\n<li><strong>Docker<\/strong>. Allows you to interact with our built-in <strong>Docker Manager <\/strong>tool to manage your containerized services. Using this endpoint, you can automatically stop a container during a scheduled update or security audit. <\/li>\n\n\n\n<li><strong>Actions<\/strong>.<strong> <\/strong>Retrieves detailed information about actions in your VPS. This is helpful for creating a workflow that automatically alerts you about suspicious activity. <\/li>\n<\/ul><p>n8n also provides various other nodes that enable you to process data more flexibly and integrate different applications into your workflow.<\/p><p>For example, you can add the <strong>PagerDuty<\/strong> node to set up a more robust disaster and incident management process. You can also connect multiple workflows for different tasks together to create a unified, scalable automation system.<\/p><p>Combining various n8n nodes and Hostinger API endpoints enables you to create a customized automation system tailored to your specific needs, which brings numerous benefits.<\/p><h3 class=\"wp-block-heading\"><strong>n8n-Hostinger integration limitation<\/strong><\/h3><p>While combining n8n and the Hostinger API provides powerful automation capabilities, it&rsquo;s essential to understand that this system has inherent limitations.<\/p><p>For one,<strong> <\/strong>tasks you can automate are limited to what the Hostinger API endpoints offer. While we continuously add more functionality to the API, some critical tasks must be done directly on the system for security reasons.<\/p><p>This limitation also means that you cannot create a fully self-healing automation workflow that takes corrective actions independently upon encountering errors. Even if the API allows it, developing a self-healing automation can be tricky because it may perform actions that can break the system, like shutting down a critical service to free up resources during a traffic spike, if not tested carefully.<\/p><p>While Hostinger API is currently not suitable for complex self-healing automation, it offers endpoints for basic management tasks like restoring a backup, changing a nameserver, or uploading SSH keys.<\/p><h2 class=\"wp-block-heading\" id=\"h-best-practices-for-automating-vps-management\"><strong>Best practices for automating VPS management<\/strong><\/h2><p>Following best practices when using n8n and the Hostinger API to automate VPS management is crucial to maintaining optimal security and workflow functionality.<\/p><p>Here are several <a href=\"\/ng\/tutorials\/n8n-best-practices\">best practices when using n8n<\/a> to automate tasks:<\/p><ul class=\"wp-block-list\">\n<li><strong>Secure your workflow<\/strong>. Safeguard all credentials, such as API tokens and application passwords, to prevent unauthorized parties from accessing them. While n8n masks all sensitive information and restricts access to the credential owners by default, make sure to use an encrypted platform like NordPass if you store them locally. <\/li>\n\n\n\n<li><strong>Follow <\/strong><a href=\"\/ng\/tutorials\/vps-security\"><strong>VPS security<\/strong><\/a><strong> practices<\/strong>. In addition to your workflow, your n8n hosting environment must remain secure. A compromised server can expose your automation platform to security risks and interruptions.<\/li>\n\n\n\n<li><strong>Use n8n queue mode<\/strong>. If you have a complex automation system involving multiple workflows, consider using the <a href=\"\/ng\/tutorials\/n8n-queue-mode\">n8n queue mode<\/a>. It distributes processes to multiple workers for more efficient execution, especially useful for less powerful VPSes. <\/li>\n\n\n\n<li><strong>Handle errors properly<\/strong>. Create an automated notification to catch errors in your VPS monitoring workflow. To do this, use n8n&rsquo;s built-in <strong>Stop and Error <\/strong>node<strong> <\/strong>and the <strong>Error Trigger<\/strong>.<\/li>\n\n\n\n<li><strong>Update n8n regularly<\/strong>. Install the newest version of n8n as soon as it is released to maintain optimal security and functionality. Refer to our tutorial on installing n8n for more information on the steps.  <\/li>\n\n\n\n<li><strong>Test and document your workflow<\/strong>. Thoroughly test your workflow, ideally in a dedicated staging environment, to ensure it works properly before the deployment. Also, document all aspects of your workflow so you can identify errors and add more functionality more easily.<\/li>\n\n\n\n<li><strong>Consider the API rate limit<\/strong>. APIs commonly limit how frequently you can use them to prevent misuse and exploitation. Avoid running your workflow too often, such as every hour, as it may cause issues. <\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-whats-next-after-automating-your-vps-management\"><strong>What&rsquo;s next after automating your VPS management?<\/strong><\/h2><p>Combining n8n and the Hostinger API enables you to streamline repetitive tasks and minimize human error, resulting in more efficient VPS management.<\/p><p>After understanding what n8n and the Hostinger API can achieve, it&rsquo;s time to explore various endpoints and nodes to determine the most effective way to automate your VPS management.<\/p><p>In addition to an API, Hostinger provides an <a href=\"\/blog\/vps-kodee-mcp\">MCP-powered Kodee AI assistant<\/a> to simplify VPS management further. Since it offers more extensive capabilities than the API, it makes an excellent complement to your automation system.<\/p><p>For example, you can restart services by simply chatting with the AI assistant. Like our API, you can use Kodee for free, which is also pre-configured on your VPS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automating Hostinger virtual private server (VPS) management using n8n and our public API helps streamline repetitive tasks, such as monitoring uptime and sending alerts on Slack. In addition to making the task more efficient, it reduces human errors and enables you to focus on crucial tasks that require more complex configurations, like fine-tuning firewall rules. [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/tutorials\/automate-vps-management-using-n8n\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":337,"featured_media":142966,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to automate VPS management using n8n and Hostinger API","rank_math_description":"Learn how to automate VPS management using n8n and Hostinger API: 1. Set up n8n; 2. Obtain the API token; 3. Connect n8n to Hostinger API + more.\n","rank_math_focus_keyword":"automate vps management using n8n","footnotes":""},"categories":[22644],"tags":[],"class_list":["post-138599","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/automate-vps-management-using-n8n","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/automate-vps-management-using-n8n\/","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/automate-vps-management-using-n8n\/","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/automate-vps-management-using-n8n\/","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/automate-vps-management-using-n8n\/","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/automate-vps-management-using-n8n\/","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/automate-vps-management-using-n8n\/","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/automate-vps-management-using-n8n","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/138599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/337"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=138599"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/138599\/revisions"}],"predecessor-version":[{"id":142965,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/138599\/revisions\/142965"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media\/142966"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=138599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=138599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=138599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}