# Reverse Proxy using Caddy (with optional automatic TLS)

**URL:** <https://forum.freenas-community.org/t/reverse-proxy-using-caddy-with-optional-automatic-tls/27>\
**Category:** How-to\
**Created:** [August 6, 2019, 3:14pm UTC](https://forum.freenas-community.org/t/reverse-proxy-using-caddy-with-optional-automatic-tls/27 "2019-08-06T15:14:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danb35](https://forum.freenas-community.org/user_avatar/forum.freenas-community.org/danb35/32/14_2.png) [@danb35](https://forum.freenas-community.org/u/danb35)\
**Post date:** [August 6, 2019, 3:14pm UTC](https://forum.freenas-community.org/t/reverse-proxy-using-caddy-with-optional-automatic-tls/27/1 "2019-08-06T15:14:30Z")

</div>

Many users install a variety of web applications in jails on their FreeNAS servers, and often those applications run on non-standard ports like 6789, 8181, 7878, etc. These port numbers are far from intuitive, and the applications often either don’t implement HTTPS at all, or make it difficult to configure. A common recommendation to address these issues is to install a separate web server to act as a reverse proxy (allowing you to browse to simpler URLs like [http://yourserver/radarr](http://yourserver/radarr)), and also to handle the TLS termination. Although popular web servers like [Apache](https://httpd.apache.org/) and [Nginx](https://www.nginx.com/) can act as reverse proxies, configuration is complex, and neither of them handle the TLS certificates and configuration by default. This guide will cover installing [Caddy](https://caddyserver.com/) in its own jail, configuring it to act as a proxy for your other applications, and optionally obtaining TLS certificates from Let’s Encrypt and using them to encrypt your communications.

I’ve prepared a script to create the jail, build Caddy and install it. Find the script and documentation here:

> **[danb35/freenas-iocage-caddy](https://github.com/danb35/freenas-iocage-caddy)**
>
> Script to install Caddy V2 in a FreeNAS jail. Contribute to danb35/freenas-iocage-caddy development by creating an account on GitHub.
