Browser Troubleshooting (Linux)
Problem: “Failed to start Chrome CDP on port 18800”
Section titled “Problem: “Failed to start Chrome CDP on port 18800””Kurahi’s browser control server fails to launch Chrome/Brave/Edge/Chromium with the error:
{"error":"Error: Failed to start Chrome CDP on port 18800 for profile \"Kurahi\"."}Root Cause
Section titled “Root Cause”On Ubuntu (and many Linux distros), the default Chromium installation is a snap package. Snap’s AppArmor confinement interferes with how Kurahi spawns and monitors the browser process.
The apt install chromium command installs a stub package that redirects to snap:
Note, selecting 'chromium-browser' instead of 'chromium'chromium-browser is already the newest version (2:1snap1-0ubuntu2).This is NOT a real browser — it’s just a wrapper.
Solution 1: Install Google Chrome (Recommended)
Section titled “Solution 1: Install Google Chrome (Recommended)”Install the official Google Chrome .deb package, which is not sandboxed by snap:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.debsudo dpkg -i google-chrome-stable_current_amd64.debsudo apt --fix-broken install -y # if there are dependency errorsThen update your Kurahi config (~/.kolo/kolo.json):
{ "browser": { "enabled": true, "executablePath": "/usr/bin/google-chrome-stable", "headless": true, "noSandbox": true }}Solution 2: Use Snap Chromium with Attach-Only Mode
Section titled “Solution 2: Use Snap Chromium with Attach-Only Mode”If you must use snap Chromium, configure Kurahi to attach to a manually-started browser:
- Update config:
{ "browser": { "enabled": true, "attachOnly": true, "headless": true, "noSandbox": true }}- Start Chromium manually:
chromium-browser --headless --no-sandbox --disable-gpu \ --remote-debugging-port=18800 \ --user-data-dir=$HOME/.kolo/browser/Kurahi/user-data \ about:blank &- Optionally create a systemd user service to auto-start Chrome:
[Unit]Description=Kurahi Browser (Chrome CDP)After=network.target
[Service]ExecStart=/snap/bin/chromium --headless --no-sandbox --disable-gpu --remote-debugging-port=18800 --user-data-dir=%h/.kolo/browser/Kurahi/user-data about:blankRestart=on-failureRestartSec=5
[Install]WantedBy=default.targetEnable with: systemctl --user enable --now kolo-browser.service
Verifying the Browser Works
Section titled “Verifying the Browser Works”Check status:
curl -s http://127.0.0.1:18791/ | jq '{running, pid, chosenBrowser}'Test browsing:
curl -s -X POST http://127.0.0.1:18791/startcurl -s http://127.0.0.1:18791/tabsConfig Reference
Section titled “Config Reference”| Option | Description | Default |
|---|---|---|
browser.enabled |
Enable browser control | true |
browser.executablePath |
Path to a Chromium-based browser binary (Chrome/Brave/Edge/Chromium) | auto-detected (prefers default browser when Chromium-based) |
browser.headless |
Run without GUI | false |
browser.noSandbox |
Add --no-sandbox flag (needed for some Linux setups) |
false |
browser.attachOnly |
Don’t launch browser, only attach to existing | false |
browser.cdpPort |
Chrome DevTools Protocol port | 18800 |
Problem: “Chrome extension relay is running, but no tab is connected”
Section titled “Problem: “Chrome extension relay is running, but no tab is connected””You’re using the chrome profile (extension relay). It expects the Kurahi
browser extension to be attached to a live tab.
Fix options:
- Use the managed browser:
kurahi browser start --browser-profile Kurahi(or setbrowser.defaultProfile: "Kurahi"). - Use the extension relay: install the extension, open a tab, and click the kurahi extension icon to attach it.
Notes:
- The
chromeprofile uses your system default Chromium browser when possible. - Local
kurahiprofiles auto-assigncdpPort/cdpUrl; only set those for remote CDP.