Getting started with OpenClaw on Ubuntu Cloud Server

  • Author

    Pawel Piwosz

    Developer Advocate at UpCloud. Docker Captain, Team Topologies Ambassador, CD Foundation Ambassador.

  • About

    Type
    Tutorial

Updated on 28 April 2026

OpenClaw took the world by storm at the beginning of 2026. Everyone talks about it, many engineers use it, but what is it? And how to run OpenClaw for ourselves? This tutorial answers these questions and helps to install and manage OpenClaw in your own environment.

OpenClaw is an autonomous AI agent, designed as a personal assistant, which integrates with collaboration services like WhatsApp, Slack, Telegram, email tools like Gmail, or calendars. And that is only a fraction of options. It can be managed through commands provided on Slack for example.

The beauty of the tool is that we can run it as a simple and single service that can run on your laptop, a physical server, or a cloud server anywhere in the world.

OpenClaw vs ChatGPT

Before we go to the technical aspects, we need to understand the difference between OpenClaw and ChatGPT, or more broadly, the difference between OpenClaw and LLM.

There are 4 main elements we have to keep in mind:

  • OpenClaw can live on your own infrastructure, where you control exactly what runs and what access it has.
  • OpenClaw has cron jobs and heartbeat; you can schedule tasks to work on its own without any human interaction.
  • OpenClaw has a memory of what you say to it and what it does, so as time goes on, it becomes more useful and gets to know you better.
  • OpenClaw’s tools and skills, using which it can connect to external services, such as Mail, Calendar, a search engine, and virtually anything that can run on a computer.

Another important aspect of OpenClaw is its gateway. OpenClaw is an AI agent, which means it is a tool that can connect to different “channels,” which are used to communicate with humans. These channels can include WhatsApp, Telegram, Slack, and many more. Therefore, we can easily communicate with OpenClaw, using various methods.

Prerequisites

Key to the LLM

Before installing OpenClaw, we need an API key with access to a Large Language Model (LLM). This LLM can be any you prefer: OpenAI’s ChatGPT, Claude, Gemini, Nvidia’s Kimi, or even Ollama or Mistral, models, which you can run locally and ensure full isolation.

Each of these services has its pros and cons. One of the main differentiator is the cost of using the model.. The best models are the most expensive; these models are faster and more “intelligent,” making them much easier to use. The better the model is, the better its problem-solving abilities. A cheaper model might struggle to solve some more complex problems. The key is finding a balance between a model that can handle your everyday tasks without costing a fortune. The reason here is simple. The reasoning, size of context window, parameters of the model. All of these have significant impact on the quality of the model’s response.

For this guide, we’ll be using Gemini. You can use Gemini in free trial mode simply by having a Google account. How to start with Gemini? Check this Official OpenClaw Guide.

To create a Gemini key, you can go to Google AI Studio and create an API key

1 creating api keys - Getting started with OpenClaw on Ubuntu Cloud Server

Once we create the key, we’ll save it as a secret. We’ll use it later to configure OpenClaw.

Telegram bot

For this guide, we’ll create a Telegram bot that will allow us to communicate with our agent through Telegram. If you prefer to use another method, such as WhatsApp or Discord, follow the official guidelines.

Creating a Telegram bot is super simple (official guide)

  1. Open Telegram and chat with @BotFather (this is a Telegram Bot that will be responsible for creating Bots)
  2. Type /newbot in that thread, the bot will ask you for your bot’s name; you can choose any name you like. You will use this bot to chat with your agent.
  3. @BotFatherwill respond with a token; save this token because we will use it to authenticate with Telegram later.

Server Deployment

To install OpenClaw, we’re going to do it on an Upcloud server.

For this we need to go to our Upcloud Dashboard and deploy a new server.

2 upcloud hub cloud dashboard - Getting started with OpenClaw on Ubuntu Cloud Server

We select the region where we’re going to deploy it; try to find the region close to your actual location to reduce latency, but this isn’t really that important for this tutorial.

3 upcloud deploy server - Getting started with OpenClaw on Ubuntu Cloud Server

