Updated Nov 26, 2026· 12 min read

Key takeaways

  • A beginner OpenClaw self hosting guide: install the gateway, connect a model and Telegram, lock it down, and keep your AI agent running around the clock.

OpenClaw Self Hosting Guide Beginners: Your Own AI Agent, On Your Own Machine

This openclaw self hosting guide beginners walkthrough takes you from zero to a working AI agent on hardware you control. OpenClaw is a free, MIT-licensed, open-source AI agent created by Peter Steinberger. It began as Clawdbot in November 2025, grew into one of the most starred projects on GitHub, and is now stewarded by the OpenClaw Foundation, an independent nonprofit formed in February 2026. You run a small program called the Gateway on your own computer or server, and it connects your messaging apps to an AI model, plus tools and skills you choose.

Quick answer: To self-host OpenClaw, install Node.js 24.16 or later, run the official installer, then run onboarding with the daemon option so the Gateway starts automatically and survives reboots. Connect one AI model provider with an API key, connect one channel such as Telegram, approve yourself as the only allowed sender, and keep the dashboard on its loopback address, reached through an SSH tunnel rather than exposed to the internet.

Quick Picks: The Whole Setup at a Glance

Step What you do Get it right
1. Pick your host Laptop, mini PC, Raspberry Pi, or small VPS A machine that stays on
2. Install Node 24.16 or newer, then the installer The right Node version
3. Onboard Answer the wizard, install the daemon A normal user, never root
4. Connect a model API key from one provider, or a local model One provider, one model
5. Connect a channel Create a Telegram bot, approve yourself Locked to your user ID
6. Secure it Token, firewall, loopback binding, updates Dashboard never public
7. Keep it running Daemon, lingering, logs, backups Check after every reboot
## How to Choose: What to Decide Before You Start

The installation itself is short. The decisions around it decide whether you end up with an agent you enjoy or one that becomes a chore. Make these five choices before you type the first command.

Where the Gateway Will Live

OpenClaw is a single long-running Node.js process, so steady availability matters more than raw power. A laptop works for a first try, but laptops sleep and shut down, and every one of those events disconnects your agent. For an agent you want at any hour, the machine must stay on.

A Raspberry Pi 5 or a small mini PC is cheap to run and keeps your data at home. A small VPS from DigitalOcean, Hetzner Cloud, Vultr, Akamai Linode, Hostinger VPS, or Contabo gives you a stable connection and a fixed address; Oracle Cloud has an always-free tier for a first server. A spare desktop you already own is the cheapest option. Aim for at least 1 vCPU, 2 GB of RAM, and 20 GB of disk.

Which Model Provider to Use First

OpenClaw does not include a language model. It connects to one, and that choice decides how smart and how private your agent feels. The mainstream starting points are Anthropic Claude, OpenAI GPT, and Google Gemini, each reached with an API key you create on the provider’s own site, or reuse an existing Claude Code or Codex CLI login.

For privacy, use a local model instead. Ollama is the usual route: it serves models on your own machine, and OpenClaw points at it over a local address. Local models are less capable than flagship cloud models, but they need no API account and keep everything in-house. Start with one provider; you can switch models later without reinstalling.

Which Channel to Connect First

Channels are the apps you talk to the agent through: Telegram, Discord, Slack, WhatsApp, Signal, and iMessage are all supported. Start with exactly one channel, and Telegram is the best first choice for most people. It works on every device, bot setup takes minutes through the official BotFather account, and its long-polling transport means your server does not need to accept incoming connections from the internet. Each channel adds its own token, access rules, and failure modes. Get one channel working and locked down before adding another.

Direct Install or Docker

There are two ways to install OpenClaw. The direct install puts the command-line tool on your machine with npm and runs the Gateway as a systemd service. It is the simplest path on a Linux server or a Mac, and the one this guide follows. Docker is the alternative: the official image bundles the Gateway, the command-line tool, and the Control UI in one container with a Node 24 runtime, with a volume for your configuration. Docker suits you if you already run containers or plan to move the setup between machines, but it adds concepts to learn, and Docker networking can bypass a host firewall. If you have never used Docker, start with the direct install.

What the Agent May Touch

Before onboarding, think about the tools and folders your agent genuinely needs. Notes, calendar, and web search are useful on day one. Full access to your shell, email, and every file is a bigger commitment, best granted gradually. Decide now that the dashboard will never be exposed to the internet, that only your own accounts may message the agent, and that the agent runs as an ordinary user with no administrator rights. Its workspace is a dedicated directory with files for instructions, personality, tools, and memory. Start narrow: a workspace folder of its own, a small set of tools, and clear rules about what it should never do, such as deleting files or messaging people without asking first.

