Skip to content

Persistent 2FA/SMTP Failure on Self-Hosted Docker Install (v5.4.14) #22365

@Edwardlee5555

Description

@Edwardlee5555

Found a bug? Please fill out the sections below. 👍

Issue Summary

On a fresh, self-hosted installation of Cal.com v5.4.14, core features that rely on email (Password Reset) or cryptography (2FA Setup) are failing, despite the application container starting successfully and reporting a ✓ Ready state. The "Forgot Password" feature fails to send an email, and enabling 2FA results in a "Something went wrong" error.

This occurs on a new 2GB RAM server with a clean configuration that has been meticulously checked. The root cause has been isolated to the Docker container being unable to make outbound network connections on port 587 (for SMTP), even though the host server can connect without issue. This points to a fundamental networking issue between the Docker container and the host system that persists despite applying all standard firewall and Docker networking fixes.

Steps to Reproduce

  1. Provision a new Ubuntu 22.04 server (2GB RAM).

  2. Install Docker, Docker Compose, and Caddy.

  3. Configure ufw, allowing ports 80, 443, and 22. Set DEFAULT_FORWARD_POLICY="ACCEPT" and add the standard Docker override rules to /etc/ufw/before.rules.

  4. Deploy Cal.com v5.4.14 and Postgres using a standard docker-compose.yml file.

  5. Configure all required environment variables, including valid SMTP credentials using Zoho Mail and an App-Specific Password.

  6. Run docker compose up -d. The containers start successfully.

  7. Create the initial admin user.

  8. Attempt to use the "Forgot Password?" feature on the login page.

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

Actual Results

  • The password reset email is never sent.

  • The Cal.com application log shows a SEND_PASSWORD_RESET_EMAIL_ERROR Error: Connection timeout with code ETIMEDOUT.

  • A telnet smtp.zoho.com 587 command executed from inside the calcom_web container hangs at Trying... and eventually times out.

Expected Results

  • The password reset email should be successfully sent via the configured Zoho SMTP server.

  • The Docker container should have outbound network access on port 587, allowing it to connect to the SMTP server.

Technical details

  • Cal.com Version: v5.4.14

  • Database: postgres:14

  • OS: Ubuntu 22.04 on DigitalOcean (2GB RAM)

  • Reverse Proxy: Caddy

  • Key Log Error: SEND_PASSWORD_RESET_EMAIL_ERROR Error: Connection timeout { code: 'ETIMEDOUT', command: 'CONN' }

Evidence

Testing Method: The issue was reproduced consistently on a fresh server build where every component (firewall, Docker, Caddy, Cal.com config) was set up step-by-step. The final diagnosis was confirmed by using docker exec to get a shell inside the running calcom_web container and running telnet smtp.zoho.com 587, which proved the container itself was blocked from making the connection, while the host server was not. This isolates the problem to the container's networking layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Low priorityCreated by Linear-GitHub Syncemailsarea: emails, cancellation email, reschedule email, inbox, spam folder, not getting emailself-hosting🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions