Vai al contenuto principale

OpenClaw VPS Hosting Guide

OpenClaw VPS Hosting Guide
How to safely self-host OpenClaw on a VPS — covering Hostinger, DigitalOcean, Hetzner, AWS, and Oracle Cloud. Includes firewall rules, auth hardening, and Docker deployment steps.

A VPS keeps OpenClaw available when your laptop is offline, so channels, tools, and long-running sessions can stay reachable from a stable host.

That convenience also puts the Gateway on public infrastructure. Harden access first with firewall rules, SSH controls, authentication settings, and a clear plan for which services are exposed.

OpenClaw on a VPS is useful for remote availability, channel access, and persistent agent sessions. Verdent fits downstream when those sessions need to become planned software work with task structure, parallel execution, code review, and delivery tracking.

Use the VPS as the secure runtime for OpenClaw, then connect only the repositories, automations, and workflows you are ready to operate and monitor.

Minimum VPS Specs for OpenClaw (RAM, CPU, Storage)

WorkloadSuggested starting point
Gateway with cloud model2 vCPU, 2 GB RAM
Several channels and tools2 to 4 vCPU, 4 GB RAM
Docker build on server4 GB RAM
Local model inferenceUse a GPU host instead

Start with 20 GB of SSD storage. Increase it for logs, repositories, workspaces, and container images.

Treat the minimum as a safe starting point, not a guarantee. A small OpenClaw VPS works best when the Gateway uses cloud models and the server only handles orchestration, channels, and tool access. Add RAM when the same server runs browser-based tools, background jobs, Docker builds, larger workspaces, or multiple active channels.

For a first production setup, choose 2 vCPU, 4 GB RAM, SSD storage, automated backups, and a region close to the users or services that connect to the Gateway. Add swap so short memory spikes fail more gracefully, but do not use swap as a substitute for enough RAM.

Before connecting real channels, check three basics:

  • The OpenClaw data directory has persistent storage.
  • Logs have enough disk space and a retention plan.
  • The server can reboot without losing tokens, channels, or workspace state.

VPS Provider Comparison: Hostinger vs DigitalOcean vs Hetzner vs AWS

ProviderBest fitMain trade-off
HostingerSimple fixed plansFewer infrastructure controls
DigitalOceanClear developer workflowMay cost more than budget hosts
HetznerStrong value in supported regionsRegional availability varies
AWSAdvanced networking and controlsMore setup complexity

Oracle Cloud is another option. Capacity and free-tier terms can change.

Compare region, backups, egress, support, snapshots, firewall controls, and recovery options. Do not choose on headline price alone.

A simple provider can be the right choice when you want one server, predictable billing, basic backups, and a short setup path. DigitalOcean and Hetzner are often easier to operate for small developer teams because the VPS, firewall, snapshots, and monitoring controls are straightforward.

Choose AWS or another advanced cloud when you need private networking, IAM controls, central logging, compliance workflows, managed monitoring, or integration with an existing cloud account. That control adds setup work. You still need to configure SSH access, firewall rules, backups, and credential rotation.

For any provider, create the server with SSH keys instead of password login when possible. Enable provider-level backups or snapshots before production use. Keep the OpenClaw Gateway private behind a VPN, authenticated tunnel, or locked-down reverse proxy.

Firewall Rules: Never Expose OpenClaw Ports Publicly

Allow SSH only from trusted addresses when possible. Use SSH keys, disable password login where your provider and operating system allow it, and keep the operating system patched.

Do not open port 18789 to the world. The local Control UI was not designed as an unauthenticated public page.

Use:

  • A private VPN.
  • Tailscale.
  • An authenticated tunnel.
  • A locked-down reverse proxy.

A safe baseline is simple: expose only SSH to trusted administrators, keep the OpenClaw Gateway bound to a private interface or localhost, and place authentication in front of any remote access path.

If you use UFW on Ubuntu, the pattern is:

sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow from YOUR_TRUSTED_IP to any port 22 proto tcp
sudo ufw enable
sudo ufw status

Do not add a broad rule such as allow 18789/tcp for the public internet. If a tunnel or reverse proxy needs to reach the Gateway, point it to the private local address and enforce authentication before access reaches OpenClaw.

Review firewall rules after every provider migration, operating system rebuild, tunnel change, or reverse proxy change. A working deployment is not automatically a safe deployment.

Setting Up Auth Tokens and Secure Gateway Config

Generate a strong Gateway token during onboarding.

openclaw onboard --install-daemon

Keep secrets in protected environment files. Restrict file permissions.

Also configure:

  • Sender allowlists.
  • Channel-specific tokens.
  • Tool permissions.
  • Session isolation.

Rotate credentials after an incident or administrator change.

Use separate credentials for separate channels when possible. A chat channel, repository integration, and automation tool should not all share one long-lived secret if your setup supports scoped tokens. This limits the damage if one channel is misconfigured or exposed.

Store environment files outside public web roots and repository folders. On Linux, restrict access so only the OpenClaw service user or administrator can read them:

chmod 600 /path/to/openclaw.env