The Best OpenClaw Self Hosting Guide Beginners Reviewed: The Steps

The sections below follow the real order of a first install. Complete and verify each step before moving on, so a problem in step three never masquerades as a problem in step six.

Step 1: Install Node.js and OpenClaw

OpenClaw needs Node.js 24.16 or newer, or Node 26.1 or newer; the project recommends Node 26. Node 22 is no longer supported, so upgrade an older Node first. Check what you have with the version command. Get the right release through your operating system’s normal route: the NodeSource repository on Ubuntu and Debian, Homebrew or nvm on macOS, or winget or nvm-windows on Windows.

Once Node is in place, run the official installer from openclaw.ai. On macOS and Linux it is a single shell command; on Windows there is an equivalent PowerShell one-liner. The installer checks Node and Git, installs the OpenClaw tool globally through npm, and prepares the configuration directory at ~/.openclaw/ on macOS and Linux, or under your user profile on Windows. Verify it by asking the tool for its version.

Step 2: Run Onboarding and Install the Daemon

Onboarding is the guided wizard that turns a bare install into a working agent. Run the onboarding command with the daemon option, which registers the Gateway as a background service at the same time. The wizard walks through your workspace, model provider and authentication, gateway settings, your first channel, optional skills, and the daemon itself plus a health check.

First, run everything as a normal user, never as root: an agent that can run shell commands should never hold administrator rights. Second, on Linux, enable lingering for your user so the service survives logout and starts at boot. Without it, a reboot or a closed SSH session can silently stop your agent. On macOS the equivalent is a launchd agent, and on Windows a scheduled task or service manager. After onboarding, confirm the service is active.

Step 3: Connect Your First Model

During the wizard, paste the API key you created on your provider’s site. OpenClaw tests the key before saving it, so a typo fails loudly here instead of silently later. Credentials are stored as named auth profiles, with the raw secrets in your configuration directory, so keep that directory private.

For a local model, the wizard points OpenClaw at your local model server, commonly Ollama on its default local address. Either way, finish by sending the agent a first message and confirming it answers with the model you selected. If it does not answer, the health check command confirms model access, daemon health, and channel pairings in one pass.

Step 4: Connect Your First Channel With Telegram

Telegram setup has five short moves. First, create the bot: in Telegram, open the official BotFather account, check its verified mark, send the new-bot command, give the bot a name and a username ending in bot, and copy the token. Treat that token as a password: whoever holds it can run your bot until you regenerate it.

Second, give OpenClaw the token. Third, confirm the Gateway is running and check the connection. Fourth, send your bot a first message. With the default pairing policy, OpenClaw replies with an eight-character pairing code, valid for one hour. Fifth, approve the chat on your server with the pairing commands.

Then lock the door: switch to allowlist mode with your numeric Telegram user ID, so nobody except the listed IDs can ever message your agent. Find your numeric ID in the pairing reply or the logs. In groups, require a mention before the bot answers; a DM pairing approval never authorizes the same person in a group.

Step 5: Secure the Gateway Before Anything Else

Do this the same day you install. Start with the binding: the Gateway listens on the loopback address and port 18789 by default. Keep it that way. Reach the dashboard through an SSH tunnel, or a private network tool such as Tailscale. Never open port 18789 in your firewall, and never put the Gateway behind a public reverse proxy without authentication.

Onboarding generates a gateway token to protect the dashboard; you need it to log in. Store it in a password manager, rotate it if you suspect a leak, and never stay logged in on a shared machine. On a server, allow SSH and nothing else inbound, and use a non-root user with key-based login. Keep the operating system and OpenClaw updated: in March 2026, several advisories landed together, including CVE-2026-32922, a critical privilege-escalation flaw rated 9.9, fixed in the March 2026 releases. Finally, scope the agent’s power: turn on approval prompts for shell commands and file writes until you trust the setup, and review the skills you enable.

Step 6: Keep It Running Around the Clock

This step is about making uptime boring. The daemon you installed during onboarding already restarts the Gateway after crashes and reboots, provided lingering is enabled on Linux or the equivalent autostart is set on macOS and Windows. Verify that after your first reboot by checking the service status and confirming the dashboard answers. If it is not running, the fix is usually lingering, a missed enable step, or a wrong service file.

Three commands answer most questions about a silent agent: status, service status, and logs, where a bad API key, a revoked token, or a failed model call usually announces itself plainly. When the bot stops replying, check in order: is the Gateway running, is the channel connected, is the model reachable, and did a token change. Give the host a stable power supply and, on a Raspberry Pi, a reliable adapter and quality storage, because sudden power loss corrupts storage more often than any software bug. Leave headroom on disk, since logs and workspace files grow over months.

