Skip to content

Docs/feature: outbound HTTPS from container fails (Connection reset) – document or support network_mode: host for a service #8528

@mikelito859

Description

@mikelito859

Summary

When deploying apps that download files from external HTTPS URLs from a worker/background process (e.g. Sidekiq downloading WhatsApp media from Meta’s lookaside.fbsbx.com), the download can fail with Connection reset by peer when running inside the default Docker bridge network, while the same request from the host succeeds. This happens on some VPS providers (e.g. Hostinger KVM) and is a known Docker/network behaviour (NAT, IPv6, routing), not an application bug.

Workaround that works: run the affected service (e.g. the worker) with network_mode: host. That requires:

  • Exposing Redis/DB on host ports (e.g. 6389:6379, 5433:5432)
  • Setting that service’s env vars to use 127.0.0.1 and those ports
  • Removing networks: for that service (incompatible with host mode)

Right now this means manually editing the generated docker-compose.yml in the server. Those edits are lost on next deploy because Coolify regenerates the compose.

Suggestion

  1. Documentation: Add a short note in the docs (e.g. “Troubleshooting” or “Docker Compose”) explaining that for apps needing stable outbound HTTPS to certain CDNs from a container, bridge network can fail on some hosts, and that using network_mode: host for the affected service (with Redis/DB on host ports) is a valid workaround.

  2. Optional – UI: For Docker Compose deployments, consider a per-service option like “Network mode: host” so users can enable it without editing the file, and Coolify can regenerate the compose while preserving that setting (and optionally the needed port mappings / env overrides).

This would help anyone deploying Chatwoot (WhatsApp media), or any similar app that downloads from external URLs inside a worker container.

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions