Deploying AI Manus: Docker Compose Setup & Development Guide

5月9日 Published inAI Agent Frameworks

AI Manus is a general-purpose AI agent system designed to execute tools and operations within a secure sandbox environment.

The system utilizes Docker for both development and production deployment. To get started, ensure your system meets the following requirements:

  • Docker 20.10 or higher
  • Docker Compose

Model Requirements: To function correctly, the underlying LLM must provide:

  • OpenAI API compatibility
  • Support for function calling
  • JSON format output

We recommend using DeepSeek or GPT-series models for optimal performance.

Deployment Guide

The most efficient way to deploy AI Manus is through Docker Compose. Create a configuration file with the following content:

services:
  frontend:
    image: simpleyyt/manus-frontend
    ports:
      - "5173:80"
    depends_on:
      - backend
    restart: unless-stopped
    networks:
      - manus-network
    environment:
      - BACKEND_URL=http://backend:8000

  backend:
    image: simpleyyt/manus-backend
    depends_on:
      - sandbox
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - manus-network
    environment:
      # OpenAI API base URL
      - API_BASE=https://api.openai.com/v1
      # Your OpenAI API key
      - API_KEY=sk-xxxx
      # Model name
      - MODEL_NAME=gpt-4o
      # Temperature (randomness control)
      - TEMPERATURE=0.7
      # Max tokens for response
      - MAX_TOKENS=2000
      # Google Search API key (optional)
      #- GOOGLE_SEARCH_API_KEY=
      # Google Custom Search Engine ID
      #- GOOGLE_SEARCH_ENGINE_ID=
      # Log level
      - LOG_LEVEL=INFO
      # Sandbox Docker image
      - SANDBOX_IMAGE=simpleyyt/manus-sandbox
      # Sandbox container name prefix
      - SANDBOX_NAME_PREFIX=sandbox
      # Sandbox TTL (minutes)
      - SANDBOX_TTL_MINUTES=30
      # Docker network for sandbox
      - SANDBOX_NETWORK=manus-network

  sandbox:
    image: simpleyyt/manus-sandbox
    command: /bin/sh -c "exit 0"  # Ensures the image is pulled without starting a persistent container
    restart: "no"
    networks:
      - manus-network

networks:
  manus-network:
    name: manus-network
    driver: bridge

Save this file as docker-compose.yml. To start the services, run:

docker compose up -d

Once the containers are running, open your browser and navigate to http://localhost:5173 to access the AI Manus interface.

Development Guide

Project Structure

AI Manus consists of three distinct sub-projects:

  • frontend: The web-based user interface.
  • backend: The core API server.
  • sandbox: The isolated execution environment.

Environment Setup

  1. Clone the repository:
git clone https://github.com/simpleyyt/ai-manus.git
cd ai-manus
  1. Initialize the environment configuration:
cp .env.example .env
  1. Edit the .env file with your credentials:
# Model provider settings
API_KEY=your_api_key_here
API_BASE=https://api.openai.com/v1

# Model configuration
MODEL_NAME=gpt-4o
TEMPERATURE=0.7
MAX_TOKENS=2000

# Optional: Google Search integration
#GOOGLE_SEARCH_API_KEY=
#GOOGLE_SEARCH_ENGINE_ID=

# Sandbox configuration
SANDBOX_IMAGE=simpleyyt/manus-sandbox
SANDBOX_NAME_PREFIX=sandbox
SANDBOX_TTL_MINUTES=30
SANDBOX_NETWORK=manus-network

# Logging
LOG_LEVEL=INFO

Development & Debugging

  1. Launch the system in debug mode:
# This command uses docker-compose-development.yaml internally
./dev.sh up

In this mode, all services support hot reloading, so any code changes you save will apply automatically. The following ports are exposed for development:

  • 5173: Web frontend
  • 8000: Backend API
  • 8080: Sandbox API
  • 5900: Sandbox VNC (for visual debugging)
  • 9222: Sandbox Chrome CDP

Note: In debug mode, only one global sandbox instance is active at a time.

  1. If you modify dependencies (e.g., editing requirements.txt or package.json), you must rebuild the environment:
# Stop services and remove volumes
./dev.sh down -v

# Rebuild the Docker images
./dev.sh build

# Restart debug mode
./dev.sh up

Publishing Images

To build and push your own versions of the images to a registry, use the following commands:

export IMAGE_REGISTRY=your-registry-url
export IMAGE_TAG=latest

# Build the images
./run build

# Push to your registry
./run push