How to Install OpenClaw on Ubuntu 26.04 and 24.04

Share

To install OpenClaw on Ubuntu 26.04 or 24.04, use the official installer and follow its setup wizard. OpenClaw is an AI assistant that runs a gateway on your computer and connects it to an AI model and tools.

This guide takes you from installation to your first chat, with practical security, troubleshooting and removal steps. If you need help, leave a comment or contact us.

Before you begin
  • Ubuntu 26.04 or 24.04, internet access and a regular user account with sudo access for prerequisites.
  • A model provider account or API key, or a separately configured local model. Provider charges depend on your service.
  • A browser on your desktop, or SSH access from another computer for a server.
  • OpenClaw can use tools and access files with the permissions you grant it. Consider a dedicated account or test environment.

Choose an Installation Method

Choose one route. The terminal installer is the main walkthrough below.

Method Best for What it does
Official installer Desktop or server Installs the CLI and dependencies, then starts setup
Linux desktop app Graphical desktop setup Installs a companion app and can set up its own runtime

1. Install OpenClaw with the Official Installer

Step 1   Prepare Ubuntu

Open Terminal with Ctrl+Alt+T. On a server, connect over SSH. Install curl and certificate support:

Terminal
sudo apt update
sudo apt install curl ca-certificates

Review any changes before confirming. If the update fails, resolve the error first.

Step 2   Download and inspect the installer

The official script downloads and runs software and may ask for sudo to install dependencies. Download it to a temporary file and inspect it before running it:

Terminal
installer=$(mktemp) && if curl -fsSL https://openclaw.ai/install.sh -o "$installer"; then
  less "$installer"
else
  rm -f "$installer"
  unset installer
  echo "Download failed. Do not continue." >&2
fi

Press q to exit the viewer. This is executable code from the OpenClaw project, so proceed only if you trust it. If the download fails, stop and check your connection; do not run an empty or incomplete file.

Step 3   Install and start onboarding

In the same terminal, after a successful download and review, run:

Terminal
if [ -n "${installer:-}" ] && [ -s "$installer" ]; then
  bash "$installer"
else
  echo "Installer missing; repeat the download step." >&2
fi

The installer checks for a supported Node.js runtime and installs OpenClaw. It may offer to install missing dependencies and starts onboarding for a new interactive setup. Read prompts before accepting them. When finished, remove the temporary script with rm "$installer".

If the wizard does not start, open a new terminal and run openclaw onboard. If the command is not found, see troubleshooting below.

Step 4   Choose a model and access settings

Choose Quick start for guided defaults, or Custom setup to review more choices. The exact screens can change.

  • Choose a supported API provider or compatible local model and follow the setup prompts. OpenClaw can also offer an existing compatible Claude Code or Codex CLI login on the gateway host. A chat subscription does not automatically include API access. Local models need separate setup and suitable hardware.
  • Keep the gateway bound to loopback for this walkthrough. It accepts local connections instead of exposing the dashboard to your network.
  • Keep gateway authentication enabled. Treat tokens, pairing links and configuration files as secrets.
  • Skip messaging channels and extra skills for now. You can configure them later.

If asked whether to keep OpenClaw running in the background, accept if you want a user service. Otherwise a foreground gateway stops when you end its terminal session.

Step 5   Verify and open the dashboard

In a new terminal, check the installed CLI and, if you installed the background service, its status:

Terminal
openclaw --version
openclaw gateway status

The first command prints a version. The status command reports the service and gateway connection; check any errors.

Open the dashboard:

Terminal
openclaw dashboard

The command can offer to start the gateway if needed. In the browser, send a simple message such as Explain what the Linux home directory is in one sentence. A reply confirms that the model connection works. A dashboard that loads without a reply may still have a provider or billing problem.

2. Use the Linux Desktop App (Alternative)

The official Linux companion offers graphical setup and can install a private Node runtime and local gateway. It is separate from the terminal walkthrough above; avoid installing both paths unless you understand which gateway you are using.

On the official release page, open a stable release that includes the Linux amd64.deb package and its checksum file. The desktop bundle may appear later than the gateway release. Confirm your architecture with dpkg --print-architecture; the amd64 package is for 64-bit Intel and AMD systems.

Download the package and matching checksum file to the same folder. In Terminal, go to that folder and run:

Terminal
sha256sum OpenClaw-*.deb

Compare the output with the matching entry in SHA256SUMS.linux-app.txt. If it differs, stop. A checksum downloaded from the same location detects corruption but does not independently establish publisher identity. Install the verified file, replacing the placeholder with its exact name:

Terminal
sudo apt install ./OpenClaw-VERSION-amd64.deb

Open OpenClaw from the application menu. Choose the local computer, select or sign in to a model provider, and follow the app prompts. See the official Linux app guide for current package and remote access details.

3. Keep Your Setup Private

