Docker Claude Code Setup for Openclaw

A comprehensive guide to deploying Claude Code within Docker containers featuring web-based terminal access and persistent session management.

tonakic
v1.0.0
Apr 4, 2026
0
786
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install docker-claude-code-setup

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install docker-claude-code-setup using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Docker Claude Code Setup?

The docker-claude-code-setup is a specialized technical framework designed to containerize the Claude Code AI coding assistant. By integrating ttyd for web-based terminal access and tmux for session persistence, it transforms a local CLI tool into a robust, server-side development environment. This setup ensures that your AI-driven coding sessions remain active even if your browser is closed or your connection is interrupted.

Utilizing Openclaw Skills, this configuration facilitates advanced multi-agent workflows through the acpx tool. It provides a standardized architecture for developers to run Claude Code in isolated environments, making it ideal for cloud deployments, remote development servers, and OpenClaw ecosystems. The skill bridges the gap between local execution and cloud-native AI collaboration.

Docker Claude Code Setup Use Cases

  • Deploying Claude Code on remote servers or OpenClaw environments for browser-based access.
  • Maintaining long-running AI coding tasks that require session persistence via tmux.
  • Implementing multi-agent workflows by integrating acpx with Claude Code.
  • Standardizing development environments across teams using Docker containers.
  • Configuring secure API access for multiple LLM providers within a sandboxed terminal.

How Docker Claude Code Setup Works

  1. The Docker container initializes a Node.js environment to host the Claude Code CLI.
  2. ttyd launches a web-to-terminal server, exposing the command line interface over HTTP (port 6080).
  3. A tmux session is automatically started within the container to manage process lifecycle and persistence.
  4. Claude Code runs inside the tmux session, allowing it to continue operations independently of the web client status.
  5. Persistent volume mapping ensures that configuration files, API keys, and project metadata survive container restarts.

Docker Claude Code Setup Setup

Prerequisites

Ensure you have Docker installed and a valid Anthropic API key.

Installation Steps

# 1. Install Claude Code
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
npm install -g @anthropic-ai/claude-code

# 2. Setup Web Terminal
apt-get update && apt-get install -y ttyd tmux
bash scripts/start-ttyd.sh 6080

# 3. Configure API Environment
export ANTHROPIC_API_KEY="your-api-key"
claude

Docker Claude Code Setup Data Schema & Taxonomy

The skill utilizes specific directory structures to maintain state across sessions. Openclaw Skills users should map these to persistent volumes:

Directory Description Purpose
~/.claude Configuration Stores Claude Code settings and auth state
~/.acpx Agent Data Stores multi-agent tool configuration
~/workspace Project Files The primary directory for source code and CLAUDE.md

Docker Claude Code Setup Advanced Features

  • Multi-agent support: Integration with acpx for complex, cross-agent tasks.
  • Session Detachment: Use Ctrl+B D to disconnect from a session without stopping the AI process.
  • Custom API Routing: Support for ANTHROPIC_BASE_URL to use proxy layers or alternative providers.
  • Persistent Symlinking: Automatic script-based linking of container config paths to host-mounted volumes.
  • Web UI Terminal: Full mouse scroll and multi-pane support via ttyd and tmux.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*