Provision, secure, and validate a self-hosted AI agent host (OpenClaw/Clawdbot) over Tailscale SSH.
Status: run-on-demand tooling — nothing here runs on a schedule. Everything executes from your workstation against a remote host you name on the command line.
- Tailscale install — stand up a private VPN path to the host so no SSH port is ever exposed to the internet
- Azure OpenAI model config — point the agent runtime at an Azure-hosted OpenAI deployment instead of the default provider, applied remotely with automatic backup
- SSH hardening guide — key-only auth, non-default port, firewall, and (if you must) port-forwarding setup
- End-to-end validation — a single command that checks runtime status, health, gateway, ports, logs, skills, channels, models, and config on the remote host
workstation agent host
┌─────────────────────────┐ Tailscale ┌──────────────────────────┐
│ setup-azure-openai- │────ssh/sftp─▶│ ~/.clawdbot/clawdbot.json │
│ remote.sh │ │ (merge + .bak backup) │
│ │ │ ~/.zshrc (API key) │
│ run-openclaw- │ │ clawd restart │
│ validation.sh ────────│──ssh 'bash'─▶│ openclaw-validate- │
│ │ │ remote.sh (11 checks) │
└─────────────────────────┘ └──────────────────────────┘
The scripts never install the agent runtime itself — that is the upstream OpenClaw project. This repo assumes clawd / clawdbot / openclaw is already installed on the host and handles everything around it: network path, model provider, auth, and health checks.
- macOS on both ends (scripts use Homebrew and
~/.zshrcon the host) - The OpenClaw/Clawdbot runtime installed on the agent host
- SSH access to the host — key-based auth strongly preferred
- Tailscale account (free tier is fine) for the VPN path
git clone https://github.com/BaseLayerAI/agent-host-provisioning
cd agent-host-provisioning
cp .env.example .env # fill in SSH_KEY_PATH and AZURE_OPENAI_API_KEY
./run-openclaw-validation.sh user@host| Script | Runs on | What it does |
|---|---|---|
install-tailscale-remote.sh |
agent host | Installs Tailscale via Homebrew cask and opens the app for login |
setup-azure-openai-remote.sh user@host |
workstation | Merges remote-updates/azure-openai-config.json into the host's ~/.clawdbot/clawdbot.json (with timestamped backup), pushes AZURE_OPENAI_API_KEY into the host's ~/.zshrc, restarts clawd |
run-openclaw-validation.sh user@host |
workstation | Streams openclaw-validate-remote.sh to the host over SSH and runs it |
openclaw-validate-remote.sh |
agent host | The 11-step validation itself: status, health, gateway, doctor, port check, logs, skills, channels, models, config |
ssh-askpass.sh |
workstation | SSH_ASKPASS helper that echoes SSH_PASSWORD for non-interactive password auth — fallback only, prefer keys |
Before running the Azure setup, edit remote-updates/azure-openai-config.json and replace YOUR-RESOURCE with your Azure OpenAI resource name. The provider id azure-openai appears twice (provider key and primary model ref) and must stay in sync.
All read from .env in the repo root (see .env.example).
| Variable | Required | Purpose |
|---|---|---|
SSH_KEY_PATH |
recommended | Private key for the agent host; absolute path or a name under ~/.ssh/ |
SSH_PASSWORD |
no | Login password fallback used by ssh-askpass.sh; discouraged — use keys |
AZURE_OPENAI_API_KEY |
for Azure setup | Pushed to the agent host and referenced as ${AZURE_OPENAI_API_KEY} in the provider config |
SSH-REMOTE-ACCESS-GUIDE.md— Tailscale vs. port forwarding, sshd hardening, DDNS, security checklistAZURE-OPENAI-SETUP.md— the Azure model-swap procedure end to endremote-updates/— config fragments and workspace-doc updates the setup scripts apply on the host
There is nothing to deploy. Clone on your workstation, fill in .env, and run scripts against the host you name. install-tailscale-remote.sh and openclaw-validate-remote.sh can also be copied to (or streamed at) the host directly.