openclaw-for-9router
1.0K
A production-ready Docker container that bundles the OpenClaw AI Assistantā with a custom AI provider (9Router), providing a fully automated, secure, and self-contained AI coding environment accessible via Web UI, SSH, and Web Terminal.
| Feature | Description |
|---|---|
| š¤ OpenClaw AI Assistant | Pre-installed and auto-onboarded ā ready to use instantly |
| š Web Dashboard | Access OpenClaw via browser at port 8080 (No Auth) |
| š» Web Terminal (ttyd) | Full terminal in the browser at port 6080 |
| š SSH Access | Standard SSH server on port 22 (mapped to 2222) |
| š³ Docker-in-Docker | Full Docker daemon running inside the container |
| š Credential Security | API keys are automatically redacted from all command outputs |
| šļø Multi-Architecture | Supports both linux/amd64 and linux/arm64 |
| ā” Auto-Initialization | One-time setup on first boot, instant restart on subsequent runs |
docker rundocker run -d --privileged \
--cpus="2.0" \
--memory="2g" \
-p 2222:22 \
-p 6080:6080 \
-p 8080:8080 \
-v openclaw-data:/home/ubuntu/.openclaw \
--name openclaw-app \
--hostname server \
-e SSH_USER="ubuntu" \
-e SSH_PASSWORD="ubuntu" \
-e SAWANG_CLOUD_API_KEY="your-9router-api-key" \
-e SAWANG_CLOUD_BASE_URL="https://your-9router-provider.com/v1" \
jefriherditriyanto/openclaw-for-9router:latest
docker-compose.yamlservices:
openclaw:
image: jefriherditriyanto/openclaw-for-9router:latest
container_name: openclaw-app
hostname: server
privileged: true
cpus: 2.0
mem_limit: 2g
ports:
- "2222:22" # SSH
- "6080:6080" # Web Terminal (ttyd)
- "8080:8080" # OpenClaw Dashboard
volumes:
- openclaw-data:/home/ubuntu/.openclaw
environment:
- SSH_USER=ubuntu
- SSH_PASSWORD=ubuntu
- SAWANG_CLOUD_API_KEY=your-9router-api-key
- SAWANG_CLOUD_BASE_URL=https://your-9router-provider.com/v1
restart: unless-stopped
volumes:
openclaw-data:
docker compose up -d
Once the container is running, access your environment through:
| Service | URL / Command | Credentials |
|---|---|---|
| š OpenClaw Dashboard | http://localhost:8080 | None / No Auth |
| š» Web Terminal | http://localhost:6080 | SSH_USER / SSH_PASSWORD |
| š SSH | ssh -p 2222 <SSH_USER>@localhost | SSH_PASSWORD |
| Variable | Default | Description |
|---|---|---|
SAWANG_CLOUD_API_KEY | (built-in default) | Required. API key for the AI model provider |
SAWANG_CLOUD_BASE_URL | (built-in default) | Required. Base URL of the OpenAI-compatible API endpoint |
SAWANG_CLOUD_MODEL | agent | Model ID for the AI model provider |
SSH_USER | ubuntu | Username for SSH, Web Terminal, and OpenClaw Dashboard |
SSH_PASSWORD | ubuntu | Password for SSH, Web Terminal, and OpenClaw Dashboard |
SSH_HOSTNAME | server | Hostname displayed inside the container |
SSH_PORT | 2222 | SSH port (internal mapping) |
TTYD_PORT | 6080 | Web Terminal (ttyd) port |
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Docker Container ā
ā ā
ā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāā ā
ā ā SSH Daemon ā ā ttyd Server ā ā OpenClaw ā ā
ā ā :22 ā ā :6080 ā ā Gateway :8080 ā ā
ā āāāāāāāā¬āāāāāāāā āāāāāāāā¬āāāāāāāā āāāāāāāāā¬āāāāāāāā ā
ā ā ā ā ā
ā ā¼ ā¼ ā¼ ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā User Environment ā ā
ā ā ⢠Node.js (via NVM) ⢠Docker-in-Docker ā ā
ā ā ⢠OpenClaw Agent ⢠git, curl, vim, nano ā ā
ā ā ⢠sudo (SSH-based) ⢠htop, btop, fastfetch ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Key internal components:
:8080) ā The web dashboard and API gateway running directly on port 8080.sudo wrapper that uses localhost SSH key-based elevation, compatible with gVisor and other sandboxed runtimes.This image implements multiple layers of credential protection:
Runtime Output Censoring ā All command execution outputs (printenv, env, cat, etc.) are dynamically intercepted and API keys/URLs are replaced with ***** before being displayed in the OpenClaw UI.
Config File Redaction ā The openclaw.json and models.json configuration files have credentials replaced with environment variable placeholders (${SAWANG_CLOUD_API_KEY}, ${SAWANG_CLOUD_BASE_URL}).
Background Credential Watcher ā A background process monitors models.json for any credential regeneration and automatically redacts raw values.
Agent Prompt Boundaries ā Security instructions are injected into the agent's SOUL.md and BOOTSTRAP.md to prevent the AI from disclosing credentials in its responses.
Note: The
--privilegedflag is required for Docker-in-Docker functionality. If you don't need DinD, you can omit it, but the internal Docker daemon will not start.
| Category | Packages |
|---|---|
| Runtime | Node.js (latest via NVM), npm, npx |
| AI | OpenClaw CLI + Agent |
| Container | Docker Engine (Docker-in-Docker) |
| Editor | nano, vim |
| Network | curl, wget, net-tools, iputils-ping, iproute2, speedtest-cli |
| Monitoring | htop, btop, fastfetch, neofetch |
| VCS | git |
| Remote | OpenSSH Server, ttyd (Web Terminal) |
| Port | Protocol | Service |
|---|---|---|
22 | TCP | SSH Server |
6080 | TCP | Web Terminal (ttyd) |
8080 | TCP | OpenClaw Dashboard |
This container supports any OpenAI-compatible API endpoint. Simply set your provider's base URL and API key:
-e SAWANG_CLOUD_BASE_URL="https://api.your-provider.com/v1"
-e SAWANG_CLOUD_API_KEY="sk-your-api-key-here"
To persist the OpenClaw workspace and configuration across container restarts:
-v openclaw-data:/home/ubuntu/.openclaw
Recommended minimum resources:
--cpus="2.0" --memory="2g"
For heavier workloads or Docker-in-Docker builds:
--cpus="4.0" --memory="4g"
0.0.1 ā Initial Releaseamd64 + arm64)Jefri Herdi Triyanto
This project is proprietary software. All rights reserved.
Content type
Image
Digest
sha256:262dee702ā¦
Size
725.4 MB
Last updated
2 days ago
docker pull jefriherditriyanto/openclaw-for-9router