5 days ago
Hi Railway Support,
I'm reporting a critical issue with the Mercury Railway template (repo: 4bade3/mercury-railway).
Problem: The Mercury template deploys successfully but the daemon process runs in the background with no way to monitor or debug it. The container starts, Mercury initializes, but then the process backgrounds itself and becomes inaccessible.
Root Cause: The Dockerfile uses CMD ["mercury", "start"] which backgrounds the Mercury daemon. This breaks Railway's ability to:
Keep the container alive (the main process exits after backgrounding)
Stream logs from the daemon
Monitor the service health
What I've Tried:
Deploying with no custom startCommand (uses default Dockerfile CMD)
Custom startCommand to tail daemon logs
Multiple redeployments
Current State:
Service ID: 799432c1-f8bd-404b-9fde-b1919fd33768
Container starts but Mercury daemon logs are at /root/.mercury/daemon.log (inaccessible)
No Telegram responses received despite correct configuration
Cannot debug because daemon output is not visible
What Needs to Happen: The template needs to be fixed to run Mercury in foreground mode or tail the daemon logs so the container stays alive and logs are visible. The Dockerfile CMD should be changed from ["mercury", "start"] to something that keeps the process in the foreground.
Please advise on next steps or fix the template.
3 Replies
5 days ago
Hi there,
Confirmed and fixed on the template.
Root cause: in recent Mercury versions (the CLI now defaults to daemon mode), mercury start forks a detached child that writes to ~/.mercury/daemon.log and immediately exits the parent, so Railway sees PID 1 die and never gets the daemon’s stdout.
Please make sure to make a fresh deployment from the template latest version. Also clear any custom start commands.
Status changed to Awaiting User Response Railway • 5 days ago
Status changed to Solved saudident • 5 days ago
5 days ago
Perfect. Deployment went smooth. But now, Telegram bot can't read or response to any type of attachments. Hot to fix it pls
Status changed to Solved 4bade3 • 4 days ago
Status changed to Awaiting Template Creator Response 4bade3 • 4 days ago
saudident
Perfect. Deployment went smooth. But now, Telegram bot can't read or response to any type of attachments. Hot to fix it pls
4 days ago
I believe this is something that need to be fixed with the mercury codebase itself and out of scope of this template. Will mark this as solved. If any issues related to the railway side of things or the template, feel free to open another ticket ❤️
Status changed to Awaiting User Response Railway • 4 days ago
Status changed to Solved 4bade3 • 4 days ago
