Easy HTTPS Proxy Using Caddy on DigitalOcean.
The setup need DigitalOcean account and Domain on DigitalOcean’s nameserver. Otherwise, it’d need a different step to complete.
If you need a good HTTPS proxies that come with auto Let’s Encrypt certificates and already a user of DigitalOcean. Here I’ve got an easy but solid way to deploy one. Already using this on a production servers with no problem so far.
Caddy server is already the easiest server that you can install on Linux. But I decided to use docker with it because it’s easier for me to control volume and settings.
From beginning to deploy.
- Setup domain to use DigitalOcean’s nameserver.
- Create droplet using pre-defined
docker
droplet. - Add
A
orCNAME
that point domain to droplet’s IP address. SSH
into droplet and create directorycaddy
in home directory.- Enable
ufw
port443
. - Create DigitalOcean auth token and keep it close.
- Create
Caddyfile
in home directory. - Create
docker-compose.yml
in home directory. - From home directory, use command
docker-compose up -d
- Caddy’s online. That’s it. No more hassle.
Where to go from here
See official documentation of Caddy. There’s a lot of features that can be easily setup using simple directives.