How to Self-Host OpenClaw on Hostinger Docker
OpenClaw is the open-source AI agent that everyone is suddenly using. The catch is that running it well needs a small Linux box that stays online twenty-four hours a day. This guide walks through the cheapest reliable way we have found to do that: a Hostinger Docker Hosting plan.
Plan ahead for roughly fifteen minutes from checkout to a working agent.
A note on the link: we recommend Hostinger Docker Hosting and the link below is our partner link. It gives you a twenty percent discount on the twelve-month plan, and we get a small commission. You pay the discounted price either way.
Step 1 β Buy the hosting
Open the partner link above. You will land on a pre-filled cart for the Docker Hosting Starter plan with the twenty percent discount already applied. Pick a data center close to your users, create your Hostinger account, and pay.
Two things to do straight after checkout:
- From the Hostinger dashboard, open the new server and copy the public IP address.
- Set a root password if the dashboard has not generated one for you, and download the SSH key it offers.
Step 2 β SSH in and check Docker
From your laptop:
ssh root@YOUR_SERVER_IP
docker --version
You should see a Docker version string. Hostinger ships the Starter plan with Docker and Docker Compose already installed, so there is nothing to set up here.
If you would rather use a non-root user, create one now:
adduser claw
usermod -aG docker,sudo claw
Log out and back in as claw for the rest of the guide.
Step 3 β Create an OpenClaw working directory
mkdir -p ~/openclaw && cd ~/openclaw
Inside, create two files. First, the environment file:
cat > .env <<'EOF'
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
OPENCLAW_ADMIN_TOKEN=$(openssl rand -hex 24)
EOF
Replace the placeholders with your real provider keys. You can keep only the providers you actually use.
Then a small docker-compose.yml:
services:
openclaw:
image: openclaw/openclaw:latest
restart: unless-stopped
env_file: .env
ports:
- "80:8080"
volumes:
- ./data:/var/lib/openclaw
Step 4 β Start the agent
docker compose up -d
docker compose logs -f openclaw
On the first run, OpenClaw pulls its image and writes a default configuration into ./data. Once the logs settle on a listening on :8080 line, open http://YOUR_SERVER_IP in a browser. You will see the OpenClaw web UI and a prompt for the admin token you generated in step three.
Step 5 β Pair a channel
The fastest way to feel that the agent is alive is to wire it into a messaging app. In the OpenClaw UI:
- Open Channels β Telegram, paste a bot token from
@BotFather, and click Pair. - Send a message to your bot. The agent replies from your server, using whichever provider key you supplied.
Repeat the same flow for WhatsApp, Slack, or Discord later.
Step 6 β Lock the front door
For a personal agent, expose it behind HTTPS with Caddy. Drop a Caddyfile next to your compose file:
your-domain.example {
reverse_proxy openclaw:8080
}
Add a Caddy service to docker-compose.yml, point your domainβs A record at the server IP, and restart. Caddy will fetch a Letβs Encrypt certificate automatically.
What you end up with
A privately hosted OpenClaw agent on a box that costs less than a cup of coffee per week. Conversations, API keys, and tool credentials never leave your hardware, and you can move the whole thing to a different host any time by copying the openclaw/ directory.
If you have not bought the hosting yet, the partner link is here again: Hostinger Docker Hosting β 20% off.