How can I secure connection to nextcloud?

  1. create a clean DietPi installation and complete initial setup
  2. first you would need to have a DynDNS service that allow you to connect from outside world to your home network by using a dynamic domain name. If you already have a DDNS service, you can go to point 5
  3. to get a DDNS domain, you would need to register at https://www.noip.com/ first
  4. if you finished registration process, we can go to install No-IP software on your DietPi device
  • run dietpi-config
    • go to option 8 : Network Options: Misc
    • select No-IP
    • confirm installation
    • once installation of No-IP software is done, select No-IP again
    • enter your login credentials for No-IP
  1. if DDNS is working, continue with next step
  2. ensure Port 80 and 443 are forwarded (from your internet router) correctly to your DietPi device
  3. once ready, run dietpi-software, search and install NextCloud
  4. once installation completed and your system was rebooted, try to connect to your Webserver on http (port 80)
  5. pls try to connect from your LAN as well as from Internet, you should receive the Webserver Default Page
  • once you’re able to connect to your Webserver from Internet on http (80), got to point 10. (https - port 443 will not work at this stage)
    • if you are not able to connect on http (80) from internet, you would need to check why and what’s wrong with your port forwarding
  1. let’s do the SSL certificate now, run dietpi-letsencrypt
  2. install CertBot
  3. once done you will be ask for your Let’sEncrypt information
  • fill in your domain name (No-IP DDNS)
    • fill in your email address
    • set Redirect to ON
    • Apply the setting
  1. once finished (and all services started) you should be able to reach your website on http (80) as well as https (443)
  2. if you are opening the website on http (80) you should be automatically redirected to https (443)
1 Like