How to change the port Nextcloud listens on?

Nextcloud version (eg, 18.0.2): 19.0.1snap2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.4.1
Apache or nginx version (eg, Apache 2.4.25): N/A
PHP version (eg, 7.1): N/A

The issue you are facing:
I want to change the port Nextcloud listens on from the defaults(80 and 443), as I have a Caddy reverse proxy listening on those. I also have a media server which is forwarded through this reverse proxy. I just need a way to make Nextcloud listen on a port defined by me

You can change port to any via command. Check this out:

That did it, thank you!

Was trying to look for an article about changing ports this whole time :sweat_smile:

1 Like