Internal Webserver with Caddy as a Reverse Proxy (Linux) - webbukkit/dynmap GitHub Wiki

You can use Caddy as a reverse proxy so that you can access the Dynmap page using your own domain name with HTTPS. Reasons to use Caddy are that it will setup the TLS certificate for HTTPS automatically and you do not have to setup or change the configuration for both Dynmap and Caddy for the reverse proxy. You can just run a single command to start the reverse proxy.

  1. Install Caddy at https://caddyserver.com/ using the instructions for your operating system on the same machine you are running Dynmap on.
  2. Ensure that you have set everything up after following this guide and can access your Dynmap webpage at your ip in the browser. e.g. 101.132.163.194:8123
  3. Open/portforward ports 80 and 443 in the same manner that you opened port 8123.
  4. Test that Caddy is installed properly and working by running sudo systemctl start caddy in terminal. If it works, you will be able to access the Caddy default webpage by just writing your IP into the browser without specifying a port. e.g. 101.132.163.194
  5. Run sudo systemctl stop caddy to stop the Caddy service.
  6. You can now run sudo caddy reverse-proxy --from YOURDOMAIN.COM --to :8123, and confirm that the reverse proxy is working by entering your domain name in the browser and being able to connect to the Dynmap webpage. Note: This is a blocking command so make sure you run it in a different screen/tmux/etc session