← Back to Blog

Self-Host OpenHands v1.7.0: Your Open-Source AI Coding Agent (Step-by-Step Guide)

What is OpenHands?

OpenHands is the open-source alternative to Claude Code, Codex, and Cursor — a platform where AI agents write code, run terminal commands, browse the web, and manage files autonomously. Think of it as a self-hosted AI developer that works with any LLM (Claude, GPT, DeepSeek, local models via Ollama).

With 72,500+ GitHub stars and trusted by teams at Netflix, Amazon, Apple, and NVIDIA, it's the most popular open-source AI coding platform available.

What's new in v1.7.0 (Released May 1, 2026)

This release, published just hours ago, brings several improvements:

  • LLM model display on conversation cards — always know which model is working
  • KVM acceleration for sandbox containers (SANDBOX_KVM_ENABLED) — dramatically faster code execution
  • MCP-native search — Tavily search key moved to MCP settings, aligning with the MCP ecosystem standard
  • Exposed SDK settings schema — easier programmatic agent configuration
  • Security fixes — multiple CVEs resolved through dependency updates
  • Numerous UI fixes — smoother experience across the board

Prerequisites

  • A Linux VPS or local machine with Docker installed
  • 4 GB RAM minimum (8 GB recommended)
  • An API key for your preferred LLM (Anthropic, OpenAI, or any OpenAI-compatible provider)

Method 1: Quick Start with Docker (Recommended)

The fastest way to get OpenHands running:

# Pull the latest image
docker pull ghcr.io/openhands/openhands:latest

# Run OpenHands GUI
docker run -it --rm --pull=always \
  -e LLM_API_KEY="sk-ant-..." \
  -e LLM_MODEL="claude-sonnet-4-20250514" \
  -e AGENT_SERVER_IMAGE_REPOSITORY=ghcr.io/openhands/agent-server \
  -e AGENT_SERVER_IMAGE_TAG=1.19.1-python \
  -e LOG_ALL_EVENTS=true \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v ~/.openhands:/.openhands \
  -p 3000:3000 \
  --add-host host.docker.internal:host-gateway \
  ghcr.io/openhands/openhands:latest

Open http://localhost:3000 in your browser, and you're ready to go.

Pro tip: Add --gpus all if you have an NVIDIA GPU and want to use local models via Ollama.

Method 2: Using the CLI Launcher with uv

If you prefer a Python-native installation:

# Install OpenHands via uv
uv tool install openhands --python 3.12

# Launch the GUI server
openhands serve

# With GPU support
openhands serve --gpu

# Mount your current directory
openhands serve --mount-cwd

Method 3: Docker Compose for Production

For a production setup with persistent storage:

services:
  openhands:
    image: ghcr.io/openhands/openhands:latest
    container_name: openhands
    ports:
      - "3000:3000"
    environment:
      - LLM_API_KEY=${LLM_API_KEY}
      - LLM_MODEL=claude-sonnet-4-20250514
      - AGENT_SERVER_IMAGE_REPOSITORY=ghcr.io/openhands/agent-server
      - AGENT_SERVER_IMAGE_TAG=1.19.1-python
      - LOG_ALL_EVENTS=true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - openhands_data:/.openhands
      - ./workspace:/workspace
    restart: unless-stopped

volumes:
  openhands_data:
docker compose up -d

Connecting to Different LLMs

For OpenRouter or OpenAI-compatible providers, also set LLM_BASE_URL.

Pro Tips

  1. Start with Claude Sonnet — best results for code generation
  2. Mount your project directory with --mount-cwd
  3. Enable KVM (SANDBOX_KVM_ENABLED=true) if supported — speeds up sandbox execution
  4. Use CLI mode for automation: openhands run --task "fix the bug in src/main.rs"
  5. Configure MCP search in Settings for autonomous web browsing

Troubleshooting

  • GUI doesn't load → Check if port 3000 is free. Run docker ps.
  • No internet access → Ensure outbound access and no firewall blocking the container.
  • Docker-in-Docker issues → The Docker socket mount is required for sandbox containers.
  • Out of memory → Needs ~4 GB RAM. Use a lightweight model on small VPS.

OpenHands v1.7.0 was released on May 1, 2026 under the MIT license. GitHub | Docs

← Retour au Blog

Auto-Hébergez OpenHands v1.7.0 : Votre Agent de Codage IA Open-Source (Guide Pas à Pas)

Qu'est-ce qu'OpenHands ?

