Skip to content
Chromium sandbox support for non-root Playwright workers on Railway
trisfas
OP

a month ago

Hello Railway Support,

We are preparing a dedicated Railway container service that uses Playwright and Chromium to scan websites. Because it processes untrusted pages, we need Chromium’s sandbox enabled and a non-root runtime.

Environment and observations:

  • Playwright-core: 1.62.1
  • Chromium: 155.0.8059.39
  • Railway runtime: Railpack / Debian 13
  • Isolated diagnostic process: non-root UID/GID 10001
  • Launch option: chromiumSandbox=true
  • A setuid sandbox helper is present. In our separate local reproduction, it is root-owned with mode 4755.

The Railway non-root diagnostic launch failed with:

sandbox/linux/services/credentials.cc:137

Permission denied (13)

A separate local Docker reproduction, using the same Chromium version but Debian 12, failed with:

Failed to move to new namespace

errno = Operation not permitted

The local test confirmed executable permissions, required libraries, and writable per-user directories. However, it does not establish which Railway runtime policy caused the cloud failure. Our hardened non-root image has not been deployed.

Could you please clarify:

  1. Does Railway support the Linux user namespaces and namespace operations required by Chromium’s sandbox, including clone, unshare, and setns?
  2. Are there documented, supported configurations for running sandboxed Chromium as a non-root user using Railpack or a Dockerfile?
  3. Can Railway’s runtime security policies prevent these operations even when the sandbox helper has the correct permissions?
  4. What is Railway’s recommended secure deployment approach for Playwright Chromium processing untrusted websites?
  5. If this configuration is unsupported, is there an officially recommended alternative that preserves browser isolation?

We do not want to disable the sandbox, use privileged containers, or broadly relax security protections.

This is a platform-capability inquiry only. Please do not change any service or configuration on our behalf.

Thank you.

$10 Bounty

2 Replies

Status changed to Awaiting Railway Response Railway • about 1 month ago


Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 1 month ago


chevcellios

a month ago

Based on the public documentation, I couldn’t find a supported configuration for non-root Chromium with its sandbox enabled on a standard Railway service. That means support is unconfirmed, rather than conclusively impossible.

Railway’s Playwright guide documents installing browsers and dependencies, but does not describe enabling Chromium’s sandbox or configuring namespace permissions.

Playwright’s Docker documentation recommends a separate browser user and a seccomp profile permitting clone, setns, and unshare for crawling. That profile must be applied by the container runtime; copying it into a Docker image does not activate it.

A root-owned 4755 sandbox helper therefore isn’t sufficient by itself. Runtime restrictions can still block namespace operations, and Linux’s no_new_privs can prevent the helper from gaining privileges. Your logs don’t establish which restriction Railway applies, and the separate local Docker failure cannot prove the cloud cause.

There is a relevant alternative: a Railway moderator suggested Railway Sandboxes for a similar failure. Sandboxes are documented as isolated Linux VMs, but that does not yet confirm that Chromium’s own sandbox works inside them.

The remaining question for Railway engineering is:

Do Railway Sandboxes support non-root Chromium with chromiumSandbox: true, without privileged mode, added SYS_ADMIN, unconfined seccomp, or disabling browser sandbox protections? If so, what image and configuration are supported?

Until that is confirmed, I wouldn’t treat switching Dockerfiles or moving to Sandboxes as a verified fix. A separate browser host with verified sandbox support remains an architectural option if ordinary Railway services cannot meet the requirement.


trisfas
OP

a month ago

Could Railway engineering confirm separately whether standard Railway services and Railway Sandboxes support non-root Playwright Chromium with chromiumSandbox: true, without --no-sandbox, privileged mode, SYS_ADMIN, or unconfined seccomp?

If supported, please provide the official image/configuration and namespace restrictions. Is an API-driven private rendering worker a supported production use of Sandboxes, given the beta production-use warning in an employee reply?

We request guidance only; no resource changes or new probes are authorized.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...