openhuman Docker & Self-Hosted Deployment

GitHub

Your Personal AI super intelligence. A brain that builds a local-first memory of your life, a fantastic orchestrator of agent fleets and workflows, and a...

36,249 stars Rust Rust 1 file ยท ~4,086 tokens
RAW Compose
1. Pull Image (DOCKERHUB) docker pull library/openhuman-core
2. Docker Run (1-Click Launch) docker run -d --name openhuman -p 7788:7788 --restart always openhuman-core:local
3. Podman Run podman run -d --name openhuman -p 7788:7788 --restart always openhuman-core:local
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/library/openhuman-core:local
5. ORAS Pull (OCI Artifact) oras pull openhuman-core:local
6. Compose Deployment docker compose up -d
docker-compose.yml
Download .yml
# OpenHuman Core โ€” Docker Compose for self-hosted cloud deploy.
#
# Brings up the headless Rust core (`openhuman-core`) on :7788, persists the
# workspace to a named volume, and reads secrets/config from a `.env` file
# next to this compose file.
#
# Usage:
#   1. cp .env.example .env  (then edit values โ€” at minimum BACKEND_URL and
#      OPENHUMAN_CORE_TOKEN; the latter is required for any client that calls
#      /rpc on this instance)
#   2. docker compose up -d
#   3. curl http://localhost:7788/health
#
# The image is built from the repo Dockerfile. To pin a published image
# instead of building, replace `build:` with `image: ghcr.io/.../openhuman-core:<tag>`.

services:
  openhuman-core:
    build:
      context: .
      dockerfile: Dockerfile
    image: openhuman-core:local
    container_name: openhuman-core
    restart: unless-stopped
    read_only: true
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    # The entrypoint starts as root so it can repair the ownership of a volume
    # Docker created as root:root, then drops to the `openhuman` user. Both
    # steps need capabilities that `cap_drop: ALL` removes:
    #   CHOWN  โ€” heal mis-owned workspace files (scripts/docker-entrypoint-core.sh)
    #   SETUID/SETGID โ€” gosu's privilege drop; without them the container
    #                   crash-loops before openhuman-core ever starts.
    # Deny-by-default is preserved: these three are the entire grant.
    # Alternative if you prefer zero capabilities: pin `user: "10001:10001"`,
    # which makes the entrypoint exec the binary directly and skip the heal โ€”
    # at the cost of no longer being able to repair a root-owned volume.
    cap_add:
      - CHOWN
      - SETUID
      - SETGID
    tmpfs:
      - /tmp
    ports:
      - "${OPENHUMAN_CORE_PORT:-7788}:7788"
    env_file:
      - path: .env
        required: false
    environment:
      # Bind to 0.0.0.0 inside the container so port-forwarding works regardless
      # of what `.env` says. The Dockerfile already sets this default, but make
      # it explicit so an inherited shell value cannot override it.
      OPENHUMAN_CORE_HOST: 0.0.0.0
      OPENHUMAN_CORE_PORT: "7788"
      OPENHUMAN_WORKSPACE: /home/openhuman/.openhuman
      XDG_CACHE_HOME: /home/openhuman/.openhuman/cache
      TMPDIR: /tmp
      RUST_LOG: ${RUST_LOG:-info}
    volumes:
      - openhuman-workspace:/home/openhuman/.openhuman
      # The agent's default projects/action directory lives outside the
      # workspace (~/OpenHuman). With `read_only: true` the core cannot create
      # it and logs "could not create default projects dir ... Read-only file
      # system" at every start; file tools then have nowhere to write.
      - openhuman-projects:/home/openhuman/OpenHuman
    mem_limit: ${OPENHUMAN_CORE_MEM_LIMIT:-4g}
    cpus: ${OPENHUMAN_CORE_CPUS:-2.0}
    healthcheck:
      test: ["CMD", "curl", "-fsS", "http://localhost:7788/health"]
      interval: 30s
      timeout: 5s
      start_period: 15s
      retries: 3

volumes:
  openhuman-workspace:
    name: openhuman-workspace
  openhuman-projects:
    name: openhuman-projects