The gateway coordinates your assistant, model and tools. It is not itself an AI model. Your provider may receive prompts and other context; a local gateway does not make a cloud model private or free.

  • Keep the gateway on loopback and do not open its port in your firewall for this setup. Remote access needs its own security plan.
  • Give the assistant only the access it needs. Review actions and use an isolated account or environment for experiments; a workspace alone is not a security sandbox.
  • Do not share API keys, dashboard pairing URLs, tokens or unredacted diagnostic output. Backups may contain credentials and conversations.
  • Review third-party skills before installing them. Keep OpenClaw and its runtime updated.

Run the built-in security audit and read its findings:

Terminal
openclaw security audit

Read the OpenClaw security guide before enabling remote access or channels.

4. Open the Dashboard on a Headless Server

On your own laptop or desktop, open a separate terminal and create an SSH tunnel. Replace USER and SERVER with your login and server address. This assumes the default gateway port and a running gateway on the server.

Terminal
ssh -N -L 18789:127.0.0.1:18789 USER@SERVER

Leave that terminal open. In your SSH session on the server, run:

Terminal
openclaw dashboard --no-open

Open the printed local URL in your own computer’s browser while the tunnel is active. Treat the one-time pairing URL as a password. If the local port is already used, choose another local port in the tunnel and adjust the URL accordingly. Closing the tunnel ends access; it does not stop the server gateway.

5. Back Up and Update OpenClaw

Before updating a working installation, create a backup and keep it somewhere private. It can contain sensitive settings and conversations:

Terminal
openclaw backup create --verify

Check the output for the saved location and any errors. For the installer-managed CLI, update and then check the gateway:

Terminal
openclaw update
openclaw gateway status

Read update prompts and errors. If you used the desktop app, follow its updater and the official release instructions; the app and gateway have separate update paths. Do not assume updating one updates the other.

Troubleshooting

Issue 1   openclaw: command not found

Open a new terminal, then run type -a openclaw. Read the installer output for the directory it added to PATH. If the install failed, fix the reported error and rerun it; avoid adding guessed paths or using sudo to run the assistant.

Issue 2   The gateway is not reachable

If you chose a foreground gateway, it must remain running in its terminal. For a background service, use openclaw gateway status and openclaw doctor. Read errors before changing settings. If the port is occupied, identify the existing process rather than exposing a new port.

Issue 3   The dashboard opens but chat fails

Check the selected model, provider sign-in, API key, account limits and network connection. Do not paste the key into a public support request. A local model must be installed and running separately.

Issue 4   The service stops after SSH logout

A Linux user service may stop when its last login session ends. Check loginctl show-user "$USER" -p Linger. If you deliberately want the user service to run after logout, an administrator can enable lingering with sudo loginctl enable-linger "$USER". This also lets other user services remain active; check them first.

Recover from an Interrupted Setup

If installation stops, read the last error and check disk space, network access and any sudo prompt. Reopen the terminal, then check whether the CLI exists before repeating the installer:

Terminal
type -a openclaw
openclaw --version

If installed, resume with openclaw onboard or run openclaw doctor to inspect the configuration. If missing, repeat the download and install steps after fixing the error. Do not delete existing configuration just to retry.

6. Remove OpenClaw

Step 1   Decide what to keep

The gateway service, configuration, sessions and workspace are separate removal choices. Back up anything you need first; backups may contain secrets. Preview complete removal without changing files:

Terminal
openclaw uninstall --dry-run --all

Review all listed paths, especially custom workspaces. Complete removal can delete your assistant data.

Step 2   Remove selected components

Run the interactive uninstaller and select only the components you want removed:

Terminal
openclaw uninstall

The default selection is the gateway service. Select state, workspace and app only if you intend to remove them. The CLI may remain after the service and data are removed; follow the official uninstall guide for your installation method. Do not delete a shared Node installation or npm prefix used by other tools.

Linux desktop app   Remove the .deb package

If you installed the official Linux desktop .deb, remove its package with:

Terminal
sudo apt remove open-claw

Review the proposed package changes before confirming. Removing the desktop package may leave the CLI, gateway service, configuration and conversation data. Use the steps above to review and remove those separately if wanted.

Helpful Resources

Frequently Asked Questions

Does OpenClaw include an AI model?

No. OpenClaw connects to a model provider or a separately configured local model. Check your provider’s terms and usage costs.

Does OpenClaw work on Ubuntu Server?

The command-line installer and gateway can run on a server. Use an SSH tunnel to reach a loopback-only dashboard from another computer.

Is OpenClaw free to use?

OpenClaw is open source. A hosted model provider or other connected service may charge separately.

Is everything private if the gateway runs locally?

Not necessarily. A cloud model provider may receive prompts and context, and tools may send data to other services. Review each connection.

Can I use OpenClaw without a messaging app?

Yes. Start with the browser dashboard and configure messaging channels later.

Will uninstalling remove my conversations?

It can if you select state or workspace removal. Review the dry run and create a secure backup before deleting data.

More Ubuntu AI guides: Install Ollama on Ubuntu | Install Open WebUI on Ubuntu | Install DeepSeek Harness on Ubuntu