---
title: "Hugo's There - Flying with Hugo and Caddy"
description: "A new community venture’s website is built with Hugo, served by Caddy, and deployed on Fly, with a custom makeroni.cc domain added after the initial deployment. The process initializes a Fly app on port 80, uses Hugo’s Quickstart and Ananke theme, and employs a multi-stage Docker build based on klakegg/hugo:0.74.0-onbuild, copying generated files into caddy:2.1.1. Caddy serves the static files with file_server while auto_https is disabled because Fly handles certificate management; separate rules serve makeroni.cc and redirect the old fly.dev hostname. DNS A and AAAA records connect the domain to Fly, and flyctl certs create requests a Let’s Encrypt certificate through DNS validation, leaving the site ready to serve securely after redeployment."
---

# Hugo's There - Flying with Hugo and Caddy

[Fly.io](https://yomu.fyi/company/fly-io) · Jul 21, 2020

**Type:** Tutorial

## Summary

A new community venture’s website is built with Hugo, served by Caddy, and deployed on Fly, with a custom makeroni.cc domain added after the initial deployment. The process initializes a Fly app on port 80, uses Hugo’s Quickstart and Ananke theme, and employs a multi-stage Docker build based on klakegg/hugo:0.74.0-onbuild, copying generated files into caddy:2.1.1. Caddy serves the static files with file\_server while auto\_https is disabled because Fly handles certificate management; separate rules serve makeroni.cc and redirect the old fly.dev hostname. DNS A and AAAA records connect the domain to Fly, and flyctl certs create requests a Let’s Encrypt certificate through DNS validation, leaving the site ready to serve securely after redeployment.

## Context

The author needed a website for a new community venture and chose Hugo and Caddy as compact, powerful Go-based tools, hosted on Fly. The deployment initially used a Fly-provided hostname before adding the custom makeroni.cc domain.

## Approach / What changed

A multi-stage Docker build generates the static site with klakegg/hugo:0.74.0-onbuild, copies the output into caddy:2.1.1, and installs a Caddyfile. Fly handles TLS certificates, while DNS A and AAAA records, flyctl certs create, and Caddy host rules configure the custom domain and redirect the original hostname.

## Takeaways

- The Hugo build stage deposits generated files in /target, which the final Caddy image copies into /usr/share/caddy.
- Caddy’s auto\_https is disabled because Fly manages certificate handling; Caddy serves the site over HTTP behind Fly’s encrypted network.
- The custom domain requires both an A record for Fly’s IPv4 address and an AAAA record for its IPv6 address before requesting a Let’s Encrypt certificate.

**Tags:** [Caddy](https://yomu.fyi/topic/caddy), [Docker](https://yomu.fyi/topic/docker), [Fly](https://yomu.fyi/topic/fly), [Hugo](https://yomu.fyi/topic/hugo)

- Source: [Fly.io](https://fly.io/blog/hugo-s-there-flying-with-hugo-and-caddy)
- Source URL: https://fly.io/blog/hugo-s-there-flying-with-hugo-and-caddy
- Ingested by Yomu: 2026-09-02T11:59:41.730Z

[Read original post](https://fly.io/blog/hugo-s-there-flying-with-hugo-and-caddy)
