This OpenClaw workspace has no root or sudo, so Docker Engine cannot be installed directly here. A standalone Compose CLI at .local/bin/docker-compose can validate YAML but cannot start containers without a Docker daemon.
## Configure secrets and host settings
From the directory containing docker-compose.yaml, create .env:
Use unique random values and never commit .env to Git.
## Validate and start
```bash
docker compose config --quiet
docker compose pull
docker compose up -d
docker compose ps
docker compose logs -f --tail=100
```
The first startup may take a few minutes while images download and MariaDB initializes.
## Initial access
- Nginx Proxy Manager: http://SERVER_IP:81
- Default email: admin@example.com
- Default password: changeme
- Change both immediately.
- Gitea: http://SERVER_IP:3000
- WireGuard UI: http://SERVER_IP:51821
- OpenClaw gateway: http://SERVER_IP:18789 if configured for HTTP access.
For internet-facing deployments, place Gitea, OpenClaw, and the WireGuard UI behind Nginx Proxy Manager with HTTPS. Do not expose admin interfaces publicly without authentication and TLS.
## Configure Nginx Proxy Manager
1. Log in at port 81 and change the default credentials.
2. Create Proxy Hosts for the services you want to publish.
3. On the Compose network, use these forward hosts:
- gitea:3000
- openclaw:18789
- wireguard-ui:51821
4. Request Let's Encrypt certificates and enable Force SSL.
WireGuard itself remains UDP on 51820; proxying the web UI does not replace that port.
## Firewall example
Open only the ports required by your deployment:
```bash
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 51820/udp
sudo ufw enable
```
Do not expose ports 81, 18789, 3000, 2222, or 51821 to the whole internet unless needed. Restrict them to your management network or VPN.
## Updates and shutdown
```bash
docker compose pull
docker compose up -d
docker image prune
```
Stop without deleting data:
```bash
docker compose down
```
Never use docker compose down -v unless you intentionally want to delete persistent application data. Back up named volumes before upgrades.
## Backups
Back up these data sets:
- OpenClaw configuration and data
- WireGuard configuration and keys
- Gitea repositories and /data
- Nginx Proxy Manager /data and /etc/letsencrypt
- Nginx Proxy Manager MariaDB data
List volumes with:
```bash
docker volume ls | grep -E 'openclaw|wireguard|gitea|npm'
```
## Troubleshooting
```bash
docker compose ps
docker compose logs -f openclaw
docker compose logs -f wireguard-ui
docker compose logs -f gitea
docker compose logs -f nginx-proxy-manager
```
After changing .env or the Compose file:
```bash
docker compose up -d --force-recreate
```
If a port is already in use, change the host-side variable in .env and rerun deployment. Keep container-side ports in docker-compose.yaml unchanged.
## Automated configuration tests
Gitea Actions runs `.gitea/workflows/test.yml` on every push, pull request,
and manual dispatch. It requires a Linux x86-64 runner labelled
`ubuntu-latest`, with outbound HTTPS access to GitHub for pinned tooling.
This repository contains deployment configuration, not application source.
The five Python standard-library tests validate the actual Compose schema,
service inventory and persistent storage, database health dependency,
WireGuard UI binding/TLS setting and UDP port, custom port/database settings,
and rejection of missing database passwords. There is no application build,
linter or existing application test suite to run.
Run the same checks locally with Python 3.13.9 and Docker Compose v5.6.1: