April 23, 2025

What is a Reverse Proxy and How Can You Set It Up?

mr rockstar

What is a Reverse Proxy and How Can You Set It Up
Cheap Dedicated Server

🔄 What is a Reverse Proxy and How Can You Set It Up?

When managing web applications, especially self-hosted services like Nextcloud or home servers, you may come across the term reverse proxy. But what does it mean, and why is it useful?

Let’s break it down in a simple, no-jargon way.


🤔 What is a Reverse Proxy?

A reverse proxy is a server that sits between the internet and your web applications. Instead of clients (like browsers) connecting directly to your app, they connect to the reverse proxy. The proxy then forwards the request to your app, gets the response, and sends it back to the client.

Think of it like a doorman for your web services — it handles the traffic, directs requests, and adds a layer of security and flexibility.


✅ Why Use a Reverse Proxy?

Here are a few big reasons:

  • Security: Hide the actual server behind a single public-facing endpoint.
  • SSL/TLS Management: Easily manage HTTPS certificates (like with Caddy or NGINX Proxy Manager).
  • Port Forwarding Simplified: Expose multiple services under different subdomains without messing with different ports.
  • Load Balancing: Distribute traffic among multiple servers or containers.

🛠️ How to Set Up a Reverse Proxy

Here are 3 common ways to set it up:

1. NGINX (Manual Setup)

  • Install NGINX on your server.
  • Configure a virtual host with a reverse proxy block:
server {
  listen 80;
  server_name yourdomain.com;

  location / {
    proxy_pass http://localhost:8080;  # Your app's internal port
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
  }
}
  • Reload NGINX with sudo systemctl reload nginx.

     NGINX (Manual Setup)

2. NGINX Proxy Manager (GUI-Based)

  • Run via Docker.
  • Access a friendly dashboard.
  • Add proxy hosts with custom domains and SSL certificates via Let’s Encrypt in a few clicks.

3. Caddy (Simple + HTTPS by Default)

  • One of the easiest options.
  • Example Caddyfile:
yourdomain.com {
  reverse_proxy localhost:8080
}
  • It handles HTTPS automatically with Let’s Encrypt.

  • Caddy (Simple + HTTPS by Default)

 

What is a Reverse Proxy and How Can You Set It Up? (F.A.Q)

Is a reverse proxy the same as a regular proxy?

No. A forward proxy acts on behalf of the client, while a reverse proxy acts on behalf of the server.

Do I need a domain name to use a reverse proxy?

Yes! Access everything remotely with Synology QuickConnect or set up your own secure domain.

Can I run multiple services behind one IP with a reverse proxy?

Yes! That’s one of its main advantages. You can use subdomains like nextcloud.mydomain.com, plex.mydomain.com, etc.

 

Is HTTPS mandatory with reverse proxies?

Not mandatory, but strongly recommended. Tools like Caddy or NGINX Proxy Manager make it easy to get free SSL certificates.

Popular Blog Posts