getting-started.mdx 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ---
  2. sidebar_position: 2
  3. ---
  4. # Getting Started
  5. ## System Requirements
  6. * Docker version 26.0.0+ or Docker Desktop 4.31.0+.
  7. * You must be using Linux or Mac OS.
  8. * If you are on Windows, you must use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install).
  9. ## Installation
  10. The easiest way to run OpenHands is in Docker. You can change `WORKSPACE_BASE` below to point OpenHands to
  11. existing code that you'd like to modify.
  12. ```bash
  13. export WORKSPACE_BASE=$(pwd)/workspace
  14. docker pull ghcr.io/all-hands-ai/runtime:0.9-nikolaik
  15. docker run -it --pull=always \
  16. -e SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:0.9-nikolaik \
  17. -e SANDBOX_USER_ID=$(id -u) \
  18. -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
  19. -v $WORKSPACE_BASE:/opt/workspace_base \
  20. -v /var/run/docker.sock:/var/run/docker.sock \
  21. -p 3000:3000 \
  22. --add-host host.docker.internal:host-gateway \
  23. --name openhands-app-$(date +%Y%m%d%H%M%S) \
  24. ghcr.io/all-hands-ai/openhands:0.9
  25. ```
  26. You can also run OpenHands in a scriptable [headless mode](https://docs.all-hands.dev/modules/usage/how-to/headless-mode), as an [interactive CLI](https://docs.all-hands.dev/modules/usage/how-to/cli-mode), or using the [OpenHands GitHub Action](https://docs.all-hands.dev/modules/usage/how-to/github-action).
  27. ## Setup
  28. After running the command above, you'll find OpenHands running at [http://localhost:3000](http://localhost:3000).
  29. The agent will have access to the `./workspace` folder to do its work. You can copy existing code here, or change `WORKSPACE_BASE` in the
  30. command to point to an existing folder.
  31. Upon launching OpenHands, you'll see a settings modal. You **must** select an `LLM Provider` and `LLM Model` and enter a corresponding `API Key`.
  32. These can be changed at any time by selecting the `Settings` button (gear icon) in the UI.
  33. If the required `LLM Model` does not exist in the list, you can toggle `Advanced Options` and manually enter it with the correct prefix
  34. in the `Custom Model` text box.
  35. The `Advanced Options` also allow you to specify a `Base URL` if required.
  36. <div style={{ display: 'flex', justifyContent: 'center', gap: '20px' }}>
  37. <img src="/img/settings-screenshot.png" alt="settings-modal" width="340" />
  38. <img src="/img/settings-advanced.png" alt="settings-modal" width="335" />
  39. </div>
  40. ## Versions
  41. The command above pulls the most recent stable release of OpenHands. You have other options as well:
  42. - For a specific release, use `ghcr.io/all-hands-ai/openhands:$VERSION`, replacing $VERSION with the version number.
  43. - We use semver, and release major, minor, and patch tags. So `0.9` will automatically point to the latest `0.9.x` release, and `0` will point to the latest `0.x.x` release.
  44. - For the most up-to-date development version, you can use `ghcr.io/all-hands-ai/openhands:main`. This version is unstable and is recommended for testing or development purposes only.
  45. You can choose the tag that best suits your needs based on stability requirements and desired features.
  46. For the development workflow, see [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md).
  47. Are you having trouble? Check out our [Troubleshooting Guide](https://docs.all-hands.dev/modules/usage/troubleshooting).