Docker blocking smtp email sender
quidhive
PROOP

19 days ago

Hello, We nned to deploy a program with docker on railway, however, the docker is blocking smtp emails from sending. This same setup works when we use Railpack

Solved$20 Bounty

5 Replies

Railway
BOT

19 days ago

This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.

Status changed to Open Railway 19 days ago


roralsorom
FREE

18 days ago

If Railpack works but Docker doesn't it's usually a missing CA-Certificate bundle in your Docker base image. Add RUN apt-get update && apt-get install -y ca-certificates to your Dockerfile. Also ensure you aren't using Port 25, as Railway blocks it. Use Port 587 with TLS. If you're using a slim image it might be missing the library for secure handshakes. Hope this helps!


quidhive
PROOP

18 days ago

Thanks for the quick response, the reason I am trying to use docker is that I’m running a Go service that generates PDFs from HTML using headless Chrome.

I’m getting this error in Railpack:

exec: "google-chrome": executable file not found in $PATH

Can you confirm:

Is Google Chrome or Chromium installed in the Railpack runtime by default?

If yes, what is the correct executable path? (e.g. /usr/bin/google-chrome, /usr/bin/chromium, etc.)

If not, is there a supported way to install Chromium or enable it in Railpack builds?

Does Railpack support headless Chrome/Puppeteer/chromedp use cases officially?

I need a stable headless Chrome binary for HTML → PDF generation.


quidhive
PROOP

18 days ago

I added diagnostics to detect Chrome, and the runtime reports:

CHROME_BIN: <not set>
Missing: /usr/bin/chromium
Missing: /usr/bin/chromium-browser
Missing: /usr/bin/google-chrome
PATH chromium: not found
PATH google-chrome: not found

This indicates there is no Chrome/Chromium binary available in the Railpack runtime.

Does Railpack support installing or bundling Chromium for headless browser use cases (such as HTML-to-PDF with chromedp), or is Docker the recommended deployment method for applications that require Chromium?


jakemerson
HOBBY

18 days ago

To fix your original Docker SMTP issue so you can stick to the Docker setup:

The issue isn't Docker intentionally blocking the email, but likely missing SSL/TLS certificates in your container image, combined with Railway's port restrictions.

Port Check: Ensure your Go SMTP client is connecting over Port 587 (with STARTTLS) or Port 465 (Implicit SSL). Railway strictly blocks Port 25 across the platform.

Missing Certificates: If you are using a minimal Docker image (like alpine or scratch) for your Go binary, it lacks the Root CAs required to securely handshake with the SMTP server. The connection will fail or drop.

Add the appropriate command to your Dockerfile to install them:

If using a Debian/Ubuntu base:

RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates

If using an Alpine base:

RUN apk --no-cache add ca-certificates


quidhive
PROOP

18 days ago

Hello Thank you for your help. My issue was actually that I am not pointing docker rightly to the email templates.

Thank you very much.


Status changed to Solved brody 18 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...