Skip to content

Install OpenClaw on Ubuntu 24.04 Desktop (Physical Machine)

This guide helps you install Ubuntu 24.04 Desktop on a dedicated physical machine (or a long-running spare host) and deploy OpenClaw as a permanent service. Ideal for running an OpenClaw relay node 24/7.

  1. Download the Ubuntu 24.04 LTS Desktop ISO from ubuntu.com/download/desktop.
  2. Write the ISO to a USB drive (≥8 GB) using Rufus (Windows) or dd (Linux/macOS).
Terminal window
# Linux / macOS example
sudo dd if=ubuntu-24.04-desktop-amd64.iso of=/dev/sdX bs=4M status=progress

Step 2: Install the system (detailed, with screenshots)

Section titled “Step 2: Install the system (detailed, with screenshots)”
  1. Insert the USB drive and restart. Press the BIOS hotkey during boot (varies by vendor):
Brand Key Brand Key
ASUS F2 / Del Dell F2 / F12
Lenovo F2 / F12 HP Esc / F10
MSI Del Gigabyte Del / F12
  1. In BIOS, confirm these settings (recommended):
    • Boot mode: UEFI (disable Legacy/CSM; most modern machines default to UEFI)
    • Secure Boot: can stay enabled — Ubuntu 24.04 supports it; disable only if the machine fails to boot
    • Boot order: put the USB drive first
  2. Save and exit (usually F10) to boot from the USB drive.

Alternatively, press the boot-menu key at startup (often F12 / F11 / Esc) and pick the USB drive without entering BIOS.

After booting from USB, pick your language and click Install Ubuntu:

Choose language

Choose Install Ubuntu. If you pick “Try Ubuntu” you can preview the system first, then click the “Install Ubuntu” shortcut on the desktop to continue:

Install or try

If you see an Intel RST alert (some Lenovo/Dell machines), enter BIOS and switch the SATA mode from RST/RAID to AHCI to continue.

Keep the default English (US), or search and add Chinese Pinyin if needed (you can also add it later in Settings).

Connect if possible — the installer can then download updates and third-party drivers (e.g. NVIDIA) during installation.

2.6 Choose the installation type (partitioning — the key step)

Section titled “2.6 Choose the installation type (partitioning — the key step)”

Ubuntu 24.04 offers two install modes:

  • Interactive installation — used in this guide
  • Automated installation — for mass deployment via a config file; not needed for beginners

After choosing “Install Ubuntu”, you’ll see two disk handling options:

Section titled “Option A: Automatic partitioning (recommended for beginners)”

Choose Erase disk and install Ubuntu — the installer creates the EFI, root, and swap partitions automatically:

Erase disk confirmation

Best for: users who don’t care about disk details and want the fastest install. Note this wipes the entire disk.

Section titled “Option B: Manual partitioning (recommended for an always-on OpenClaw host)”

Choose Something else (manual partitioning), then click New Partition Table on the target disk (GPT) and create partitions as recommended below:

Ubuntu 24.04 recommended partition layout

Partition Size Type / filesystem Mount point Purpose
EFI System 1 GB FAT32 (EFI System Partition) /boot/efi UEFI bootloader, more stable for multi-boot
Root / 100 GB (≥ 60 GB) ext4 / System and software
/home all remaining space ext4 /home User data kept separate — survives reinstalls
swap optional 8–16 GB swap (auto) Virtual memory when RAM is low

Manual partitioning steps (1 TB disk example):

  1. Select the target disk → New Partition Table → confirm (wipes all partitions on it).
  2. Click + to create the EFI System Partition: size 1024 MB, type “EFI System Partition”, mount point /boot/efi, OK.
  3. Click + for the root partition: size 100 GB, filesystem ext4, mount point /, OK.
  4. Click + for /home: size = remaining space minus swap (e.g. ~900 GB on a 1 TB disk), filesystem ext4, mount point /home, OK.
  5. (Optional) Click + for swap: size 8192 or 16384 MB, type “swap area”, OK.
  6. Keep “Device for boot loader installation” at its default (the whole disk, e.g. /dev/sda) and click Install Now.

💡 Partitioning principles: with ≥ 16 GB RAM you can skip a swap partition (Ubuntu auto-enables a swapfile); with less RAM, create 8–16 GB. For a Windows dual boot, install Windows first, then Ubuntu — GRUB detects both automatically.

2.7 Confirm changes and pick your timezone

Section titled “2.7 Confirm changes and pick your timezone”
  • Review the changes the installer will make and click Continue.
  • Pick your timezone (e.g. Shanghai — click on the map or type it):

Select timezone

Fill in:

  • Your name: display name (e.g. rockchen)
  • Your computer’s name: auto-generated, editable (e.g. openclaw-host)
  • Pick a username: login name used with sudo later (e.g. rockchen)
  • Password: set it and remember it (you can require it at login)

Files are copied now — about 5–15 minutes depending on disk speed. Click Restart Now when done, remove the USB drive during reboot, then press Enter at the GRUB menu to boot into Ubuntu.

Open a terminal (Ctrl+Alt+T):

Terminal window
sudo apt update && sudo apt upgrade -y
Terminal window
curl -fsSL https://openclaw.ai/install.sh | bash

Verify:

Terminal window
openclaw --version
Terminal window
openclaw onboard --install-daemon

Pick your model provider and paste your API key. --install-daemon registers the Gateway as a systemd user service that runs when you log in.

To keep it running even when nobody is logged in (recommended for server use), enable user lingering:

Terminal window
sudo loginctl enable-linger $USER

Find your LAN IP:

Terminal window
ip addr show

From any device on the same network, open:

http://<host-IP>:18789
Section titled “Step 7: Secure remote access (Tailscale recommended)”

For access from outside your network, install Tailscale (WireGuard-based):

Terminal window
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

After signing in, your host gets a fixed 100.x.y.z address reachable from any device on the same account:

http://<Tailscale-IP>:18789

⚠️ Security: never expose port 18789 directly to the public internet. Always use Tailscale / VPN tunnels for external access.

OpenClaw doesn’t auto-start after reboot?

Section titled “OpenClaw doesn’t auto-start after reboot?”
Terminal window
openclaw status
systemctl --user status openclaw-gateway

Make sure loginctl enable-linger was run.

Configure it under Settings → Network (manual IP, netmask, gateway) to avoid DHCP address drift.