How to Deploy OpenClaw on a VPS using Hostinger and OpenRouter

In this blog, I will be going over how to easily and securely deploy an OpenClaw agent on a VPS(virtual private server) using Hostinger. We will be using OpenRouter API keys with their FREE tier to run agentic AI tasks. An OpenRouter API key will allow you access to models from multiple providers(OpenAI, Anthropic, xAI etc) with options for zero data retention models if you prefer.

This will be the first of a series of blog posts, where I will be going over how to setup and configure agentic AI systems for security tasks such as automated recon and penetration testing. 

The following are required to setup your OpenClaw agent on Hostinger VPS:

  • Hostinger account(refer to link above to setup KVM 2) with Ubuntu VPS
  • OpenRouter account with API keys (free tier)

If you haven’t gotten a Hostinger account or deployed a VPS yet, get 20% off with my referral link below – you will be taken to the cart in the next screenshot with the right configs:
https://www.hostinger.com/cart?product=vps%3Avps_kvm_2&period=12&referral_type=cart_link&REFERRALCODE=JPITLZ3RBF54&referral_id=019da8d2-1057-71c2-aa6b-321a02004430

Easy OpenClaw Deployment on KVM 2 with Docker Manager

Virtual Private Server Setup on Hostinger

First, we need to set up a VPS using the KVM 2 (Kernel-based Virtual Machine) option on Hostinger. Click here for the KVM 2 configuration(with 20% discount). The KVM 2 options provides 2 vCPU cores, 8 GB RAM, 100 GB and 8 TB bandwidth for a reasonable price. This provides more flexibility and headroom when scaling up tasks such as using multiple tools or creating sub-agents for specialized tasks. Additionally, you would pay the upfront yearly amount, which could save you costs if you are running your agent 24/7 for the entire year. No worries for going over budget on your VPS. 

Make sure to select the server location that is in the region where you want to run your tasks. Note that sometimes, the United States server may not be available as an option, if there are no available VPS spaces during the time of setup. You can wait a few hours or a day to check back and see if that server location is available.

Under OS, select Ubuntu 24.04 LTS and Confirm then scroll up and click on Continue.

You will be prompted to make a payment, and have the option to enable the following:

  • Malware Scanner
  • Docker Manager

Make sure to check both of the items listed above before the next step.

OpenClaw Docker Deployment 

On your VPS tab – click on “Manage” and you should be brought to the Overview section.

Then click on “Docker manager”

Click on “Compose” and select the “One click deploy” option in the dropdown.

Type “openclaw” in the catalog search and click on “Select” for “OpenClaw”

You will see the field for “Gateway Token”, highlight and copy this token to a safe location on your personal machine, or save to a file for use later. We will need this to safely access your OpenClaw dashboard through your browser. IMPORTANT!! DO NOT SHARE YOUR GATEWAY TOKEN!! This is the only way for you to access your OpenClaw agent dashboard safely through the web – please DO NOT SHARE with unauthorized persons. 

If you already have API keys for a specific account, you may choose to enter them here. Otherwise please go to the next step to use OpenRouter, as this grants you more flexibility in using a wide range of AI models across different platforms and vendors(OpenAI, Anthropic, xAI etc)

When you are ready, scroll down and click on “Deploy”.

Wait a few minutes and under Docker Manager, you should see two projects running, the openclaw docker container and the traefik reverse proxy and load balancer.

OpenRouter API Key and Test Prompt

Before we run our agent, we need to create an OpenRouter API key for our OpenClaw agent. After creating your OpenRouter account, go here: https://openrouter.ai/workspaces/default/keys

Click on “Create” to create an API key:

Set a name for the API key as well as a Credit limit just in case, I’ve set this to $3 for this demo just in case. However we will be using the free tier, so no need to worry if you haven’t added a payment to your OpenRouter account. 

You should get a new API key, make sure to copy this to a note file for the next step.

Go back to the Docker Manager in Hostinger, and click on “Manage”:

Scroll down to “Environment” and enter a new environment variable with “OPENROUTER_API_KEY” and the value as the OpenRouter API key from the previous step.

Scroll up and click on “Deploy” to redeploy your Docker container and apply the new configurations.

Go back to your Docker manager and click on “Open” to access your OpenClaw dashboard through your browser.

You will then be prompted to use your Gateway Token from the first step:

Now let’s run a test to see if your agent is running, set the model to “openrouter/free” and use the following prompt:
“Hello, just testing to see if you are running. Please respond.”

Let’s a do a quick test for the agent to visit a web page and summarize the contents with the following prompt:

Analyze the following blog and summarize the key points in 10 bullet points:
https://hiddendoorsecurity.com/2025/07/05/how-to-crush-web-app-penetration-tests/

Your agent will visit the page and summarize the contents:

Conclusion

There are many use cases for installing OpenClaw on a VPS. Primarily for scaling and up-time, but most of all the flexibility to configure your VPS and have easy access to your OpenClaw dashboard anywhere and at anytime, using your Gateway Token. Hostinger comes with pre-configured OpenClaw deployments with security configurations by default so that when you deploy it on a VPS on their platform, your OpenClaw instance is secure. This is the first of a series of guides and I will be publishing more tips and walkthroughs for specific use cases in the future and I hope you’ve found this useful.

– Z333RO

Discover more from Hidden Door Security

Subscribe now to keep reading and get access to the full archive.

Continue reading