Skip to main content

chrome-setup-flyio

Install and configure Chrome for headless browser automation on Fly.io. Fixes "Chrome not found" errors from agent-browser. Covers npm global install, Chrome download, AGENT_BROWSER_EXECUTABLE_PATH setup, and PATH configuration.

来源信息

仓库
rishijatia/Hakan
最近来源活动
2026年5月13日 03:15
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
chrome-setup-flyio
version
0.1.0
description
Install and configure Chrome for headless browser automation on Fly.io. Fixes "Chrome not found" errors from agent-browser. Covers npm global install, Chrome download, AGENT_BROWSER_EXECUTABLE_PATH setup, and PATH configuration.
triggers
["chrome not found","browser not working","agent-browser","install chrome"]
# Chrome Setup on Fly.io ## Problem The Hermes browser tool uses `agent-browser` CLI which requires Chrome/Chromium. On Fly.io, the container runs as non-root user `hermes` with no `apt-get`. ## Solution ### 1. Set npm global prefix (no sudo) ```bash npm config set prefix /opt/data/npm-global ``` ### 2. Install agent-browser ```bash export PATH="/opt/data/npm-global/bin:$PATH" npm install -g agent-browser ``` ### 3. Download Chrome ```bash agent-browser install ``` Chrome installs to: `~/.agent-browser/browsers/chrome-<version>/chrome` ### 4. Set environment variable Add to `/opt/data/.env`: ``` AGENT_BROWSER_EXECUTABLE_PATH=/opt/data/home/.agent-browser/browsers/chrome-<version>/chrome ``` ### 5. Add npm global to PATH in .env ``` PATH=/opt/data/npm-global/bin:$PATH ``` ### 6. Create symlink for cache detection The browser tool checks `/opt/data/.agent-browser/browsers` (HERMES_HOME-based path): ```bash mkdir -p /opt/data/.agent-browser ln -sf /opt/data/home/.agent-browser/browsers /opt/data/.agent-browser/browsers ``` ## Pitfalls - `npm install -g` fails without setting custom prefix (permission denied) - `agent-browser install --with-deps` fails on Fly.io (no apt-get) - Chrome binary is ~277MB; takes ~30s to download - `.env` changes require agent restart to take effect - Browser tool looks for Chrome in HERMES_HOME path, not HOME path — symlink needed - **Browserbase Launch plan doesn't include residential proxies or advanced stealth.** The API returns 402 and Hermes falls back gracefully, but the session is effectively the same as local Chrome from a datacenter IP. StreetEasy/Zillow/Google will still block with captchas. Scale plan required for proxy support.
在 GitHub 查看