Recommended Methods for Running Openhands on Your Local System
System Requirements
- MacOS with Docker Desktop support
- Linux
- Windows with WSL and Docker Desktop support
- Windows without WSL (see Windows Without WSL Guide)
Prerequisites
MacOS
MacOS
Docker Desktop
- Install Docker Desktop on Mac.
- Open Docker Desktop, go to
Settings > Advancedand ensureAllow the default Docker socket to be usedis enabled.
Linux
Linux
Windows
Windows
WSLAlternative: Windows without WSLIf you prefer to run OpenHands on Windows without WSL or Docker, see our Windows Without WSL Guide.
- Install WSL.
- Run
wsl --versionin powershell and confirmDefault Version: 2.
- Install Ubuntu:
wsl --install -d Ubuntuin PowerShell as Administrator. - Restart computer when prompted.
- Open Ubuntu from Start menu to complete setup.
- Verify installation:
wsl --listshould show Ubuntu.
- Install Docker Desktop on Windows.
- Open Docker Desktop, go to
Settingsand confirm the following:
- General:
Use the WSL 2 based engineis enabled. - Resources > WSL Integration:
Enable integration with my default WSL distrois enabled.
The docker command below to start the app must be run inside the WSL terminal. Use
wsl -d Ubuntu in PowerShell or search âUbuntuâ in the Start menu to access the Ubuntu terminal.Start the App
Option 1: Using the CLI Launcher with uv (Recommended)
We recommend using uv for the best OpenHands experience. uv provides better isolation from your current projectâs virtual environment and is required for OpenHandsâ default MCP servers (like the fetch MCP server). Install uv (if you havenât already): See the uv installation guide for the latest installation instructions for your platform. Launch OpenHands:--gpu flag enables GPU support via nvidia-docker, and --mount-cwd mounts your current directory into the container.
Alternative: Traditional pip installation
Alternative: Traditional pip installation
If you prefer to use pip and have Python 3.12+ installed:Note that youâll still need
uv installed for the default MCP servers to work properly.Option 2: Using Docker Directly
Docker Command (Click to expand)
Docker Command (Click to expand)
Note: If you used OpenHands before version 0.44, you may want to run mv ~/.openhands-state ~/.openhands to migrate your conversation history to the new location.
Youâll find OpenHands running at http://localhost:3000!
Setup
After launching OpenHands, you must select anLLM Provider and LLM Model and enter a corresponding API Key.
This can be done during the initial settings popup or by selecting the Settings
button (gear icon) in the UI.
If the required model does not exist in the list, in Settings under the LLM tab, you can toggle Advanced options
and manually enter it with the correct prefix in the Custom Model text box.
The Advanced options also allow you to specify a Base URL if required.
Getting an API Key
OpenHands requires an API key to access most language models. Hereâs how to get an API key from the recommended providers:OpenHands (Recommended)
OpenHands (Recommended)
- Log in to OpenHands Cloud.
- Go to the Settings page and navigate to the
API Keystab. - Copy your
LLM API Key.
Anthropic (Claude)
Anthropic (Claude)
Google (Gemini)
Google (Gemini)
- Create a Google account if you donât already have one.
- Generate an API key.
- Set up billing.
Local LLM (e.g. LM Studio, llama.cpp, Ollama)
Local LLM (e.g. LM Studio, llama.cpp, Ollama)
If your local LLM server isnât behind an authentication proxy, you can enter any value as the API key (e.g.
local-key, test123) â it wonât be used.Using a Local LLM
Effective use of local models for agent tasks requires capable hardware, along with models specifically tuned for instruction-following and agent-style behavior.
Setting Up Search Engine
OpenHands can be configured to use a search engine to allow the agent to search the web for information when needed. To enable search functionality in OpenHands:- Get a Tavily API key from tavily.com.
- Enter the Tavily API key in the Settings page under
LLMtab >Search API Key (Tavily)
Versions
The docker command above pulls the most recent stable release of OpenHands. You have other options as well:- For a specific release, replace
$VERSIONinopenhands:$VERSIONandruntime:$VERSION, with the version number. For example,0.9will automatically point to the latest0.9.xrelease, and0will point to the latest0.x.xrelease. - For the most up-to-date development version, replace
$VERSIONinopenhands:$VERSIONandruntime:$VERSION, withmain. This version is unstable and is recommended for testing or development purposes only.
Next Steps
- Connect OpenHands to your local filesystem. to use OpenHands with your GitHub repositories
- Run OpenHands in a scriptable headless mode.
- Run OpenHands with a friendly CLI.
- Run OpenHands on tagged issues with a GitHub action.

