Allow access to higher level port

I’m using caddy to serve static websites and forward /urls to ports. However I want to do something seemingly simple, I want to just open a port to another service.

I’m running a service at https://evbogue.com:8008. Caddy seems to block access to that port.

How do I open the port so that it can be contacted at https://evbogue.com:8008?

Opening ports is a firewall/networking issue. You will need to review the specifics of your server setup, such as your provider (if applicable), OS, and network configuration. If you can provide those, someone here might be able to point you in the right direction.

Caddy itself doesn’t block ports. When it binds to a port, naturally other programs will no longer be able to bind to the same port. However it can bind to any valid port (except for low port numbers when not being run as root) and it can proxy to any valid port.

Also, using Caddy to serve HTTPS over :8008 could be problematic. LetsEncrypt requires your site to be accessible over :80 or :443 for validation purposes, and Caddy’s Automatic HTTPS doesn’t work on sites with non-standard ports specified. You will need to find another method to acquire your certificates and you will need to specify your configuration using the tls directive.

Thanks. I think what I didn’t understand about auto-https is you have to access it via ports 80 and 443, so anything I’m running at other ports won’t be available anymore.

You can configure custom ports to serve on, of course, but Caddy does require 80 and 443 for automatic HTTPS since those are the ports mandated by the ACME protocol. But you can use the DNS challenge to avoid using those ports.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.