Here we’ll select the instance size. I recommend a server with at least 2GB of RAM to avoid problems; 4GB of RAM seems ideal for an initial setup. You can change this later if you need more power.

4 upcloud server plans - Getting started with OpenClaw on Ubuntu Cloud Server

Remember to enable backups. All OpenClaw settings, memory, and working files should be backed up in case of any failure of the server or application. Whenever you have a problem, you can easily restore a backup and return to a previous point.

5 upcloud automated backups - Getting started with OpenClaw on Ubuntu Cloud Server

For this guide we will use Ubuntu as the operating system. OpenClaw can be installed on many different operating systems, but considering the popularity of Ubuntu, this is the way for this tutorial.

6 upcloud cloud server os - Getting started with OpenClaw on Ubuntu Cloud Server

We select our SSH key, give the server a name, and deploy.

7 upcloud cloud server login method - Getting started with OpenClaw on Ubuntu Cloud Server
8 upcloud cloud server name - Getting started with OpenClaw on Ubuntu Cloud Server

Once the server is running, we’ll copy the server’s IP address and use a terminal to connect via SSH. If you used an SSH key in the previous step, you must use that same key to connect.

9 upcloud cloud server status - Getting started with OpenClaw on Ubuntu Cloud Server
# Replace this IP with your server's IP address
ssh [email protected]

Once inside the server, we are ready to install OpenClaw!

OpenClaw Installation

Our OpenClaw server is now ready. It’s time to install the OpenClaw software. It’s really easy and only requires one simple line of code:

curl -fsSL https://openclaw.ai/install.sh | bash

This command will install all OpenClaw dependencies and software at once; we don’t need to install anything before running it, as our fresh Ubuntu installation has all the necessary tools.

root@my-openclaw:~# curl -fsSL https://openclaw.ai/install.sh | bash

  🦞 OpenClaw Installer
  End-to-end encrypted, Zuck-to-Zuck excluded.

✓ Detected: linux

Install plan
OS: Linux
Install method: npm
Requested version: latest

[1/3] Preparing environment
· Node.js not found, installing it now
· Installing Node.js via NodeSource
· Installing Linux build tools (make/g++/cmake/python3)

This step may take a couple of minutes depending on your internet speed and the number of dependencies required; it should be fairly quick!

Once the dependencies are installed, the installer will proceed to install the latest available version of OpenClaw and begin the initial configuration process.

[1/3] Preparing environment
· Node.js not found, installing it now
· Installing Node.js via NodeSource
· Installing Linux build tools (make/g++/cmake/python3)
✓ Build tools installed
✓ Node.js v22 installed
· Active Node.js: v22.22.1 (/usr/bin/node)
· Active npm: 10.9.4 (/usr/bin/npm)

[2/3] Installing OpenClaw
✓ Git already installed
· Installing OpenClaw v2026.3.23-2
✓ OpenClaw npm package installed
✓ OpenClaw installed

[3/3] Finalizing setup

🦞 OpenClaw installed successfully (OpenClaw 2026.3.23-2 (7ffe7e4))!
The lobster has landed. Your terminal will never be the same.

We’ll see a short disclaimer explaining that OpenClaw is a powerful tool that can cause a lot of damage; we’ll accept this by switching to Yes and pressing Enter.

🦞 OpenClaw 2026.3.23-2 (7ffe7e4) — I keep secrets like a vault... unless you print them in debug logs again.

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██
██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██
██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                  🦞 OPENCLAW 🦞

┌  OpenClaw setup
│
◇  Security ─────────────────────────────────────────────────────────────────────────────────╮
│                                                                                            │
│  Security warning — please read.                                                           │
│                                                                                            │
│  OpenClaw is a hobby project and still in beta. Expect sharp edges.                        │
│  By default, OpenClaw is a personal agent: one trusted operator boundary.                  │
│  This bot can read files and run actions if tools are enabled.                             │
│  A bad prompt can trick it into doing unsafe things.                                       │
│                                                                                            │
│  OpenClaw is not a hostile multi-tenant boundary by default.                               │
│  If multiple users can message one tool-enabled agent, they share that delegated tool      │
│  authority.                                                                                │
│                                                                                            │
│  If you’re not comfortable with security hardening and access control, don’t run           │
│  OpenClaw.                                                                                 │
│  Ask someone experienced to help before enabling tools or exposing it to the internet.     │
│                                                                                            │
│  Recommended baseline:                                                                     │
│  - Pairing/allowlists + mention gating.                                                    │
│  - Multi-user/shared inbox: split trust boundaries (separate gateway/credentials, ideally  │
│    separate OS users/hosts).                                                               │
│  - Sandbox + least-privilege tools.                                                        │
│  - Shared inboxes: isolate DM sessions (`session.dmScope: per-channel-peer`) and keep      │
│    tool access minimal.                                                                    │
│  - Keep secrets out of the agent’s reachable filesystem.                                   │
│  - Use the strongest available model for any bot with tools or untrusted inboxes.          │
│                                                                                            │
│  Run regularly:                                                                            │
│  openclaw security audit --deep                                                            │
│  openclaw security audit --fix                                                             │
│                                                                                            │
│  Must read: https://docs.openclaw.ai/gateway/security                                      │
│                                                                                            │
├────────────────────────────────────────────────────────────────────────────────────────────╯
│
◆  I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue?
│  ● Yes / ○ No
└

We select the “Quickstart” mode

◆  Setup mode
│  ● QuickStart (Configure details later via openclaw configure.)
│  ○ Manual
└

In this mode, we begin by configuring the most important part of OpenClaw, its “brain”: the LLM we’ll be using. This is where we’ll use our Gemini key. If you have a different key, you can select your provider.

◇  QuickStart ─────────────────────────╮
│                                      │
│  Gateway port: 18789                 │
│  Gateway bind: Loopback (127.0.0.1)  │
│  Gateway auth: Token (default)       │
│  Tailscale exposure: Off             │
│  Direct to chat channels.            │
│                                      │
├──────────────────────────────────────╯
│
◆  Model/auth provider
│  ○ Anthropic
│  ○ BytePlus
│ ○ Falls
│  ○ Cloudflare AI Gateway
│  ○ Copilot
│  ○ Custom Provider
│  ○ DeepSeek
│  ● Google (Gemini API key + OAuth)
│  ○ Hugging Face
│  ○ Kilo Gateway
│  ○ LiteLLM
│  ○ Microsoft Foundry
│  ○ MiniMax
│ ○ Mistral AI
│  ○ Moonshot AI (Kimi K2.5)
│ ○ To be
OpenAI
│ ○ OpenCode
│  ○ OpenRouter
│ ○ Qianfan
│  ○ Qwen (Alibaba Cloud Model Studio)
│ ○ English
│  ○ Synthetic
│  ○ Together AI
│ ○ Venice AI
│ ○ Vercel AI Gateway
│ ○ vLLM
│  ○ Volcano Engine
│ ○ xAI (Grok)
│  ○ Xiaomi
│  ○ Z.AI
│  ○ Skip for now

Here we select the key instead of CLI OAuth:

◆  Google auth method
│  ○ Gemini CLI OAuth
│  ● Google Gemini API key
│  ○ Back
└

We enter our key:

◇  Google auth method
│  Google Gemini API key
│
◆  Enter Gemini API key
│ AIza...xxxx..IY6c
└

And then we select the model. This step is quite important since the model we choose will define the “intelligence” of our agent and its cost. The “smarter” models are the most expensive; that is, the value per token is higher.

In this guide we’re going to choose the best model to date:google/gemini-3.1-pro-preview. My recommendation is that you try out the models and check the cost, and if you’re okay with paying that, then if it seems too expensive, you can go for a cheaper one, like google/gemini-flash-latestthegoogle/gemini-flash-lite-latest The models flash-lite are extremely cheap and work very well for simple tasks.

