---
title: "Discussion on \"Fix Caddy 502 Bad Gateway and HTTPS errors with Docker\" | Hashnode"
description: "Discussion on \"Fix Caddy 502 Bad Gateway and HTTPS errors with Docker\". When Caddy runs inside Docker on a VPS and returns 502 Bad Gateway or fails to issue an HTTPS certificate, the root cause is rarely Caddy itself: in Caddy's reverse_proxy (v2.11), any failure dialing"
url: "https://hashnode.com/posts/fix-caddy-502-bad-gateway-and-https-errors-with-docker/6b0d51769ed495fbb1bbbc2d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Fix Caddy 502 Bad Gateway and HTTPS errors with Docker](https://nuvits.hashnode.dev/fix-caddy-502-bad-gateway-and-https-errors-with-docker?utm_source=hashnode&utm_medium=feed)

When Caddy runs inside Docker on a VPS and returns 502 Bad Gateway or fails to issue an HTTPS certificate, the root cause is rarely Caddy itself: in Caddy's reverse\_proxy (v2.11), any failure dialing

32m ago · 7 min read · nuvits.hashnode.dev  
Read the article

-   [#caddy](https://hashnode.com/tag/caddy)
-   [#docker](https://hashnode.com/tag/docker)
-   [#devops](https://hashnode.com/tag/devops)
-   [#vps](https://hashnode.com/tag/vps)

## Written by

[Fernando Chagas](https://hashnode.com/@fernandochagas)

@fernandochagas

  
[View profile](https://hashnode.com/@fernandochagas)

Building Nuvits: VPS in Brazilian reais and MCP for AI agents

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
