This guide covers the installation of OpenClaw on a Debian 13 (Trixie) unprivileged LXC container.
| Resource | Specification |
|---|---|
| OS | Debian 13 (Unprivileged LXC) |
| Disk | 20 GB |
| RAM | 4 GB |
| CPU | 2 Cores |
Run these commands as root to prepare the environment.
# Update and install core utilities
apt-get update && apt-get upgrade -y
apt-get install -y sudo curl systemd systemd-sysv openssh-server
If you need to access the container via SSH as root:
- Open the config:
nano /etc/ssh/sshd_config - Set
PermitRootLogin yes - Restart the service:
systemctl enable ssh
systemctl start ssh
Since Homebrew is not recommended for root users, use the native apt and npm route.
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs build-essential git
curl -fsSL https://openclaw.ai/install.sh | bash
To ensure OpenClaw runs in the background and starts on boot, create a service file.
Create the file:
nano /etc/systemd/system/openclaw.service
Paste the following configuration:
[Unit]
Description=OpenClaw Gateway Service
After=network.target
[Service]
# Running as root for container simplicity
User=root
Group=root
ExecStart=/usr/bin/openclaw gateway
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
Enable and Start:
systemctl daemon-reload
systemctl enable openclaw
systemctl start openclaw
Would you like me to generate a shell script that automates this entire process from start to finish?