- OpenClaw runs fully on Ubuntu 24.04 LTS — the install is nearly identical to 22.04 with one critical difference
- Never install Node.js via snap on Ubuntu 24.04 — snap sandboxes npm global installs, breaking the openclaw binary PATH
- Use NodeSource apt repository for Node.js 20 LTS — same as 22.04, same commands, same results
- Ubuntu 24.04 uses nftables under the hood but ufw commands remain identical — no firewall changes needed
- Migrating from 22.04: back up ~/.openclaw, provision fresh 24.04, restore config — no database migrations needed
Ubuntu 24.04 LTS launched in April 2024 and became many builders' default server OS by late 2024. OpenClaw works on it without modification — but there's one Ubuntu 24.04 quirk that will silently break your install if you don't know about it. This guide covers it directly.
What's Different in Ubuntu 24.04
For most server workloads, Ubuntu 24.04 is nearly identical to 22.04. The differences that matter for OpenClaw:
- Snap is more aggressive — 24.04 suggests
snap install nodewhen you typeapt install nodejs. Don't do it. - nftables backend — ufw now uses nftables internally instead of iptables. The ufw commands you know still work exactly the same.
- Python 3.12 default — doesn't affect Node.js-based OpenClaw, but matters if you're running Python-based skills or ingestion scripts.
- Updated systemd — minor improvements to service reliability; no config changes required for OpenClaw.
The Snap Node.js Trap
This is the one issue that catches Ubuntu 24.04 newcomers. When you run sudo apt install nodejs, Ubuntu 24.04 may respond with a snap suggestion instead of an apt package. If you follow that suggestion, Node.js installs inside a snap sandbox.
Inside the snap sandbox, npm global installs write to a sandboxed prefix. The openclaw binary gets installed there, but that path is not in your system PATH. Running openclaw --version returns "command not found" even though the install appeared to succeed.
which node. If the output contains "snap" (e.g., /snap/bin/node), you have snap Node.js. Remove it with sudo snap remove node, then follow the NodeSource install below. If which node returns /usr/bin/node, you're using apt and you're fine.Full Install Steps for Ubuntu 24.04
# Step 1: Update system
sudo apt-get update && sudo apt-get upgrade -y
# Step 2: Remove snap node if present
sudo snap remove node 2>/dev/null || true
# Step 3: Install NodeSource repository
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
# Step 4: Install Node.js via apt (NOT snap)
sudo apt-get install -y nodejs
# Confirm it's the apt version
which node # Should output /usr/bin/node, NOT /snap/bin/node
node --version # v20.x.x
# Step 5: Install OpenClaw
npm install -g @openclaw/cli
openclaw --version
sudo apt-mark hold nodejs. This keeps Node.js at your chosen version until you explicitly unhold and upgrade it.Systemd Service Setup
Create /etc/systemd/system/openclaw.service:
[Unit]
Description=OpenClaw AI Agent Gateway
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu
ExecStart=/usr/bin/openclaw serve
Restart=always
RestartSec=5
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now openclaw
sudo systemctl status openclaw
The --now flag enables and starts in one command. Check logs with journalctl -u openclaw -f.
Migrating from Ubuntu 22.04
OpenClaw's state is entirely file-based, making migrations straightforward. Here's the exact sequence:
- On the old server:
tar -czf openclaw-backup.tar.gz ~/.openclaw/ - Transfer the archive to the new 24.04 server:
scp openclaw-backup.tar.gz user@new-server:~/ - On the new server: follow this guide to install Node.js and OpenClaw
- Restore:
tar -xzf openclaw-backup.tar.gz -C ~/ - Start:
systemctl start openclaw
Your memory.md, gateway.yaml, skill configs, and channel registrations all come back intact. No database migrations, no re-pairing channels from scratch.
Common Mistakes on Ubuntu 24.04
Snap Node.js — covered above. It's the number one 24.04-specific issue. The symptom is always the same: npm install -g succeeds, but openclaw --version returns command not found.
Not running apt-get upgrade before the install. Ubuntu 24.04 LTS images from cloud providers are sometimes weeks behind on security patches at the time of provisioning. Run the upgrade first to avoid dependency conflicts during the Node.js install.
Reusing an old 22.04 systemd unit file that references the wrong user. On fresh 24.04 cloud instances, the default user is typically "ubuntu" — the same as 22.04. But double-check with whoami before writing the unit file. The wrong User= in a systemd unit means the service starts as root or fails entirely.
Frequently Asked Questions
Is OpenClaw compatible with Ubuntu 24.04?
Yes. OpenClaw runs fully on Ubuntu 24.04 LTS. The main difference from 22.04 is avoiding snap Node.js. Use Node.js 20 LTS via NodeSource and the install is clean.
Does Ubuntu 24.04 snap nodejs conflict with OpenClaw?
Yes. Snap Node.js sandboxes npm global installs, so the openclaw binary won't appear in PATH. Use the NodeSource apt repository instead — it installs Node.js without sandbox restrictions.
What's different about installing OpenClaw on Ubuntu 24.04 vs 22.04?
The main difference is Ubuntu 24.04's more aggressive snap suggestions and the nftables firewall backend. Avoid snap nodejs and the rest of the install is identical to 22.04.
Does OpenClaw work with Ubuntu 24.04 minimal install?
Yes. OpenClaw only requires Node.js 18+ and npm — installable on any Ubuntu 24.04 variant including the minimal server image with no desktop packages needed.
How do I migrate an OpenClaw install from Ubuntu 22.04 to 24.04?
Back up ~/.openclaw, provision a fresh 24.04 server, install OpenClaw using this guide, then restore your config directory. No database migrations are needed — OpenClaw state is entirely file-based.
What firewall tool should I use on Ubuntu 24.04 for OpenClaw?
Use ufw — identical commands as 22.04 despite the nftables backend change. Run ufw allow 8080/tcp and ufw enable. For production, put Nginx in front and expose only ports 80 and 443.
Ubuntu 24.04 and OpenClaw are a clean combination once you bypass the snap trap. NodeSource gives you a current Node.js runtime, the install takes minutes, and your agent runs the same way it does on 22.04. Provision a new server today and you'll have OpenClaw running before your next coffee break.