◇  Model configured ───────────────────────────────────╮
│                                                      │
│  Default model set to google/gemini-3.1-pro-preview  │
│                                                      │
├──────────────────────────────────────────────────────╯
12:09:21+00:00 [agents/model-providers] [xai-auth] bootstrap config fallback: no config-backed key found
│
◆  Default model
│  ● Keep current (google/gemini-3.1-pro-preview)
│  ○ Enter model manually
│  ○ google/gemini-1.5-flash
│  ○ google/gemini-1.5-flash-8b
│  ○ google/gemini-1.5-pro
│  ○ google/gemini-2.0-flash
│  ○ google/gemini-2.0-flash-lite
│  ○ google/gemini-2.5-flash
│  ○ google/gemini-2.5-flash-lite
│  ○ google/gemini-2.5-flash-lite-preview-06-17
│  ○ google/gemini-2.5-flash-lite-preview-09-2025
│  ○ google/gemini-2.5-flash-preview-04-17
│  ○ google/gemini-2.5-flash-preview-05-20
│  ○ google/gemini-2.5-flash-preview-09-2025
│  ○ google/gemini-2.5-pro
│  ○ google/gemini-2.5-pro-preview-05-06
│  ○ google/gemini-2.5-pro-preview-06-05
│  ○ google/gemini-3-flash-preview
│  ○ google/gemini-3-pro-preview
│  ○ google/gemini-3.1-flash-lite-preview
│  ○ google/gemini-3.1-pro-preview
│  ○ google/gemini-3.1-pro-preview-customtools
│  ○ google/gemini-flash-latest
│  ○ google/gemini-flash-lite-latest
│  ○ google/gemini-live-2.5-flash
│  ○ google/gemini-live-2.5-flash-preview-native-audio

Now we’re going to choose the channel. The channel is the way we communicate with our bot, apart from the web interface. The most popular options are Telegram, WhatsApp, and Discord. But we have many more to choose from.

In this step, we will use the Telegram key for the bot that we created in the prerequisites section.

We’re going to choose Telegram and enter our key

◆  Select channel (QuickStart)
│  ● Telegram (Bot API) (recommended · newcomer-friendly)
│  ○ WhatsApp (QR link)
│ ○ Discord (Bot API)
│  ○ IRC (Server + Nick)
│  ○ Google Chat (Chat API)
│  ○ Slack (Socket Mode)
│  ○ Signal (signal-cli)
│  ○ iMessage (imsg)
│  ○ LINE (Messaging API)
│  ○ Mattermost (plugin)
│  ○ Nextcloud Talk (self-hosted)
│ ○ Feishu/Lark (飞书)
│  ○ BlueBubbles (macOS app)
│ ○ Zalo (Bot API)
│  ○ Synology Chat (Webhook)
│  ○ Nostr (NIP-04 DMs)
│  ○ Microsoft Teams (Teams SDK)
│  ○ Matrix (plugin)
│  ○ Zalo (Personal Account)
│ ○ Tlon (City)
│  ○ Twitch (Chat)
│  ○ Skip for now
◇  Select channel (QuickStart)
│ Telegram (Bot API)
│
◇  Telegram bot token ───────────────────────────────────────────────────────────────────╮
│                                                                                        │
│  1) Open Telegram and chat with @BotFather                                             │
│  2) Run /newbot (or /mybots)                                                           │
│  3) Copy the token (looks like 123456:ABC...)                                          │
│  Tip: you can also set TELEGRAM_BOT_TOKEN in your env.                                 │
│  Docs: https://docs.openclaw.ai/telegram  │
│  Website: https://openclaw.ai                                                          │
│                                                                                        │
├────────────────────────────────────────────────────────────────────────────────────────╯
│
◆  How do you want to provide this Telegram bot token?
│  ● Enter Telegram bot token (Stores the credential directly in OpenClaw config)
│  ○ Use external secret provider

Okay! Finally, let’s choose a Search Provider. This allows OpenClaw to perform internet searches. We can use the default one, DuckDuckGo Search which is free and requires no setup.

