{"slug": "claude-code-on-unraid-md", "title": "Claude Code on Unraid.md", "summary": "A developer published a guide for running Anthropic's Claude Code AI coding assistant inside a Docker container on Unraid using the Docker Compose Manager plugin. The setup installs Node.js and Claude Code, mounts Unraid directories, and requires creating a wrapper script to launch the tool.", "body_md": "This will install node js and allow you to use claude code in a docker container on unraid use the compose manager plugin.\n\nUse at your own riskThis will give AI access to whatever files you pass to the container (if using filesystem mcp).\n\n```\nservices:\n  claude-code:\n    image: node:20-alpine\n    container_name: claude-code-simple\n    restart: unless-stopped\n    \n    # Keep container running and install Claude Code on startup\n    command: sh -c \"apk add --no-cache bash && npm install -g @anthropic-ai/claude-code && tail -f /dev/null\"\n    \n    # Volume mappings for Unraid access\n    volumes:\n      # Core Unraid directories - put whatever you want here\n      - /mnt/user/appdata:/appdata:rw\n      - /mnt/user/downloads:/downloads:rw\n      - /mnt/user/media:/media:rw\n      \n      # Workspace for your projects\n      - /mnt/user/claude-workspace:/workspace:rw\n      \n      # Docker socket access\n      - /var/run/docker.sock:/var/run/docker.sock:rw\n    \n    # Working directory\n    working_dir: /workspace\n    \n    # Run as root to avoid permission issues\n    user: root\n    \n    # Environment\n    environment:\n      - NODE_ENV=development\n      - SHELL=/bin/bash\n    \n    # Labels\n    labels:\n      - \"com.unraid.docker.managed=composeman\"\n      - \"com.unraid.docker.icon=https://nodejs.org/static/images/logo.svg\"\n```\n\n- Go to\n**Docker Compose Manager** in Unraid - Create a new stack called \"claude-code\"\n- Paste the compose file above\n- Click\n**\"Compose Up\"**\n\nSSH into your server and run:\n\n```\ndocker exec -it claude-code-simple sh\necho '#!/bin/bash' > /usr/local/bin/claude-code\necho 'node /usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js \"$@\"' >> /usr/local/bin/claude-code\nchmod +x /usr/local/bin/claude-code\nclaude-code\n```\n\n*Normally you just run claude for claude code, but its aliased claude-code in our wrapper script*\n\nIf the container gets stopped/restarted:\n\n**Access the container**:`docker exec -it claude-code-simple sh`\n\n**Create wrapper script**(run step 3 above)** Start Claude Code**:`claude-code`\n\nto add the filesystem mcp server to give claude access to your files, you can run:\n\n```\nclaude-code mcp add filesystem -s user -- npx -y @modelcontextprotocol/server-filesystem /appdata /downloads /media\n```\n\nor whatever directories you want it to have access too\n\n- Bash and Claude Code are automatically installed on container startup\n- The wrapper script needs to be recreated after each container restart\n- All your Unraid directories are accessible within the but for Claude Code to actually access them, you'll need to use the File System MCP.", "url": "https://wpnews.pro/news/claude-code-on-unraid-md", "canonical_source": "https://gist.github.com/bluesky509/76885e12629826ef523f547086529bd9", "published_at": "2026-07-13 22:27:23+00:00", "updated_at": "2026-07-19 02:55:02.023954+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "large-language-models"], "entities": ["Claude Code", "Anthropic", "Unraid", "Docker", "Node.js"], "alternates": {"html": "https://wpnews.pro/news/claude-code-on-unraid-md", "markdown": "https://wpnews.pro/news/claude-code-on-unraid-md.md", "text": "https://wpnews.pro/news/claude-code-on-unraid-md.txt", "jsonld": "https://wpnews.pro/news/claude-code-on-unraid-md.jsonld"}}