OPENCLAW

Running an OpenClaw backend on your VPS

read · 7 min

OpenClaw is open-source software — the platform is free, you only pay for the model you point it at. Hosting it yourself means your assistant runs 24/7 and you control every layer, from model to messaging channel.

Steps

01

Install Docker and Compose

OpenClaw ships as containers. Install Docker Engine and the Compose plugin.

$ curl -fsSL https://get.docker.com | sh
$ sudo docker compose version
02

Clone the repository

Pull the source onto your VPS.

$ git clone https://github.com/openclaw/openclaw.git
$ cd openclaw
03

Configure your environment

Copy the example env file and fill in your model provider key. Pick any backend — Claude Opus, GPT, Gemini, DeepSeek or a local Ollama endpoint.

$ cp .env.example .env
$ nano .env # set MODEL_PROVIDER and API key
04

Start the stack

Bring the containers up in the background. They restart automatically after a reboot.

$ sudo docker compose up -d
$ sudo docker compose logs -f
05

Connect a messaging channel

Add a channel token (Telegram, WhatsApp, Discord) in your .env and restart. Your assistant is now reachable from your phone.

$ sudo docker compose restart

Frequently asked

Is OpenClaw free? +

The software is open-source and free. Your only cost is the model — a flat VPS fee plus per-token API usage, or zero extra if you run a local model.

Which models can it use? +

Any major provider: Claude, GPT, Gemini, DeepSeek, or a local model served through Ollama. You set the provider in .env.

Can it handle several channels at once? +

Yes — Telegram, WhatsApp, Discord and others can run side by side from the same backend.

Related guides

Ready to self-host your assistant?

Get a VPS with the resources and uptime an always-on assistant needs.

See VPS plans →