[{"data":1,"prerenderedAt":191},["ShallowReactive",2],{"seo-verification":3,"blog-openhands-autonomous-ai-coding-agent-on-your-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-openhands-autonomous-ai-coding-agent-on-your-vps-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":28,"featuredImage":30,"bgImage":31,"posterImage":32,"relatedSolution":30,"intro":33,"sections":34,"ctaTitle":134,"ctaBody":135,"ctaButton":136,"ctaUrl":137,"relatedPosts":138},375,"openhands-autonomous-ai-coding-agent-on-your-vps",{"fr":12,"en":10,"ar":13,"es":14},"openhands-agent-ia-codage-autonome-self-hosted","openhands-وكيل-ذكاء-اصطناعي-للبرمجة-على-خادمك-الخاص","openhands-agente-de-ia-para-programacion-autonoma-en-tu-vps","OpenHands: autonomous AI coding agent on your VPS","Install OpenHands v1.23 on your VPS so an AI agent resolves GitHub issues autonomously, without sending your source code to an external cloud service.",11,0,false,"2026-09-24T00:00:00+00:00","2026-09-24T12:27:51+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},1,"Artificial Intelligence","intelligence-artificielle","bg-purple-500\u002F10 text-purple-400","ia",[29],{"id":23,"name":24,"slug":25,"color":26,"icon":27},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fopenhands-agent-ia-codage-autonome-self-hosted-poster.svg","GitHub Copilot Workspace and Codex cloud resolve issues, write tests and submit pull requests — but they process your code on servers you don't control. OpenHands (formerly OpenDevin) does the same from your own infrastructure: an AI agent that picks up an issue, clones the repo, writes changes, runs tests, and opens a PR — all inside an isolated Docker sandbox on your VPS. With 89,000 GitHub stars, an MIT license, and version v1.23.0 released on September 23, 2026, OpenHands has become the open-source reference for agentic software engineering. This guide covers full installation, LLM backend configuration, Docker socket hardening, and concrete use cases.",[35,39,49,52,80,83,86,89,92],{"type":36,"title":37,"body":38},"h2","OpenHands — the AI agent that codes in the terminal on your behalf","OpenHands is built on a simple architecture: a web server that orchestrates one or more LLM agents, each running inside an ephemeral Docker sandbox. The agent has a shell, filesystem access to the project, a GitHub API connection, and a reasoning loop that alternates between reading code, planning, and executing.\n\nThe SWE-bench Verified benchmark measures an agent's ability to resolve real GitHub issues without human assistance. In April 2025, OpenHands paired with Claude Sonnet reached 60.6% on this benchmark in a single trajectory, and 66.4% with five attempts and a critic model. For reference, an experienced junior developer resolves roughly 15 to 20% of these issues — today's agents significantly outperform humans on well-documented tasks.\n\nOpenHands is distributed under the MIT license: you can host it, modify it, and integrate it into your internal tools with no commercial restrictions. The project is actively maintained — v1.23.0 was released on September 23, 2026, featuring remote MCP server support and Git Sync for organization admins.",{"type":40,"title":41,"items":42},"ul","What OpenHands can do on its own",[43,44,45,46,47,48],"**Fix a documented bug**: the agent reads the GitHub issue, locates the faulty code, writes the fix, runs existing tests, and opens a PR with an explanatory commit message.","**Add a test suite**: starting from an uncovered module, the agent generates unit or integration tests aligned with the existing framework (pytest, PHPUnit, Jest…).","**Refactor code**: extract a function, rename variables to follow conventions, move a module toward a cleaner architecture.","**Complete documentation**: generate or update docstrings, README files, and API usage examples from the source code.","**Analyze an unfamiliar repository**: produce a structure report, identify critical dependencies, map data flows between modules.","**Open and describe a pull request**: generate the title, the PR body explaining changes, passing tests, and review instructions for the team.",{"type":36,"title":50,"body":51},"Numbered prerequisites before installation","OpenHands is a lightweight orchestrator, but it spawns sandbox containers per task. Requirements vary based on the chosen LLM backend.\n\n**Minimum hardware (cloud API — Claude, GPT-4, Gemini):**\n- RAM: 4 GB minimum, 8 GB recommended for concurrent tasks\n- CPU: 2 vCPU minimum, 4 vCPU for a smooth experience\n- Storage: 20 GB free (Docker images + project workspaces)\n- OS: Linux with Docker 24+ (Ubuntu 22.04 LTS or Debian 12 recommended)\n\n**Hardware if paired with local Ollama LLM:**\n- RAM: 16 GB minimum (8 GB for a quantized 7B model + 4 GB for the OS + headroom)\n- GPU VRAM: optional but strongly recommended — without GPU, inference is 10–30× slower\n- Storage: 40 GB free (Ollama models + Docker)\n\n**Software versions:**\n- Docker Engine 24.0 or later (check with `docker --version`)\n- Docker Compose v2 (bundled with Docker Desktop and Docker Engine 24+)\n- Linux kernel 5.4+ (required for sandbox isolation namespaces)\n\nPort 3000 must be reachable from your browser or VPN. Never expose it directly to the internet — use an Nginx reverse proxy with HTTPS.",{"type":53,"title":54,"steps":55},"steps","Install OpenHands on a VPS in 8 steps",[56,59,62,65,68,71,74,77],{"title":57,"body":58},"Install Docker Engine on your VPS","On Ubuntu 22.04 or Debian 12, install Docker with the official script:\n\n```bash\ncurl -fsSL https:\u002F\u002Fget.docker.com | sh\nsudo usermod -aG docker $USER\nnewgrp docker\n```\n\nVerify the installation:\n\n```bash\ndocker --version\n# Docker version 27.x.x\ndocker compose version\n# Docker Compose version v2.x.x\n```",{"title":60,"body":61},"Create the working directory","Create a dedicated folder for OpenHands and its persistent data:\n\n```bash\nmkdir -p \u002Fopt\u002Fopenhands\u002F.openhands\ncd \u002Fopt\u002Fopenhands\n```\n\nThe `.openhands` folder stores persistent configuration: API keys, conversation history, agent settings.",{"title":63,"body":64},"Launch OpenHands with Docker","Start OpenHands with the official command:\n\n```bash\ndocker run -it --rm --pull=always \\\n  -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev\u002Fall-hands-ai\u002Fruntime:latest \\\n  -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n  -v \u002Fopt\u002Fopenhands\u002F.openhands:\u002F.openhands \\\n  -p 127.0.0.1:3000:3000 \\\n  --add-host host.docker.internal:host-gateway \\\n  --name openhands-app \\\n  docker.all-hands.dev\u002Fall-hands-ai\u002Fopenhands:latest\n```\n\nThe `--pull=always` flag ensures you run the latest stable image. OpenHands is available at `http:\u002F\u002Flocalhost:3000`.\n\nFor a permanent deployment (auto-restart), add `--restart unless-stopped` and remove `-it --rm`.",{"title":66,"body":67},"Alternative: deploy with Docker Compose","For simpler management, create a `compose.yml` file in `\u002Fopt\u002Fopenhands`:\n\n```yaml\nservices:\n  openhands:\n    image: docker.all-hands.dev\u002Fall-hands-ai\u002Fopenhands:latest\n    container_name: openhands-app\n    pull_policy: always\n    ports:\n      - \"127.0.0.1:3000:3000\"\n    volumes:\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n      - .\u002F.openhands:\u002F.openhands\n    extra_hosts:\n      - host.docker.internal:host-gateway\n    restart: unless-stopped\n```\n\nStart the stack:\n\n```bash\ndocker compose up -d\ndocker compose logs -f\n```",{"title":69,"body":70},"Configure the LLM backend in the UI","Open `http:\u002F\u002Flocalhost:3000` (or your HTTPS domain). On first launch, OpenHands asks for:\n\n1. **LLM provider**: choose `Anthropic`, `OpenAI`, `Google`, or `openai-compatible` for Ollama\n2. **Model**: `claude-sonnet-4-5` (best quality\u002Fcost ratio) or `claude-opus-4-5` for complex tasks\n3. **API key**: paste your Anthropic or OpenAI key\n\nThese settings are saved to `~\u002F.openhands\u002Fconfig.toml` and persist across restarts.",{"title":72,"body":73},"Connect OpenHands to GitHub","To let OpenHands clone private repos, read issues, and open PRs, configure a GitHub Personal Access Token:\n\n1. On GitHub: **Settings → Developer settings → Personal access tokens → Fine-grained tokens**\n2. Grant permissions: `Contents` (read\u002Fwrite), `Pull requests` (read\u002Fwrite), `Issues` (read)\n3. In the OpenHands UI: **Settings → Git** → paste the token\n\nWith this token, simply paste a GitHub issue URL into the task field and OpenHands takes over.",{"title":75,"body":76},"Set up the Nginx reverse proxy with HTTPS","Never expose port 3000 directly. Use Nginx as a reverse proxy:\n\n```nginx\nserver {\n    listen 443 ssl;\n    server_name openhands.your-domain.com;\n\n    ssl_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fopenhands.your-domain.com\u002Ffullchain.pem;\n    ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fopenhands.your-domain.com\u002Fprivkey.pem;\n\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:3000;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_http_version 1.1;\n        proxy_read_timeout 600s;\n    }\n}\n```\n\nObtain the certificate:\n\n```bash\ncertbot --nginx -d openhands.your-domain.com\n```",{"title":78,"body":79},"Test with a first task","Open the interface, paste a GitHub issue URL (e.g. `https:\u002F\u002Fgithub.com\u002Fyour-org\u002Fyour-repo\u002Fissues\u002F42`) into the task field, and click **Start**.\n\nOpenHands will:\n1. Read the issue and plan the approach\n2. Clone the repository into the sandbox\n3. Explore the code, write changes\n4. Run the tests (`pytest`, `npm test`, etc.)\n5. Display a summary and offer to open a PR\n\nFollow the execution in real time in the **Trajectory** tab — every agent action (file read, shell command, code write) is traced.",{"type":36,"title":81,"body":82},"Configure the AI backend: Claude, GPT-4, or Ollama","OpenHands supports any provider compatible with the OpenAI API, plus native Anthropic, Google, and Azure providers. The model choice is the single biggest factor determining output quality.\n\n**Claude Sonnet (Anthropic) — recommended for production**\nClaude claude-sonnet-4-5 offers a leading quality\u002Fcost ratio for agentic software engineering. Its 200,000-token context window lets it analyze large codebases without chunking. Expect a few cents per task depending on complexity. Set `LLM_MODEL=anthropic\u002Fclaude-sonnet-4-5`.\n\n**Claude Opus (Anthropic) — for complex tasks**\nclaude-opus-4-5 delivers better performance on architectural problems and large-scale refactors, but costs 5–10× more than Sonnet. Reserve it for tasks that exceed Sonnet's capabilities.\n\n**Ollama (local LLM) — for full sovereignty**\nIf your code is particularly sensitive or you want zero external dependency, pair OpenHands with Ollama on the same VPS. Set `LLM_BASE_URL=http:\u002F\u002Fhost.docker.internal:11434` and `LLM_MODEL=openai\u002Fqwen2.5-coder:32b`. The `qwen2.5-coder` 32B models deliver top open-weights results on coding benchmarks. Downside: CPU inference is 10–30× slower than an API call — expect 1 to 5 minutes per subtask.\n\n**Key environment variables:**\n```bash\nLLM_MODEL=anthropic\u002Fclaude-sonnet-4-5\nLLM_API_KEY=sk-ant-...\nLLM_BASE_URL=         # empty for Anthropic, Ollama URL for local\nAGENT=CodeActAgent    # default agent, best SWE-bench performer\n```",{"type":84,"body":85},"tip","**Securing docker.sock — socket proxy and rootless mode.** Mounting `\u002Fvar\u002Frun\u002Fdocker.sock` inside a container is equivalent to granting full root access to the host machine: any container with access to this socket can create new containers, mount arbitrary volumes, and escalate privileges.\n\nTwo approaches to reduce this attack surface:\n\n**Option 1 — Socket proxy (Tecnativa\u002Fdocker-socket-proxy):** interpose a proxy that filters Docker API calls. OpenHands only needs `POST \u002Fcontainers\u002Fcreate`, `GET \u002Fcontainers\u002F{id}\u002Fjson`, `POST \u002Fcontainers\u002F{id}\u002Fstart` and `DELETE \u002Fcontainers\u002F{id}`. The socket proxy blocks everything else.\n\n```yaml\nservices:\n  socket-proxy:\n    image: tecnativa\u002Fdocker-socket-proxy\n    environment:\n      CONTAINERS: 1\n      POST: 1\n    volumes:\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock:ro\n    restart: unless-stopped\n\n  openhands:\n    image: docker.all-hands.dev\u002Fall-hands-ai\u002Fopenhands:latest\n    environment:\n      - DOCKER_HOST=tcp:\u002F\u002Fsocket-proxy:2375\n    depends_on:\n      - socket-proxy\n    restart: unless-stopped\n```\n\n**Option 2 — Rootless Docker:** run Docker in rootless mode (your system user, not root). The socket is then at `\u002Frun\u002Fuser\u002F1000\u002Fdocker.sock` and belongs to your user. Compromising this socket does not escalate beyond that user's privileges. Enable it with `dockerd-rootless-setuptool.sh install`.",{"type":36,"title":87,"body":88},"Concrete use cases","**Use case 1 — Resolve a documented GitHub issue**\nPaste the URL of a well-described issue (expected behavior, observed behavior, stack trace if available) into OpenHands. The agent reads the issue, searches the relevant files with `grep` and the code explorer, writes the fix, runs the test suite, and proposes a PR. For isolated, well-documented bugs, the success rate is high without human intervention.\n\n**Use case 2 — Generate tests for an uncovered module**\nSpecify the target: `Write unit tests for the module src\u002Fpayments\u002Fstripe.py, aiming for 80% coverage with pytest. Mocks should use unittest.mock.` The agent analyzes the module, identifies edge cases, and generates a test suite consistent with existing patterns in the project.\n\n**Use case 3 — Analyze an open source repository before forking**\nBefore integrating a dependency or forking a project, ask OpenHands: `Analyze the repository https:\u002F\u002Fgithub.com\u002Forg\u002Frepo. Identify critical dependencies, tight coupling points, missing tests, and known CVEs in direct dependencies.` The agent produces a structured report in a few minutes.\n\n**Use case 4 — Update a major dependency**\nMajor version migrations (Django 4 → 5, React 18 → 19, Laravel 10 → 11) touch many files. OpenHands can read the official changelog, identify breaking changes, apply mechanical updates, and rerun tests to identify what still needs manual attention.",{"type":36,"title":90,"body":91},"Troubleshooting — common errors","**`permission denied while trying to connect to the Docker daemon socket`**\nThe user running OpenHands is not in the `docker` group. Fix with:\n```bash\nsudo usermod -aG docker $USER && newgrp docker\n```\nIf mounting the socket inside a container, verify that the socket's GID matches what OpenHands expects.\n\n**`Container exited with OOM kill (exit code 137)`**\nThe sandbox ran out of memory. Increase available RAM on the VPS or limit concurrent tasks. Add `--memory=4g` to the sandbox container in the OpenHands configuration.\n\n**`LLM timeout after 120s`**\nOn large codebases, the agent sends large contexts to the LLM. Two solutions: (a) increase `LLM_TIMEOUT` in the configuration, (b) switch to a model with a larger context window or reduce the task scope.\n\n**`No such container: openhands-sandbox-xxx`**\nThe sandbox container was removed between two actions. This happens when Docker is restarted during a task. Restart the task from the beginning — OpenHands does not resume tasks interrupted by a Docker restart.\n\n**`Rate limit exceeded` (Anthropic\u002FOpenAI)**\nOpenHands makes many LLM calls on complex tasks. If you hit rate limits, add `LLM_NUM_RETRIES=5` and `LLM_RETRY_MIN_WAIT=30` to the configuration to let OpenHands retry automatically.",{"type":93,"title":94,"headers":95,"rows":100},"comparison","OpenHands vs Codex cloud vs Devin",[96,97,98,99],"Criterion","OpenHands self-hosted","GitHub Copilot Workspace","Devin (Cognition)",[101,106,111,116,121,126,130],[102,103,104,105],"Monthly cost","$0 (+ LLM API cost)","$19\u002Fmonth (Copilot Pro)","$500\u002Fmonth (Team plan)",[107,108,109,110],"Code sent externally","No (code stays on VPS)","Yes (GitHub\u002FMicrosoft)","Yes (Cognition)",[112,113,114,115],"Configurable LLM backend","Yes (Claude, GPT, Ollama…)","No (Microsoft model)","No (Cognition model)",[117,118,119,120],"SWE-bench Verified score","66.4% (5 attempts, Claude)","Not published","~49% (last publication)",[122,123,124,125],"License","MIT (open source)","Proprietary","Proprietary (SaaS)",[127,128,129,129],"VPS required","Yes (4 GB RAM min)","No",[131,132,133,132],"Full autonomy (auto PR)","Yes","Partial","Deploy OpenHands on a ServOrbit VPS","A ServOrbit VPS gives you full root access, Docker-ready infrastructure, and a dedicated IPv4. OpenHands runs entirely on your infrastructure — your source code never leaves your server. Choose the 8 GB RAM plan for optimal comfort with cloud API LLM models.","Deploy OpenHands on VPS","\u002Fvps-cloud",[139,157,174],{"id":140,"slug":141,"slugs":142,"title":146,"excerpt":147,"readTime":140,"views":18,"isPinned":19,"publishedAt":148,"updatedAt":149,"category":150,"categories":151,"featuredImage":30,"bgImage":31,"posterImage":153,"relatedSolution":154},8,"how-to-host-flowise-on-a-vps",{"fr":143,"en":141,"ar":144,"es":145},"heberger-flowise-vps","كيفية-استضافة-flowise-على-خادم-vps","como-alojar-flowise-en-un-vps","How to Host Flowise on a VPS","Deploy Flowise on your VPS: build no-code AI agents and chatbots with Docker and SSL. Environment variables, RAG with Ollama, updates and troubleshooting.","2026-06-12T00:00:00+00:00","2026-09-19T02:00:43+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[152],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fheberger-flowise-vps-poster.svg",{"categorySlug":155,"appSlug":156},"artificial-intelligence","flowise",{"id":158,"slug":159,"slugs":160,"title":164,"excerpt":165,"readTime":140,"views":18,"isPinned":19,"publishedAt":166,"updatedAt":167,"category":168,"categories":169,"featuredImage":30,"bgImage":31,"posterImage":171,"relatedSolution":172},271,"github-copilot-ai-credits-take-back-control-with-a-vps",{"fr":161,"en":159,"ar":162,"es":163},"github-copilot-ai-credits-alternative-vps","github-copilot-ai-credits-استعد-السيطرة-مع-خادم-vps","github-copilot-ai-credits-recuperar-control-con-un-vps","GitHub Copilot AI Credits: take back control with a VPS","Since June 2026, Copilot bills in AI Credits and predictability is gone. Host Ollama or Tabby on a VPS for a fixed-cost coding assistant with no prompt leakage.","2026-08-16T00:00:00+00:00","2026-09-07T11:26:10+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[170],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fgithub-copilot-ai-credits-alternative-vps-poster.svg",{"categorySlug":155,"appSlug":173},"ollama",{"id":175,"slug":176,"slugs":177,"title":181,"excerpt":182,"readTime":183,"views":23,"isPinned":19,"publishedAt":184,"updatedAt":167,"category":185,"categories":186,"featuredImage":30,"bgImage":31,"posterImage":188,"relatedSolution":189},122,"host-hermes-agent-on-a-vps",{"fr":178,"en":176,"ar":179,"es":180},"heberger-hermes-agent-vps","استضافة-hermes-agent-على-خادم-vps","alojar-hermes-agent-en-un-vps","Host Hermes Agent on a VPS","Host Nous Research's Hermes Agent on your VPS: the self-learning open source AI agent that remembers you. Guide to the Docker build, LLM configuration and memory backup.",3,"2026-02-22T00:00:00+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[187],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fheberger-hermes-agent-vps-poster.svg",{"categorySlug":155,"appSlug":190},"hermes",1790253222303]