---
# System prepended metadata

title: OpenClaw
tags: [OpenClaw, Juju, LXD]

---

# Install Juju & LXD

## Install [Juju](https://canonical.com/juju)
```shell
$ sudo snap install juju 
juju (3/stable) 3.6.12 from Canonical✓ installed
```
```shell
$ juju list-controllers
ERROR No controllers registered.

Please either create a new controller using "juju bootstrap" or connect to
another controller that you have been given access to using "juju register".
```
```shell
$ juju bootstrap localhost overlord
ERROR LXD socket not found; is LXD installed & running?

Please install LXD by running:
	$ sudo snap install lxd
and then configure it with:
	$ newgrp lxd
	$ lxd init
```
 ## Install [LXD](https://canonical.com/lxd)
 ```shell
$ sudo snap install lxd
lxd (5.21/stable) 5.21.4-9eb1368 from Canonical✓ installed
```
```shell
$ newgrp lxd
$ sudo adduser $USER lxd
```
```shell
$ sudo lxd init --auto
    # Optional to avoid some weird network issue afterward
$ lxc network set lxdbr0 ipv6.address none
$ lxc network set lxdbr0 ipv6.dhcp false
$ lxc network set lxdbr0 ipv6.nat false
```

## Bootstrap
```shell
$ juju bootstrap localhost overlord
Creating Juju controller "overlord" on localhost/localhost
Looking for packaged Juju agent version 3.6.12 for amd64
Located Juju agent version 3.6.12-ubuntu-amd64 at https://streams.canonical.com/juju/tools/agent/3.6.12/juju-3.6.12-linux-amd64.tgz
To configure your system to better support LXD containers, please see: https://documentation.ubuntu.com/lxd/en/latest/explanation/performance_tuning/
Launching controller instance(s) on localhost/localhost...
 - juju-646aea-0 (arch=amd64)                   
Installing Juju agent on bootstrap instance
Waiting for address
Attempting to connect to 10.133.166.131:22
Attempting to connect to [fd42:5109:9be4:f1ce:216:3eff:fed6:4bbb]:22
Connected to 10.133.166.131
Running machine configuration script...
Bootstrap agent now started
Contacting Juju controller at 10.133.166.131 to verify accessibility...

Bootstrap complete, controller "overlord" is now available
Controller machines are in the "controller" model

Now you can run
	juju add-model <model-name>
to create a new model to deploy workloads.
```
```shell
$ lxc list
+---------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
|     NAME      |  STATE  |         IPV4          |                     IPV6                      |   TYPE    | SNAPSHOTS |
+---------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
| juju-646aea-0 | RUNNING | 10.133.166.131 (eth0) | fd42:5109:9be4:f1ce:216:3eff:fed6:4bbb (eth0) | CONTAINER | 0         |
+---------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
```

# Install [OpenClaw](https://openclaw.ai/) and setup AI model

Using [Juju Charm for OpenClaw](https://fourdollars.github.io/openclaw-charm/)


## Add a workload model

```
juju add-model openclaw
```

## Local LLM

```shell
juju deploy openclaw ollama \
    --channel edge \
    --config gateway-bind=lan \
    --config dm-scope="per-channel-peer" \
    --config ai-provider=openai \
    --config ai-model=ministral-3:8b \
    --config ai-base-url=http://<IP>:11434/v1 \
    --config ai-api-key=noob
```

## Remote LLM


```shell
juju deploy openclaw google \
    --channel edge \
    --config gateway-bind=lan \
    --config dm-scope="per-channel-peer" \
    --config ai-provider=google \
    --config ai-model=gemini-2.5-flash-lite,gemini-2.5-flash,gemini-2.5-pro,gemini-3-flash-preview,gemini-3-pro-preview,gemini-3-pro-image-preview \
    --config ai-api-key=<TOKEN>
```

```shell
juju deploy openclaw copilot \
    --channel edge \
    --config gateway-bind=lan \
    --config dm-scope="per-channel-peer" \
    --config ai-provider=github-copilot \
    --config ai-model=gemini-3-flash-preview,gemini-3-pro-preview,claude-sonnet-4.5,claude-sonnet-4,claude-haiku-4.5,gpt-5.2,gpt-5.2-codex,gpt-5.1-codex-max,gpt-5.1-codex,gpt-5.1,gpt-5.1-codex-mini,gpt-5,gpt-5-codex,gpt-5-mini,gemini-2.5-pro \
    --config ai-api-key=<TOKEN>
```
`P.S.`
`Copilot models only support 'tools', and didn't support 'vision'.`
`Sending media files will break them.`

```shell
juju deploy openclaw openrouter \
    --channel edge \
    --config gateway-bind=lan \
    --config dm-scope="per-channel-peer" \
    --config ai-provider=openrouter \
    --config ai-model=openrouter/free \
    --config ai-api-key=<TOKEN>
```

# Initialize the SOUL

## Login Linux Container

```shell
$ juju ssh ollama/leader 

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@juju-9f18da-0:~$ openclaw tui
```

## BOOTSTRAP SOUL

`我們來完成開機程序吧！往後所有的對話都盡可能使用繁體中文，妳以後叫小姬，我是妳的主人，就稱呼我為主人，我在台灣時區，妳的專屬 Emoji 就用 🐥。`
`我們已經完成 BOOTSTRAP 了嗎？`

# Notes

## Gateway service

https://docs.openclaw.ai/start/quickstart#onboard-and-run-the-gateway

```shell
openclaw onboard --install-daemon
```

## Node service

https://docs.openclaw.ai/nodes#start-a-node-host-service

```shell
openclaw node install --host <gateway-host> --port 18789 --display-name "Build Node"
openclaw node restart
```

## Allow browser

```shell
openclaw approvals allowlist add --node openclaw/5 --agent main "/usr/bin/google-chrome-stable"
openclaw approvals allowlist add --node openclaw/5 --agent main "/usr/bin/google-chrome-stable *"
```