Manual installation
Manual Docker Compose installation
Section titled “Manual Docker Compose installation”Runs the Clawforce control plane as a Docker container on a single machine. Agent instances are created as sibling containers via the Docker socket.
Prerequisites
Section titled “Prerequisites”- Docker Engine 20.10+ or Docker Desktop
- Docker Compose v2
-
Clone the repository
Terminal window git clone https://github.com/clawforceone/clawforce.gitcd clawforce -
Create the data directory
Clawforce stores its SQLite database and SSH keys here. Use a path that persists across system restarts.
Terminal window mkdir -p ~/.clawforce/data -
Start the services
Terminal window CLAWFORCE_DATA_DIR=~/.clawforce/data docker compose up -dOr create a
.envfile in the repo root so you don’t need to pass the variable every time:Terminal window echo "CLAWFORCE_DATA_DIR=$HOME/.clawforce/data" > .envdocker compose up -d -
Verify it’s running
Terminal window docker compose logs -fcurl http://localhost:8000/healthThe dashboard is available at http://localhost:8000.
Docker Compose configuration
Section titled “Docker Compose configuration”The docker-compose.yml reads these variables from the environment or .env:
| Variable | Description | Default |
|---|---|---|
CLAWFORCE_DATA_DIR | Host path for the database and SSH keys | (required) |
Additional Clawforce settings (e.g., CLAWFORCE_AUTH_DISABLED, CLAWFORCE_RP_ID) can be passed as environment variables inside the docker-compose.yml environment: block. See Environment variables for the full list.
Docker socket access
Section titled “Docker socket access”Clawforce needs access to the Docker socket to create and manage agent containers. The docker-compose.yml mounts it automatically:
volumes: - /var/run/docker.sock:/var/run/docker.sockVerify the mount is present if agent creation fails:
docker inspect clawforce-dashboard --format \ '{{range .Mounts}}{{.Source}} -> {{.Destination}}{{println}}{{end}}'You should see /var/run/docker.sock -> /var/run/docker.sock.
Useful commands
Section titled “Useful commands”docker compose logs -f # Stream logsdocker compose down # Stopdocker compose up -d # Startgit pull && docker compose up -d --build # Rebuild from the updated source checkoutdocker compose down -v # Stop and delete volumes (destructive)For production environments, prefer pinned image tags and a snapshot-first upgrade flow instead of upgrading straight to latest. See Safe updates.
Use scripts/control-plane-state.sh snapshot docker before the upgrade if this deployment is business-critical.
Uninstall
Section titled “Uninstall”docker compose down# Remove agent containersdocker ps -a --filter "name=bot-" --format '{{.Names}}' | xargs -r docker rm -f# Remove data (optional)rm -rf ~/.clawforce/dataManual Helm installation (Kubernetes)
Section titled “Manual Helm installation (Kubernetes)”Deploys Clawforce to a Kubernetes cluster using the Helm chart included in the repository.
Prerequisites
Section titled “Prerequisites”- Kubernetes 1.24+
- kubectl configured with cluster access
- Helm v3+
- A
StorageClassthat supportsReadWriteOnce
-
Clone the repository
Terminal window git clone https://github.com/clawforceone/clawforce.gitcd clawforce -
Install the chart
Terminal window helm install clawforce helm/ \--namespace clawforce \--create-namespaceIf your kubeconfig is not at the default path:
Terminal window helm install clawforce helm/ \--namespace clawforce \--create-namespace \--kubeconfig /path/to/kubeconfig -
Verify the deployment
Terminal window kubectl get pods -n clawforcekubectl logs -f deploy/clawforce -n clawforceWait for the pod to reach
Runningstate. -
Access the dashboard
The chart exposes a NodePort service on port
30000by default.Terminal window # Get a node IPkubectl get nodes -o wide# Open http://<node-ip>:30000For local access without exposing a port:
Terminal window kubectl port-forward -n clawforce svc/clawforce 8000:8001# Open http://localhost:8000
Helm values
Section titled “Helm values”Create a custom-values.yaml to override defaults:
image: tag: 1.4.2
config: dataPath: /app/data # Path inside the pod for DB and SSH keys k8sNamespace: clawforce # Namespace where agent instances are created bootstrapDefaultContainerImage: clawforceone/agent-chromium:1.4.2
service: type: NodePort port: 8001 nodePort: 30000 # External port for the dashboard
persistence: enabled: true size: 1Gi storageClass: "" # Empty = use the cluster default StorageClass accessMode: ReadWriteOnce
resources: requests: cpu: 100m memory: 128Mi limits: cpu: 500m memory: 512Mi
rbac: create: true # Creates ServiceAccount, Role, RoleBindingApply your values:
helm install clawforce helm/ \ --namespace clawforce \ --create-namespace \ -f custom-values.yamlThe chart creates a ServiceAccount, Role, and RoleBinding scoped to the clawforce namespace. These grant only the permissions needed to manage agent pods, services, PVCs, secrets, and configmaps.
Set rbac.create: false if you manage RBAC externally.
Verify RBAC resources exist:
kubectl get serviceaccount,role,rolebinding -n clawforceUpgrade
Section titled “Upgrade”# Pull latest chart changesgit pull
helm upgrade clawforce helm/ \ --namespace clawforce \ -f custom-values.yamlFor production environments, pin the image tag in your values file and take a snapshot of the persistent data volume before upgrading. See Safe updates.
For each release, update both image.tag and config.bootstrapDefaultContainerImage together before running helm upgrade.
Use scripts/control-plane-state.sh snapshot kubernetes before the upgrade if this deployment is business-critical.
Uninstall
Section titled “Uninstall”helm uninstall clawforce -n clawforcekubectl delete namespace clawforceTroubleshooting
Section titled “Troubleshooting”Dashboard not reachable
Section titled “Dashboard not reachable”Docker: Check that the container is running:
docker ps --filter "name=clawforce-dashboard"Kubernetes: Check pod status and the service:
kubectl get pods -n clawforcekubectl get svc -n clawforceAgent containers not starting
Section titled “Agent containers not starting”Check the control plane logs first:
# Docker Composedocker compose logs -f
# Kuberneteskubectl logs -f deploy/clawforce -n clawforceDocker: Verify the Docker socket mount (see Docker socket access above).
Kubernetes: Verify RBAC:
kubectl get rolebinding -n clawforceViewing instance logs
Section titled “Viewing instance logs”# Dockerdocker logs -f bot-<instance-name>
# Kuberneteskubectl logs -f deploy/bot-<instance-name> -n clawforceHealth check
Section titled “Health check”curl http://localhost:8000/healthResetting the database
Section titled “Resetting the database”Docker Compose:
docker compose downrm -f ~/.clawforce/data/clawforce.dbdocker compose up -dKubernetes:
kubectl delete pvc clawforce-data -n clawforcekubectl rollout restart deploy/clawforce -n clawforceWindows: script fails with “invalid option” error
Section titled “Windows: script fails with “invalid option” error”If you run install.sh on Windows directly (not via WSL), you may see:
: invalid option nameet: pipefailThis is caused by Windows line endings. Use install.ps1 instead, or convert line endings first:
dos2unix install.shbash install.sh