Why host OpenClaw on your own infrastructure?
AI agents have access to sensitive data: internal documents, business APIs, customer databases. Entrusting the orchestration of these agents to a third-party platform exposes your data to risks you cannot control. On your VPS, execution stays confined to your infrastructure.
What you can do with OpenClaw on a VPS
- Create autonomous agents that access your internal APIs
- Automate complex workflows with multiple steps and conditions
- Connect your preferred LLMs (OpenAI, Anthropic, Ollama…)
- Run scheduled or event-triggered tasks
- Log and audit all agent actions
Prerequisites
OpenClaw runs via Docker. You will need a VPS with at least 2 GB of RAM, Docker installed, and an API key for the LLM of your choice. If you want to use a local model (via Ollama), plan for 8 GB of RAM.
Deployment
Configure the server
An up-to-date Ubuntu 22.04 VPS, with Docker and Docker Compose installed. Create a dedicated user for running OpenClaw to limit permissions in the event of a compromise.
Fetch and configure OpenClaw
Clone the official repository. Copy the example environment file and configure your LLM API keys, database settings, and the API access your agents will need to use.
Start the services
Launch the containers with Docker Compose. The first startup initializes the database and the default configurations. Access the administration interface on the configured port.
Expose over HTTPS
Configure Nginx as a reverse proxy with Let's Encrypt SSL. Restrict access by IP or set up basic HTTP authentication if the interface should not be public.
OpenClaw can integrate with n8n to trigger AI agents from your automation workflows. Both can run on the same VPS and communicate via the internal Docker network.