Skip to content

Hostinger VPS template: Docker socket mount needed for sandbox isolation #29933

@jamtujest

Description

@jamtujest

Summary

The Hostinger VPS Docker Compose template (ghcr.io/hostinger/hvps-openclaw) does not mount /var/run/docker.sock into the OpenClaw container. This prevents the built-in sandbox feature (agents.defaults.sandbox) from functioning, leaving agent code execution without container-level isolation.

Environment

  • Hosting: Hostinger VPS (Docker Compose template)
  • Image: ghcr.io/hostinger/hvps-openclaw:latest (v2026.2.23)
  • Host OS: Ubuntu 24.04.3 LTS, Docker 29.2.1

Current State

The container runs with:

  • Privileged: false
  • No Docker socket mount
  • No additional Linux capabilities (CapAdd: [])
  • No Docker binary inside the container

All agent-executed commands run directly inside the gateway container, sharing the filesystem, network, and access to credentials in /data/.openclaw/.

Requested Change

The Hostinger template docker-compose.yml should include:

volumes:
  - /var/run/docker.sock:/var/run/docker.sock

And the Docker CLI binary should be available inside the container.

Security Impact

Without sandbox (current)

A successful prompt injection → RCE gives the attacker access to:

Asset Exposure
openclaw.json Bot tokens (Telegram, WhatsApp), API keys, auth tokens
credentials/ Stored provider credentials
Network Unrestricted outbound from container
Filesystem Full read/write to agent data, memory, workspace

With sandbox (requested)

  • Filesystem isolation — sandbox has no access to /data/.openclaw/ or credentials
  • Network restriction — configurable --network=none
  • Resource limits — separate CPU/memory per sandbox
  • Auto-cleanup — ephemeral containers removed after execution

Attack scenario

Step Without sandbox With sandbox
Attacker sends crafted message via Telegram Agent processes it Agent processes it
Agent tricked into running shell command Executes in gateway container Executes in isolated sandbox
cat /data/.openclaw/openclaw.json Succeeds — tokens exposed File does not exist in sandbox
curl exfiltrates data Sends tokens to attacker Network blocked or restricted
Cleanup Attacker may persist Sandbox auto-destroyed

Risk of the Change

Mounting /var/run/docker.sock introduces a privilege escalation path. However:

  1. The OpenClaw container is the only workload on single-tenant Hostinger VPS instances
  2. Docker socket is already accessible to root on host
  3. Security gained (sandbox isolation) far outweighs theoretical socket risk
  4. This is the officially recommended deployment model per docs.openclaw.ai/install/docker

Alternatives

If socket mount is not acceptable for the template:

  1. User-configurable volumes — let customers edit compose volumes in hPanel
  2. Rootless Docker / Sysbox — safer nested container support
  3. Documentation — note that sandbox is unavailable on Hostinger template

Expected Config After Fix

{
  "agents": {
    "defaults": {
      "sandbox": {
        "mode": "non-main",
        "scope": "agent",
        "workspaceAccess": "none"
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions