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 > Advanced
and ensureAllow the default Docker socket to be used
is 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 --version
in powershell and confirmDefault Version: 2
.
- Install Ubuntu:
wsl --install -d Ubuntu
in PowerShell as Administrator. - Restart computer when prompted.
- Open Ubuntu from Start menu to complete setup.
- Verify installation:
wsl --list
should show Ubuntu.
- Install Docker Desktop on Windows.
- Open Docker Desktop, go to
Settings
and confirm the following:
- General:
Use the WSL 2 based engine
is enabled. - Resources > WSL Integration:
Enable integration with my default WSL distro
is 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 Keys
tab. - 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
LLM
tab >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
$VERSION
inopenhands:$VERSION
andruntime:$VERSION
, with the version number. For example,0.9
will automatically point to the latest0.9.x
release, and0
will point to the latest0.x.x
release. - For the most up-to-date development version, replace
$VERSION
inopenhands:$VERSION
andruntime:$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.