OpenClaw is a self-hosted AI assistant that handles tasks for you: it answers questions, summarizes content, controls its own browser, and talks with you through the web dashboard or messengers like Telegram, Discord, Slack, and WhatsApp. Its responses come from an AI model of your choice, such as one from Anthropic, OpenAI, OpenRouter, or Google Gemini.
In this guide, we’ll show you two ways to get started: the easy way, using the One-Click App, which gets OpenClaw running over HTTPS with its own browser for automation in just a few clicks, and manual installation with the official installer from the console. After that, you’ll connect messengers and extend OpenClaw with skills and hooks.
You can also run OpenClaw on your own PC. A VPS or Dedicated Server is a good fit if:
- you want your assistant to always be available, for example, through Telegram or Discord, even when your PC is turned off.
- you want an assistant for multiple channels: Instead of separate bots for each messenger, one OpenClaw instance uses the same configuration and context, no matter where you message it from.
- you want recurring tasks to run automatically, such as summarizing content, organizing information, or generating structured responses.
- you want OpenClaw to interact with websites that don’t have an API: Browser automation then runs in its own browser on the server, not on your work computer with your private sessions.
A server is less suitable if you want OpenClaw to control programs and files on your own PC or run local AI models on a graphics card. A VPS has no display or GPU; AI responses come from your provider’s API service.
The fastest way to get your own OpenClaw instance is through the One-Click Apps on your VPS or Dedicated Server. The app is directly accessible over HTTPS using a domain, is also protected by a login, and comes with its own Chromium browser for browser automation. All you need to do is enter your AI provider’s API key.
- A Linux VPS or Dedicated Server (Debian or Ubuntu) with One-Click Apps set up. See Set Up One-Click Apps for instructions.
- An API key from an AI provider, such as Anthropic, OpenAI, OpenRouter, or Google Gemini. OpenClaw won’t start without a key.
- Enough memory: The app starts its own browser container alongside OpenClaw. Refer to the table under “Manual Installation” > “Requirements.”
- Open your server in the ZapX dashboard and switch to the One-Click Apps tab.
- Search for OpenClaw in the app catalog and click Install app.
- Use a custom subdomain or zap.cloud is already selected, with a randomly generated name. Leave the option enabled or enter your own name: You’ll access OpenClaw over HTTPS through the domain, and the connection to the Gateway will also use it.
- Open App configuration and enter your API key in the appropriate field, for example,
ANTHROPIC_API_KEY,OPENAI_API_KEY,OPENROUTER_API_KEY, orGEMINI_API_KEY. The form marks all fields as optional, but without at least one key, OpenClaw will get stuck in a restart loop. Leave any fields you don’t need blank. - Click Queue installation. The first time you install it, your server will download around 5 GB of images, which can take 10 to 15 minutes.
If the download takes longer than about 10 minutes, the app card may show “The app failed to start,” even though the download is still running in the background. Wait a few minutes, then open the Access link. The message may remain on the card even after OpenClaw is running.
If you installed the app without an API key, the app card will show that the app isn’t starting correctly. Enter the key in the app settings (gear icon) under App environment, then click Save. The app will restart afterward.
OpenClaw access is protected twice: first by a browser login, then by the Gateway token. You can find both in the app settings (gear icon) under App environment > Automatically generated values:
| Value | Purpose |
|---|---|
SERVICE_USER_OPENCLAW | Username for the browser login |
SERVICE_PASSWORD_OPENCLAW | Password for the browser login |
SERVICE_PASSWORD_64_GATEWAYTOKEN | Gateway token |
- Open the app’s Access link and sign in with your username and password.
- OpenClaw displays “This Gateway expects its token.” Enter the token in the Gateway secret field and click Connect.
- The first time, OpenClaw displays “Approve this browser”: Each new browser must be approved on the server once. The page shows a command such as
openclaw devices approve <ID>. Connect to your server via SSH and run it in the OpenClaw container, using the ID shown on your page:
docker exec $(docker ps -q --filter name=openclaw-) openclaw devices approve <ID>
The page will connect automatically afterward, or you can click Check now.
You’ll then land in the chat and can give OpenClaw its first tasks. Unless you specify a different model, OpenClaw uses a default model from your provider. To choose another one, use the OPENCLAW_PRIMARY_MODEL field under App environment.
Your Gateway token and login details provide full control over your OpenClaw instance, including its stored API keys. Don’t share them or show them in screenshots.
OpenClaw can also talk with you through Telegram, Discord, Slack, or WhatsApp. Enter your bot tokens in the app settings (gear icon) under App environment, for example, in TELEGRAM_BOT_TOKEN or DISCORD_BOT_TOKEN. The app restarts after you save. For instructions on creating a Telegram bot and setting up channels, see “Set Up Messengers, Skills, and Hooks” below.
Leave fields for messengers you don’t use blank. A placeholder value like unset counts as a real token and will cause OpenClaw to fail at startup.
Update OpenClaw in the app settings (gear icon) under App update. Click Check for updates and install a new version using Apply update. Your settings, sessions, and workspace are stored in a separate volume and are retained during the update. You can also back up your server using the backups in the ZapX dashboard.
The rest of this guide covers manual installation of OpenClaw using the official installer from the console. This is useful, for example, if you want to run OpenClaw directly on the system rather than in Docker, or if you want to choose every step yourself.
- A Linux VPS or Dedicated Server running Debian or Ubuntu, with SSH access. See First SSH Access.
- An API key from an AI provider, such as OpenAI or Anthropic.
Resource usage can quickly increase depending on how you use OpenClaw. Simple setups, such as using only the web interface with minimal automation, run well on smaller VPS plans. Multiple channels, many enabled skills, or browser automation require significantly more performance; for these setups, we recommend a Dedicated Server.
| Hardware | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU core | 8 vCPU cores |
| RAM | 4 GB | 16 GB |
| Storage | 25 GB | 50 GB |
By default, OpenClaw binds its Gateway and Control UI only to 127.0.0.1 on port 18789. This means you don’t need to open a port for external access, and you should keep it that way. Use ufw to allow only SSH and, if you later use a reverse proxy, HTTP and HTTPS:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Don’t open port 18789 in the firewall. You can access the browser interface through an SSH tunnel or HTTPS. Learn more in Managing the Firewall on Linux.
Connect to your server via SSH and run the official installer:
curl -fsSL https://openclaw.ai/install.sh | bash
The installer detects your operating system and installs missing dependencies such as Node.js using the system package manager, without requiring any input from you. It then downloads and installs OpenClaw and automatically starts onboarding.
When installation is complete, you’ll see a confirmation like this:
Onboarding completes the initial setup and is required before you can use OpenClaw:
- Read and accept the security notice shown on screen.
- Choose an onboarding mode. QuickStart is the right choice for most users.
- Choose your model or authentication provider—in this example, OpenAI—and enter your API key. OpenClaw saves it locally in the configuration.
- Choose the default model OpenClaw should use.
- Optionally, set up channels (such as Telegram, Discord, or Slack), skills, and hooks now. You can skip these steps and complete them later.
- OpenClaw then automatically installs the Gateway Service. Finally, choose Web UI so OpenClaw displays the link to the dashboard.
At the end, OpenClaw offers to install the Shell Completion Script. This is optional, but makes working in the console easier by automatically completing OpenClaw commands.
Servers are provided without a graphical interface, so OpenClaw runs in headless mode. After onboarding, OpenClaw displays the dashboard access details in the console:
Dashboard link (with token):
http://127.0.0.1:18789/?token=XXXXXXXXXXXXXXXXXXXXXXXX
No GUI detected. Open from your computer:
ssh -N -L 18789:127.0.0.1:18789 root@SERVER_IP
Because the interface is bound only to 127.0.0.1, you’ll need to create an SSH tunnel on your own computer. Replace SERVER_IP with your server’s IP address:
ssh -N -L 18789:127.0.0.1:18789 root@SERVER_IP
As long as this connection remains open, you can access the OpenClaw Control UI in your browser at http://localhost:18789/. If OpenClaw asks you to sign in, open the link with the token shown in the output above.
If you’d rather use OpenClaw directly on the server with a graphical interface, install a desktop environment such as XFCE and a remote desktop solution such as RDP or VNC. You won’t need an SSH tunnel in that case.
For remote access, the official documentation recommends an SSH tunnel or Tailscale Serve. To use your own domain, put a reverse proxy with an SSL certificate in front of it. For the basics, see Set Up a Reverse Proxy with nginx and Create an SSL Certificate (Let's Encrypt). You’ll need a domain or subdomain whose A record points to your server’s IP address (e.g., openclaw.example.com).
The Gateway remains bound to 127.0.0.1; only nginx accepts external requests. The proxy must forward WebSockets and replace the originating IP address rather than append to it. Here’s a server block for nginx:
server {
listen 80;
server_name openclaw.example.com;
location / {
proxy_pass http://127.0.0.1:18789;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Then obtain the certificate using certbot --nginx -d openclaw.example.com. Certbot adds HTTPS and HTTP redirection to the block.
To make OpenClaw trust the proxy and allow the Control UI to be accessed through your domain, add these two entries to the existing gateway block in the configuration file ~/.openclaw/openclaw.json. Leave the other entries, such as the port and authentication settings, unchanged:
gateway: {
trustedProxies: ["127.0.0.1"],
controlUi: {
allowedOrigins: ["https://openclaw.example.com"],
},
},
Then restart the Gateway with openclaw gateway restart. If trustedProxies is missing, OpenClaw will reject requests through the proxy with 403 and the message proxy_attribution_required.
Through the proxy, your browser is no longer treated as local: After signing in with the token, it must be approved once. Show pending requests on the server with openclaw devices list and approve your browser with openclaw devices approve <ID>. A request expires after 5 minutes.
Don’t set gateway.bind to a public address. External access must go through the proxy only.
Everything that makes up your installation is in the ~/.openclaw directory: the openclaw.json configuration, your channel credentials in the credentials subfolder, paired devices and sessions in SQLite databases, and your workspace.
Don’t simply copy the databases while they’re running. Instead, use OpenClaw to create a verified backup archive:
openclaw backup create --output ~/Backups/openclaw --verify
To back up only the configuration, use openclaw backup create --only-config --output ~/Backups/openclaw. Download the archives regularly or also use your server backups in the ZapX dashboard.
To restore a backup, openclaw backup restore <Archiv.tar.gz> --target <Ordner> extracts the archive into a new folder. Stop the Gateway with openclaw gateway stop before moving the data into place, then start it again. Installed plugins aren’t included in the archive and must be reinstalled. See the official backup guide for details.
By default, the installer sets up OpenClaw as a global npm package. Update it as follows:
openclaw backup create --output ~/Backups/openclaw --verify
openclaw update
openclaw update status
openclaw update restarts the Gateway after the update and checks it. If the new version doesn’t start, OpenClaw restores the previous version. To install a specific version, use openclaw update --tag <Version>. If OpenClaw reports outdated settings after an update, fix them with openclaw doctor --fix. Check whether your channels are connected again with openclaw channels status --probe.
After installation, connect messengers, enable skills, and create hooks for recurring workflows. You can find all of these in the dashboard; with a manual installation, they’re also available during onboarding.
For Telegram, you’ll need your own bot and its token. Create one directly in Telegram through the official BotFather account:
- Open the chat with BotFather and send
/newbot. - Enter a display name for your bot, for example,
ZAP DOCS EXAMPLE. - Enter a username. It must end in
bot, for example,ZAP_DOCS_EXAMPLE_BOT. - BotFather confirms that the bot has been created and displays the HTTP API token. Copy it and keep it somewhere safe.
Enter the token in TELEGRAM_BOT_TOKEN during onboarding, in the dashboard under Channels, or in the One-Click App under App environment. Anyone with the token can control your bot, so never share it publicly.
Channels connect OpenClaw to messaging platforms. In the dashboard, set up and connect supported channels such as Telegram, Discord, and Slack. Depending on the platform, you’ll need a token or other credentials, as with the Telegram bot above.
By default, OpenClaw only replies to direct messages from unknown senders after approval. If your bot sends a pairing code the first time someone contacts it, approve the code on the server:
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>
The code is valid for one hour. With the One-Click App, run the commands in the OpenClaw container using docker exec, just as you did for browser approval.
Once the channel is connected, OpenClaw can receive and reply to messages on that platform. For example, a Telegram conversation looks like this:
Skills extend OpenClaw with additional features and integrations. OpenClaw includes more than 50 skills, which you can select and enable in the dashboard under Skills. Find more community skills on ClawHub.
Hooks let OpenClaw automatically perform actions when specific events occur or when you use certain commands. Use them to automate recurring tasks, save context, or start workflows without manual effort.
OpenClaw is a powerful tool: It can send messages, interact with websites, and use your API keys. Keep the following in mind:
- Treat the Gateway token like a password. Never share it publicly, such as in screenshots, support tickets, or chat histories. Anyone with the token can control your dashboard.
- Use one instance per trust group. According to the official documentation, a Gateway doesn’t separate users who don’t trust one another. Only share your instance with people you’d also trust with your API keys.
- Be careful with untrusted content. Websites and messages may contain instructions that could trick OpenClaw into taking unwanted actions. Enable only the skills and channels you really need.
- Have your settings checked. Run
openclaw security auditto check your configuration for unsafe settings, such as a token that’s too short. - Keep an eye on API costs. Your provider bills each request to the AI model according to its own terms. Multiple channels, hooks, and automations will generate more requests.
You’ve installed OpenClaw on your VPS or Dedicated Server, secured access, and learned how to set up messengers, skills, and hooks. Find more information on openclaw.ai, in the OpenClaw documentation, and among the community skills on ClawHub.
Prefer to skip the console? Use the easy One-Click App option described above under “The Easy Way: OpenClaw as a One-Click App.” HTTPS, login, and a dedicated browser for automation are already set up.
