Hey everyone! I'm in the process of setting up a Nextcloud instance to store my files and share them with friends, but I want to make sure my homelab is secure first. I've come across various guides that mention closing ports and changing them from 443 to things like 8443, but I'm a bit confused about accessing the Docker configuration for my services. Do I need to pull the image and redeploy it every time I want to make changes, or is there a simpler method?
3 Answers
To clarify, ‘hosting dockers’ isn’t quite right. It’s about running containers that are created from images. So when you say ‘hosting containers,’ that's the accurate terminology. Make sure you’re using that when discussing.
If you're using the official all-in-one Nextcloud container, switching ports is usually for running multiple services on the default ports (80 and 443). This is often done using a reverse proxy setup. Basically, you would let your internet traffic go to ports 443/80, then have those point to your reverse proxy (like port 8443 for Nextcloud). Check out this [guide](https://nextcloud.com/blog/how-to-install-the-nextcloud-all-in-one-on-linux/) for details.
When it comes to editing your configuration, if you're using Docker Compose, just modify the `docker-compose.yml` file. This way, you won’t need to pull the image every time; just run `docker-compose up -d` to apply any changes you make. I also recommend setting up a reverse proxy like Traefik or Nginx for better port management and security. Here’s a handy [guide](https://www.techrepublic.com/article/how-to-set-up-traefik-as-a-reverse-proxy-for-docker-containers/) to get started with that.

Related Questions
How To Get Your Domain Unblocked From Facebook
How To Find A String In a Directory of Files Using Linux