21 days ago
Hello Railway team,
We need a supported configuration for a private PDF worker that runs Chromium with its sandbox enabled as a non-root user.
The Docker image builds and publishes successfully. Its runtime is Node 22.23.3 on Debian bookworm-slim, with Debian chromium and chromium-sandbox installed, USER node, and writable temporary browser profiles. The worker has no application credentials and processes only synthetic content during its readiness test.
The real browser readiness test fails during launch. Our safe diagnostic reports SandboxDenied; the worker then remains blocked and /health returns HTTP 503. We have not connected the application to this worker.
Additional namespace probes in the existing service returned:
- As an unprivileged user: unshare --user --map-root-user true -> Permission denied, exit 1.
- A PID namespace probe: unshare --pid --fork true -> Operation not permitted, exit 1.
These observations suggest a runtime restriction. We cannot determine which policy or syscall is responsible from this evidence alone.
Does Railway support Chromium's sandbox for a non-root Docker service, and can a compatible per-service runtime profile be provided? We need an approach that keeps the browser sandbox enabled without privileged containers, SYS_ADMIN, or seccomp=unconfined. If Railway Sandboxes are the supported alternative, please confirm their Chromium sandbox and production/private-networking support and the required configuration.
Reference: https://playwright.dev/docs/docker
Please provide capability/configuration guidance first; any resource changes require coordination. Service and deployment identifiers can be supplied through an appropriate private channel. This post contains no project IDs, tokens, documents, or logs with credentials.
1 Reply
21 days ago
We haven't verified that Chromium's namespace sandbox can run as a non-root user inside a service container. Your unshare results are consistent with user and PID namespaces not being available to the process, which matches the SandboxDenied you're seeing at browser launch.
Sandboxes are a separate product: isolated Linux VMs you create on demand, run commands in, and destroy. They're available on every plan and can be used in development or production. We haven't verified Chromium's sandbox inside them either.
By default a sandbox is ISOLATED, with outbound internet access only. Creating or forking it with --private-network in the CLI, or networkIsolation: "PRIVATE" in the SDK, puts it on the environment's private network so it can reach services like postgres.railway.internal, and they can reach it.
Idle timeout matters for a long-running worker. On the Free plan a sandbox is destroyed after 5 idle minutes by default, the range is 1 to 5 minutes, and you can't turn the timeout off. Hobby and Pro default to 30 minutes, allow 1 to 120, and can disable it with idleTimeoutMinutes: 0. Running commands or calling sandbox.heartbeat() resets the idle timer. The Sandboxes docs cover networking, timeouts, and limits.
Status changed to Awaiting User Response Railway • 21 days ago
14 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 14 days ago