Deploy Chromium | (Just Updated) Remote Browser + CDP for AI Agents, Profile Survives Redeploys

Remote Chromium desktop with CDP endpoint for AI agents; profile persists

Deploy Chromium | (Just Updated) Remote Browser + CDP for AI Agents, Profile Survives Redeploys

/config

Deploy and Host Chromium Remote Browser with CDP on Railway

A full Chromium desktop in your browser, plus a Chrome DevTools Protocol (CDP) endpoint that an AI agent in the same Railway project can drive with Playwright or Puppeteer. A login gates the web desktop, the browser profile lives on a Railway volume, and the whole thing deploys with no manual step.

About Hosting Chromium Remote Browser

This template runs one container: the jlesage/chromium web desktop (pinned by digest, Chromium 152) wrapped for Railway (bon5co/chromium-railway). The web desktop is served over noVNC at the public URL behind HTTP-layer authentication: user admin, password in WEB_AUTHENTICATION_PASSWORD, generated at deploy time and stable across redeploys. The browser profile (logins, cookies, extensions, downloads) lives on a volume at /config, so it survives a redeploy.

CDP listens on port 9222 on the private network only; no public domain targets it. Stock Chromium refuses CDP clients that dial a hostname (Host header is specified and is not an IP address or localhost); the wrapper adds a small proxy that fixes the Host header and the websocket URL, so chromium.railway.internal:9222 works from Playwright and Puppeteer. Verified: connect by hostname, open a page, evaluate JavaScript.

Agent contract:

  • Web desktop URL variable: CHROMIUM_URL (login admin / WEB_AUTHENTICATION_PASSWORD)
  • CDP URL variable: CHROMIUM_CDP_URL (private network, no auth, port 9222)
  • Version probe: GET $CHROMIUM_CDP_URL/json/version
  • Profile volume: /config
  • Healthcheck: none (every public path answers 302 to the login page by design)
from playwright.sync_api import sync_playwright
import os
with sync_playwright() as p:
    b = p.chromium.connect_over_cdp(os.environ["CHROMIUM_CDP_URL"])
    page = b.contexts[0].new_page()
    page.goto("https://example.com")
    print(page.title())

Full agent guide: AGENTS.md. Reuse contexts[0] (the persistent profile) and close pages, not the browser.

Why Deploy Chromium Remote Browser on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Chromium Remote Browser on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

  • Secure by default — the login is generated per deploy and the CDP port is never public.
  • Logins survive redeploys — the profile volume is preconfigured at the real /config path.
  • A human can take over — watch the agent and click in the same browser from any device.
  • Zero configuration — no variables to fill in.

Common Use Cases

  • AI agent browsing — give a coding or research agent a real, logged-in headed Chrome engine over CDP.
  • Scraping and testing — run Playwright or Puppeteer scripts against a persistent profile with real cookies.
  • Remote browser — a private desktop browser reachable from any device, away from your own machine.

Dependencies for Chromium Remote Browser Hosting

  • A volume mounted at /config (included in this template).

Deployment Dependencies


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
50
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51