Step 7: Give It a Personality, Memory, and Skills

Once the mechanics work, shape the agent into yours. Its workspace holds plain-text files that define it: the soul file for personality and tone, the operating-instructions file for its rules, the tools file for what it can use, and memory files for facts about you and your projects. Edit these in any text editor, then restart the Gateway.

Skills extend what the agent can do: web search, browser control, calendar access, and file organization. Add one skill at a time, try it with a real task, and keep the ones that earn their place. Write instructions like a brief to a careful assistant: specific, short, and honest about what matters. Check the memory file every few weeks and prune anything stale, because an agent can act on an old preference as firmly as a current one.

Step 8: Update and Back Up Like It Matters

Updates bring model support, channel fixes, and security patches, so make updating a routine. Check the version, read the release notes, update the package, restart the Gateway, and run the health check. If an update changes a configuration format, the doctor command can repair it. Update when you have a few minutes to watch the logs, not just before you need the agent.

Backups are small: copy the configuration directory, including the workspace, the configuration file, and the state database, to another machine. The secrets live there, so encrypt the backup. Test a restore at least once, because a backup you have never restored is a hope rather than a plan.

What to Check Before You Go Live

Run through this list before you tell anyone about your agent, and again when you add a channel or a skill.

  • Gateway binds to loopback only; port 18789 stays closed.
  • Dashboard reached by SSH tunnel or private network, never a public address.
  • Gateway token lives in a password manager, never in a message or screenshot.
  • Only your accounts may message the agent, via allowlist or approved pairing, on every channel.
  • Agent runs as a normal user, no administrator rights; lingering or autostart enabled.
  • Model key works, the agent answers, the health check passes, and you know where the logs live.
  • A backup of the configuration directory exists off the host machine.
  • Installed version is current, with the March 2026 security releases or later.
  • Unsupervised actions are decided; risky ones still ask first.

Frequently Asked Questions

How much does it cost to self-host OpenClaw?

OpenClaw itself is free and MIT-licensed, with no paid tier. Your costs are the machine and the model. A machine you already own costs nothing beyond electricity, and a small VPS is the only bill for most beginners. Model usage is billed by how much you use, and a one-user agent typically stays modest. Local models remove the model bill at the cost of capability and hardware demands.

Can I run OpenClaw on a Raspberry Pi?

Yes. A Raspberry Pi 5 is well supported, and the same install commands apply: Node 24 or newer, the official installer, and onboarding with the daemon option. The Gateway calls cloud APIs for reasoning, so the Pi handles orchestration and message routing rather than heavy inference. Use a good power supply and reliable storage, and keep the Pi on, cool, and backed up.

What is the difference between OpenClaw and NanoClaw?

NanoClaw is a separate project by Gavriel Cohen, not a fork or a clone of OpenClaw. It is a smaller, security-focused agent with its own codebase and community, also MIT-licensed. OpenClaw is the larger ecosystem, with more channels, more skills, and a bigger community. Pick OpenClaw for the broadest integrations; look at NanoClaw only if a smaller, security-first footprint appeals to you.

Do I need to know how to code to self-host OpenClaw?

No. You need to copy commands into a terminal, create an API key on a provider’s website, and edit a text file. The installer and the onboarding wizard handle the rest. Where this guide prints a command, paste it as shown, changing only your own values, such as a token or username. Reading error messages carefully helps most: the logs usually name the exact problem.

What happens if my server goes offline?

The agent stops answering until the machine is back. Messages sent while the Gateway is down wait on Telegram’s side, and the bot picks them up when it reconnects, though anything that needed a live answer is missed. That is the trade-off: you own the uptime. The daemon, lingering, and a stable host remove most outages, and an uptime check turns a silent failure into a five-minute fix.

Bottom Line

Self-hosting OpenClaw is a weekend-sized project with a same-afternoon payoff: a private AI agent on your hardware, answering in the apps you already use. Start with a machine that stays on, install Node 24 or newer, run onboarding with the daemon option, connect one model and one channel, lock the bot to your own account, and keep the dashboard off the public internet. The rest is refinement: a better personality file, a useful skill or two, and the habits of updates and backups. Follow the checklist, and you will have an agent that is genuinely yours.

Disclosure: As an Amazon Associate, we may earn from qualifying purchases.

S
Sumenu Editorial Team
We compare specs, materials and verified owner reviews before a product earns a spot. Rankings are never paid.
Affiliate disclosure. As an Amazon Associate we earn from qualifying purchases at no extra cost to you. Prices accurate as of the date shown.