OpenHands est l'alternative open-source à Claude Code, Codex et Cursor — une plateforme où des agents IA écrivent du code, exécutent des commandes terminal, naviguent sur le web et gèrent des fichiers de manière autonome. Considérez-le comme un développeur IA auto-hébergé compatible avec n'importe quel LLM (Claude, GPT, DeepSeek, modèles locaux via Ollama).

Avec plus de 72 500 étoiles GitHub et utilisé par des équipes chez Netflix, Amazon, Apple et NVIDIA, c'est la plateforme de codage IA open-source la plus populaire.

Nouveautés de la v1.7.0 (Publiée le 1er Mai 2026)

Cette version, publiée il y a quelques heures seulement, apporte plusieurs améliorations :

  • Affichage du modèle LLM sur les cartes de conversation — sachez toujours quel modèle travaille
  • Accélération KVM pour les conteneurs sandbox (SANDBOX_KVM_ENABLED) — exécution de code considérablement plus rapide
  • Recherche native MCP — la clé Tavily déplacée dans les paramètres MCP, alignée sur l'écosystème MCP
  • Schéma SDK exposé — configuration programmatique simplifiée des agents
  • Correctifs de sécurité — plusieurs CVE résolus via des mises à jour de dépendances
  • Nombreuses corrections UI — expérience plus fluide

Prérequis

  • Un VPS Linux ou une machine locale avec Docker installé
  • 4 Go de RAM minimum (8 Go recommandés)
  • Une clé API pour votre LLM préféré (Anthropic, OpenAI ou tout fournisseur compatible OpenAI)

Méthode 1 : Démarrage Rapide avec Docker (Recommandé)

Le moyen le plus rapide de lancer OpenHands :

# Télécharger l'image
docker pull ghcr.io/openhands/openhands:latest

# Lancer l'interface OpenHands
docker run -it --rm --pull=always \
  -e LLM_API_KEY="sk-ant-..." \
  -e LLM_MODEL="claude-sonnet-4-20250514" \
  -e AGENT_SERVER_IMAGE_REPOSITORY=ghcr.io/openhands/agent-server \
  -e AGENT_SERVER_IMAGE_TAG=1.19.1-python \
  -e LOG_ALL_EVENTS=true \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v ~/.openhands:/.openhands \
  -p 3000:3000 \
  --add-host host.docker.internal:host-gateway \
  ghcr.io/openhands/openhands:latest

Ouvrez http://localhost:3000 dans votre navigateur et c'est prêt.

Astuce : Ajoutez --gpus all si vous avez un GPU NVIDIA et souhaitez utiliser des modèles locaux via Ollama.

Méthode 2 : Installation avec uv (Python)

Pour une installation native Python :

# Installer OpenHands via uv
uv tool install openhands --python 3.12

# Lancer le serveur GUI
openhands serve

# Avec support GPU
openhands serve --gpu

# Monter le répertoire courant
openhands serve --mount-cwd

Méthode 3 : Docker Compose pour la Production

Pour une configuration production avec stockage persistant :

services:
  openhands:
    image: ghcr.io/openhands/openhands:latest
    container_name: openhands
    ports:
      - "3000:3000"
    environment:
      - LLM_API_KEY=${LLM_API_KEY}
      - LLM_MODEL=claude-sonnet-4-20250514
      - AGENT_SERVER_IMAGE_REPOSITORY=ghcr.io/openhands/agent-server
      - AGENT_SERVER_IMAGE_TAG=1.19.1-python
      - LOG_ALL_EVENTS=true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - openhands_data:/.openhands
      - ./workspace:/workspace
    restart: unless-stopped

volumes:
  openhands_data:
docker compose up -d

Configuration des LLM

Pour OpenRouter, définissez aussi LLM_BASE_URL.

Conseils d'Expert

  1. Commencez avec Claude Sonnet — meilleurs résultats pour la génération de code
  2. Montez votre projet avec --mount-cwd
  3. Activez KVM (SANDBOX_KVM_ENABLED=true) si supporté — accélère l'exécution
  4. Utilisez le mode CLI : openhands run --task "corrige le bug dans src/main.rs"
  5. Configurez la recherche MCP dans Paramètres pour la navigation web autonome

Dépannage

  • L'interface ne s'affiche pas → Vérifiez que le port 3000 est libre. Tapez docker ps.
  • Pas d'accès internet → Vérifiez les accès sortants et les règles de pare-feu.
  • Problèmes Docker-in-Docker → Le montage du socket Docker est obligatoire.
  • Mémoire insuffisante → Besoin d'environ 4 Go de RAM. Utilisez un modèle léger sur les petits VPS.

OpenHands v1.7.0 a été publié le 1er Mai 2026 sous licence MIT. GitHub | Docs