◇  Web search ─────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Web search lets your agent look things up online.                           │
│  Choose a provider. Some providers need an API key, and some work key-free.  │
│  Docs: https://docs.openclaw.ai/tools/web                                    │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────╯
│
◆  Search provider
│  ○ Brave Search
│  ● DuckDuckGo Search (experimental) (Free web search fallback with no API key required · key-free)
│  ○ Exa Search
│  ○ Firecrawl Search
│  ○ Gemini (Google Search)
│ ○ Grok (xAI)
│  ○ Kimi (Moonshot)
│  ○ Perplexity Search
│  ○ Tavily Search
│  ○ Skip for now

Skills are integrations to connect with external tools. My recommendation is not to install any skills for now, and to get to know OpenClaw to see what access we will be giving it.

│
◇  Skills status ─────────────╮
│                             │
│  Eligible: 4                │
│  Missing requirements: 39   │
│  Unsupported on this OS: 7  │
│  Blocked by allowlist: 0    │
│                             │
├─────────────────────────────╯
│
◇  Configure skills now? (recommended)
│  No
│

Hooks are automations performed using commands with a slash (like /command). For now, we’re not going to configure any of these since they’re a bit more advanced.

◇  Hooks ──────────────────────────────────────────────────────────────────╮
│                                                                          │
│  Hooks let you automate actions when agent commands are issued.          │
│  Example: Save session context to memory when you issue /new or /reset.  │
│                                                                          │
│  Learn more: https://docs.openclaw.ai/automation/hooks                   │
│                                                                          │
├──────────────────────────────────────────────────────────────────────────╯
│
◆  Enable hooks?
│  ◻ Skip for now
│  ◻ 🚀 boot-md
│  ◻ 📎 bootstrap-extra-files
│  ◻ 📝 command-logger
│  ◻ 💾 session-memory

Done! We now have OpenClaw running and initially configured.

Now we can access our web interface, using the link that appears in this box.

◇ UI Control ─
│                                                                                            │
│ Web UI: http://127.0.0.1:18789/ │
│  Web UI (with token):                                                                      │
│  http://127.0.0.1:18789/#token=b255663316c7babcd07cc5b4d4de5a5ffd3a0e252d4fb69f            │
│  Gateway WS: ws://127.0.0.1:18789                                                          │
│  Gateway: not detected (gateway closed (1006 abnormal closure (no close frame)): no close  │
│  reason)                                                                                   │
│  Docs: https://docs.openclaw.ai/web/control-ui                                             │
│                                                                                            │
├────────────────────────────────────────────────────────────────────────────────────────────╯

One very important thing to note is that this link is only valid for localhost, so we cannot access it externally using our server’s IP address. Instead, the most common way of connecting to the OpenClaw’s GUI is to create the SSH tunnel to the server and then run the browser using ‘localhost’ in the url.

We mentioned security, so it is a good place to make you aware of the security risks of OpenClaw. These risks are not connected with OpenClaw directly, but more with the tool’s privileges we give. OpenClaw can send an email. Respond to messages. Make operations in your operating system. In short, we give quite huge power to the tool, which is powered by LLM. And there are a lot of options to “abuse” LLM. We have to remember about it and be careful with the tool. For example, do not allow every user on Discord to interact with your OpenClaw, which is connected to your mailbox. At least, if you don’t want to be surprised quickly.

Let’s come back to our tutorial now.

We’ll need to open a second terminal to enable this tunnel (or we can close our current session and reopen it):

ssh -L18789:localhost:18789 [email protected]

Once we connect via SSH with these options, we will be able to access port 18789 of the server by pointing it to the same port on our laptop.

If we need a new link, we can run openclaw dashboard --no-open where it will show us the link to log in again:

openclaw dashboard --no-open

Dashboard URL: http://127.0.0.1:18789/#token=b255663316c7babcd07cc5b4d4de5a5ffd3a0e252d4fb69f

Have fun using OpenClaw 🦞 on Upcloud!

Discussion

Leave a Reply

Your email address will not be published. Required fields are marked *

Try out today!

Start your free 14-day trial today and discover why thousands of businesses trust UpCloud

  • Risk-free trial
  • Optimized performance
  • Scalable infrastructure
  • Top-tier security
  • Global availability

Sign up

Back to top