Proxy Digital Ocean Spaces With Caddy

August 06, 2019

An upcoming project had a need to proxy Digital Ocean Spaces (an S3 compatible Object store) in order to serve static websites. It turned out to be relatively simple, so I figured I’d drop it here for future reference.

sudo vim /etc/caddy/Caddyfile

https://proxieds3.livearchivist.com {
  gzip
  proxy / https://livearchivist-s3.nyc3.digitaloceanspaces.com/proxieds3.livearchivist.com/ {
    header_upstream Host livearchivist-s3.nyc3.digitaloceanspaces.com
  }
}

BAM! Easy, proxied Digital Ocean Spaces, with an SSL cert provided by LetsEncrypt.