Setup and install Caddy reverse proxy on Ubuntu 24.04 in Azure, AWS or Google GCP. Caddy Reverse Proxy forwards client requests to backend servers, providing benefits like SSL termination, load balancing, and enhanced security. Designed for flexibility and performance, Caddy automates HTTPS setup, making it ideal for developers and organizations needing a reliable reverse proxy solution. Deploy using our image from any of the cloud marketplaces, links below:
Caddy Reverse Proxy
Azure Caddy Reverse Proxy
Deploy Caddy Reverse Proxy on Ubuntu 24.04 in Azure
AWS Caddy Reverse Proxy
Coming Soon..
GCP Caddy Reverse Proxy
Coming Soon..
Getting Started with Caddy Reverse Proxy
Once your Caddy server has been deployed, the following links explain how to connect to a Linux VM:
Once connected and logged in, the following section explains how to start using Caddy as a reverse proxy.
Here’s a post-deployment guide to configure and use Caddy as a reverse proxy. This setup will guide you through creating a basic Caddy reverse proxy configuration, ensuring security, and testing the setup.
Step 1: Verify Caddy Installation
After deploying Caddy, confirm it’s installed correctly by running:
caddy version
Confirm Caddy is active and running:
sudo systemctl status caddy
Step 2: Set Up the Caddy Configuration File (Caddyfile)
Caddy’s configuration file, called Caddyfile, is where you’ll define your reverse proxy settings.
Locate the Caddyfile:
The default Caddyfile is often located at /etc/caddy/Caddyfile (Linux).
If it’s missing, you can create it in that location.
2. Basic Reverse Proxy Setup:
Open the Caddyfile in a text editor:
sudo nano /etc/caddy/Caddyfile
Define your domain and the target server (replace yourdomain.com and http://localhost:8080 with your actual domain and backend server):
Check Caddy logs (usually found in /var/log/caddy/) to check for any errors.
If you’re having any issues with deployment please contact us for support.
Firewall Ports
For a Caddy reverse proxy setup, these are the primary ports involved:
Port80 (HTTP): Used by Caddy to redirect HTTP requests to HTTPS automatically if HTTPS is enabled. Caddy listens on this port to manage and redirect incoming unsecured HTTP requests.
2. Port 443 (HTTPS): The default port for secure HTTPS traffic, which Caddy uses when it obtains an SSL certificate from Let’s Encrypt. This is where encrypted traffic is served to users.
3. Backend Server Port: The port number of the backend server (e.g., 8080 in the example above). This can be any port on which your backend application (such as a web server) is running. Caddy forwards incoming requests to this backend server port after receiving them on 80 or 443.
The links below explain how to modify / create firewall rules depending on which cloud platform you are using.
Disclaimer: Caddy® is a registered trademark of Light Code Labs, LLC and is licensed under Apache License 2.0 license. The license comes with a “no warranty” clause, meaning the software is provided “as-is” without any guarantees or liability for issues that may arise.
Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud.