Railway

Deploy Browserless | Headless Chrome v2, Pinned and Token-Protected

Browserless v2 pinned, token-protected headless Chrome as a service

Deploy Browserless | Headless Chrome v2, Pinned and Token-Protected

Just deployed

Deploy and Host Browserless on Railway

Headless Chrome as a service - Browserless v2, pinned, behind a generated token.

About Hosting Browserless

The Browserless template on Railway is literally called "Browserless v1", and that is the problem. Upstream moved to v2 in 2023; v1 stopped at 1.61.1 and receives nothing - no Chrome updates, no security fixes. It also builds from a repository rather than the published image, which is why about one deployment in six fails.

This one runs the official v2 image at a pinned version, with a generated token and sane concurrency limits.

Common Use Cases

  • Rendering pages to PDF or screenshots from your own backend
  • Running Puppeteer or Playwright without shipping Chrome inside your app image
  • Scraping and automated checks, with a queue in front so a burst does not exhaust memory

Dependencies for Browserless Hosting

  • Nothing. One service, no database.

Deployment Dependencies

Implementation Details

Everything is behind TOKEN. Requests without it are refused with 401 - which matters more here than for most services: an open Browserless instance is a free browser that anyone on the internet can point at any URL, billed to you.

VariableWhy
TOKENGenerated. Required on every request as ?token= or a header
CONCURRENTSessions running at once - each is a Chrome instance, so this is your memory ceiling
QUEUEDRequests waiting for a slot before the service starts rejecting
TIMEOUTMilliseconds before a session is killed; stops a hung page holding a slot forever
CORSAllows browser-side calls

Quick check once it is up:

curl "https://your-domain/json/version?token=YOUR_TOKEN"
curl -X POST "https://your-domain/pdf?token=YOUR_TOKEN" \
  -H "content-type: application/json" -d '{"url":"https://example.com"}' -o page.pdf

Connect Puppeteer with puppeteer.connect({ browserWSEndpoint: "wss://your-domain?token=YOUR_TOKEN" }).

Sizing note: each concurrent session is a Chrome process. CONCURRENT=5 on a small instance is a reasonable start; raise it and watch memory before assuming it scales.

Why Deploy Browserless on Railway?

Chrome and its dependencies stay out of your application image, the service scales separately from your app, and TLS on the domain means wss:// works without extra configuration.


Template Content

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
30
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