OpenClaw on SwissGPU
Introduction
OpenClaw is a self-hosted gateway for AI agents. It runs as a single gateway process on your server and provides a browser control UI for chat, sessions, configuration, and model setup.
It can be used directly in the browser, or connected to channels such as WhatsApp, Telegram, Discord, and iMessage. The main benefit is control: the gateway, workspace, and model connection stay on your own machine instead of depending on a hosted service.
On a SwissGPU server, OpenClaw works well as the control layer in front of local GPU-backed model runtimes such as Ollama or vLLM. The usual setup is to install OpenClaw, complete the onboarding wizard, confirm that the gateway is running, and then connect a local model provider on the same machine.
What You Need
- An active SwissGPU Linux server with an NVIDIA GPU.
- Working SSH access.
- A user account with sudo privileges.
- Enough disk space for OpenClaw and at least one local model.
Step 1: Verify GPU Availability
After logging in by SSH, check that the GPU is visible:
nvidia-smiStep 2: Install OpenClaw
curl -fsSL https://openclaw.ai/install.sh | bashThe installer sets up OpenClaw and may ask forsudoso it can install Node.js and the base packages OpenClaw needs.
Step 3: Complete the Onboarding Wizard
After installation, OpenClaw opens its onboarding wizard automatically. The wizard is the simplest way to accept the security notice, choose a local gateway, and configure a first model provider.
If you close it or want to run it again later, start it with:
openclaw onboard --install-daemonFor a local setup, chooseLocal (this machine)when OpenClaw asks where the gateway should run.
Step 4: Put OpenClaw on PATH
To make the OpenClaw command available in new shells, add the npm user bin directory to your shell path:
export PATH="$HOME/.npm-global/bin:$PATH"
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcIf your server useszshinstead ofbash, write the same export line to~/.zshrcinstead.
Step 5: Confirm the Local Gateway
systemctl --user enable --now openclaw-gateway.service
openclaw gateway status
openclaw health
curl -I http://127.0.0.1:18789/Once the gateway is running, the local dashboard is available on127.0.0.1:18789.
If you want OpenClaw to keep running after logout and reboot, enable linger once:
sudo loginctl enable-linger "$USER"Step 6: Manual Gateway Setup
If the wizard did not create the local gateway, or if you want to recreate it manually, run:
openclaw gateway install
openclaw config set gateway.mode '"local"'
openclaw config set gateway.bind '"loopback"'
openclaw config validateYou can print the gateway token later with:
openclaw config get gateway.auth.tokenStep 7: Optional Browser Access
If you want to open the OpenClaw UI in a browser on the local machine, forward the local gateway port:
ssh -N -L 18789:127.0.0.1:18789 <your-existing-ssh-target>Once the tunnel is open, the local browser can usehttp://127.0.0.1:18789/.
Step 8: Install Ollama
curl -fsSL https://ollama.com/install.sh | shThe official Linux installer sets up the Ollama binary and systemd service.
Step 9: Pull and Test an Ollama Model
Check that the service is active:
sudo systemctl status --no-pager ollama
ollama --versionDownload a small model first:
ollama pull llama3.2:1bThen test the local API and confirm the model is using the GPU:
cat >/tmp/ollama-test.json <<'EOF'
{
"model": "llama3.2:1b",
"prompt": "Reply only: OK",
"stream": false,
"keep_alive": "5m"
}
EOF
curl -s http://127.0.0.1:11434/api/generate -d @/tmp/ollama-test.json
ollama psStep 10: Connect Ollama to OpenClaw
If the onboarding wizard already configured Ollama, you can skip this step.
Otherwise run the focused model configuration flow:
openclaw configure --section modelChooseLocal (this machine)for the gateway location, then chooseOllamaas the provider.
Use these values when OpenClaw asks for the local provider details:
Provider: Ollama
Base URL: http://127.0.0.1:11434
API key: ollama-local
Model: llama3.2:1bStep 11: Install vLLM Prerequisites
A clean Ubuntu server does not always include the packages needed forpython3 -m venvandpip. Install them first:
sudo apt-get update
sudo apt-get install -y python3-pip python3.12-venvStep 12: Install and Start vLLM
Create an isolated environment and install vLLM:
python3 -m venv ~/vllm-test-env
source ~/vllm-test-env/bin/activate
python -m pip install --upgrade pip
python -m pip install vllmIf Ollama is still holding a model in GPU memory, unload it before starting vLLM on the same GPU:
ollama stop llama3.2:1bStart the server:
vllm serve Qwen/Qwen2.5-0.5B-Instruct \
--host 127.0.0.1 \
--port 8000 \
--api-key vllm-local \
--gpu-memory-utilization 0.8Once the model is loaded, confirm that the OpenAI-compatible endpoint is available:
curl -s http://127.0.0.1:8000/v1/models -H 'Authorization: Bearer vllm-local'Step 13: Connect vLLM to OpenClaw
If the onboarding wizard already configured vLLM, you can skip this step.
Otherwise run the focused model configuration flow again:
openclaw configure --section modelChooseLocal (this machine)for the gateway location, then choosevLLMas the provider.
Use these values for the vLLM provider:
Provider: vLLM
Base URL: http://127.0.0.1:8000/v1
API key: vllm-local
Model: Qwen/Qwen2.5-0.5B-InstructTroubleshooting
openclaw gateway status
journalctl --user -u openclaw-gateway.service -n 100 --no-pager
ollama ps
tail -n 120 /tmp/vllm.log
nvidia-smi- OpenClaw is not found in a new shell: add~/.npm-global/binto the shell path and reload the shell.
- The gateway service starts and exits: confirm thatgateway.modeis set tolocalandgateway.bindis set toloopback.
- The gateway probe fails right after restart: wait a few seconds and run the status command again.
- Python venv creation fails: installpython3.12-venvfirst.
- vLLM fails with a GPU memory error: stop the loaded Ollama model or lower--gpu-memory-utilization.
- The vLLM models endpoint returns Unauthorized: pass the bearer token header in thecurlrequest.
Resources
LongLink SAGL - v0.8.5 - All Rights Reserved