Document where each secret is used, who can rotate it, and what must restart after rotation. After changing tokens, test the Gateway, channels, and tool permissions before considering the change complete.

For production use, keep tool permissions narrow. Give OpenClaw access to the commands, repositories, and workspaces it needs, not the entire server by default.

When you separate channel tokens and tool permissions, the OpenClaw Architecture guide shows how those auth boundaries map to the system layout.

For source-level validation, Gbnetwork is worth checking after you understand the OpenClaw VPS Hosting Guide workflow described here.

Persistent Sessions Across VPS Reboots

Install the managed service:

openclaw onboard --install-daemon

For Docker:

docker compose up -d

Use a restart policy. Mount persistent data. Test one controlled reboot.

Back up ~/.openclaw or the equivalent container volumes.

Persistence depends on two things: the process must restart, and the data must survive. A service manager or Docker restart policy handles the process. A mounted data directory or named volume handles the state.

For a Docker deployment, verify that Compose maps OpenClaw data to a persistent volume or host directory. For a non-Docker deployment, verify that the service user owns the OpenClaw data directory and can read it after reboot.

Use this reboot test before production use:

  1. Start OpenClaw and connect a test channel.
  2. Create or resume a test session.
  3. Reboot the VPS.
  4. Confirm the OpenClaw service or container starts without manual commands.
  5. Confirm the test session, channel configuration, and stored credentials still work.
  6. Check logs for permission errors, missing mounts, or failed network dependencies.

Backups should cover configuration, tokens, session data, workspaces, and any files needed to rebuild the deployment. Store at least one backup outside the VPS provider account when the setup matters to production work.

> Verdent proof > > Verdent's 76.1% SWE-bench Verified resolution rate supports its core claim: Your AI Development Team should deliver reviewed work, not just suggestions. > > Verdent combines Parallel Power with isolated execution, so faster work does not create a larger review problem.

After the reboot test passes, use the OpenClaw Mission Control Dashboard to confirm sessions, channels, credentials, and workspace state remain visible from one place.

Before you budget a real project around OpenClaw VPS Hosting Guide, compare the claims here with the official documentation.

Cost Breakdown: Running OpenClaw on VPS vs Managed Alternatives

VPS cost is only one part.

Include:

  • Server rental.
  • Backups.
  • Model API usage.
  • Monitoring.
  • Maintenance time.
  • Security response.

A small cloud-model Gateway can run on a basic VPS. Local inference usually changes the economics.

For a realistic estimate, separate fixed infrastructure from variable usage. The VPS, backups, snapshots, and monitoring are recurring infrastructure costs. Model API usage, storage growth, data transfer, and build workloads can increase with activity.

Also account for owner time. Someone must patch the operating system, review firewall rules, rotate tokens, monitor disk usage, update containers, test backups, and respond to incidents. A low monthly server bill can still be expensive if it creates ongoing maintenance work for a developer team.

Running OpenClaw on a VPS makes sense when you want control over hosting, network access, and self-managed operations. A managed alternative makes more sense when the team values reduced maintenance, shared workflow visibility, review discipline, and predictable operational ownership.

For coding projects, Verdent removes the need to build your own multi-agent development control layer. The VPS can host local infrastructure, while Verdent coordinates planned, parallel, reviewable software work.

Frequently Asked Questions

Can OpenClaw run on a 1 GB VPS?

It may run for a very small cloud-model setup, but it leaves little room for Docker, logs, channels, and temporary memory spikes. Docker builds can fail on 1 GB. Start with at least 2 GB, and use 4 GB when the VPS runs several channels, tools, or build jobs.

Do I need a GPU?

Not when using cloud models. A CPU VPS can run the Gateway and orchestration layer while model inference happens through external model APIs. Use a GPU host only when you plan to run local model inference on the server.

Which port does OpenClaw use?

The default Control UI port is 18789. Do not expose that port directly to the public internet. Keep it private behind a VPN, authenticated tunnel, or locked-down reverse proxy.

Should I use a reverse proxy?

Only with authentication, TLS, and a clear access policy. A reverse proxy is not enough by itself. It should restrict who can reach the Gateway, forward only the required private service, and be reviewed whenever access rules change.

How do I preserve sessions?

Persist the OpenClaw data directory and back it up. For Docker, use named volumes or mounted host directories. For a service install, make sure ~/.openclaw or the configured data path survives reboots and is owned by the service user.

Is a VPS safer than a home server?

Not automatically. A VPS usually has better uptime, bandwidth, and provider-level recovery options, but security depends on configuration and maintenance. SSH rules, firewall policy, authentication, patching, backups, and credential rotation matter more than the hosting location alone.

Where Local Stops, Verdent Starts

A self-hosted VPS gives you control over hosting, access, and persistence. It does not solve software coordination by itself.

Local execution stays local, while planning, parallel work, review, and delivery remain part of one managed workflow with Verdent.

Next Step

Separate OpenClaw Hosting from Delivery

Use your VPS for controlled OpenClaw execution while Verdent helps keep planning, review, and coordination in one managed workflow.