[Solved]How to use https instead of http

Hi everybody again with my stupid questions :wink:
I’ve installed dietpi on a raspberry zero w to use it as a personal cloud with Owncloud.
At the moment wherever I reach the cloud, I’m using Http. How can I connect to it using https? Which configuration should I manage to change this protocol?

probably this could help https://dietpi.com/forum/t/how-can-i-secure-connection-to-nextcloud/3820/4

The part for DDNS (No-IP) did not fit anymore but for the rest it should be fine.

Should I start from point 10?

Probably point 5 to start with

starting from point 5 means installing Nextcloud. Is this something similar to Owncloud?

Skip point 7.

Nextcloud is a fork of Owncloud.

Personally I prefer it, but YMMV.

Again I think I have some problem with my router…
I can’t find where to manage point 6. Or I can’t figure out it, at least :open_mouth:
In the Internet section, there is a port management section but it gives me only the possibility to add some devices with TCP or UDP protocol.
This is the only thing I found that speaks about port…

yes you would need to add port 80/443 TCP to be forwarded to your device. Maybe you need to ask on a Vodafon forum how to manage.

Do you think I can reach my router also from outside my network?
How? I’m on holidays but would like to work on it.

I don’t think this is possible if you did not configured a remote solution already.

I reach the router through anydesk from my Ubuntu desktop I have at home, using the local browser :slight_smile:
In the end, was easier than I thought. On the router’s internet page there is port management and there I added the two ports needed.
Again Excellent support :slight_smile:
Now I can reach owncloud from HTTPS
Thanks again to everybody

good morning everybody,
again I’m re-opening this topic because after a completely new dietpi installation, I’m not able to use https to connect to it.
On the router, I forwarded the port 80 and 443, but still remain on HTTP.
Please keep in mind I’ve installed also pihole to manage the DHCP in order to use my own ddns. I don’t know if this affects also the port forwarding.

Forwarding ports has nothing to do with using PiHole or DNS.

Did you created your SSL certificates already? Means, you activated HTTPS on the web server?

No, i don’t. But following this topic I didn’t find how to do it, and honestly I don’t remember to have activated it some how the previous time.
How can I check it?

you can use dietpi-letsencrypt

https://dietpi.com/docs/dietpi_tools/#dietpi-letsencrypt

can I try even if I’m fixing the owncloud issue? or is it better to fix it before and then launch this installation?

usually this should be independent from each other

Which domain should I use in the configuration screen?
I tried with my no-ip ddns domain but it doesn’t work…

Running Certbot

[  OK  ] DietPi-LetsEncrypt | Lighttpd webserver detected
[  OK  ] DietPi-LetsEncrypt | systemctl start lighttpd
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Account registered.
Requesting a certificate for mydomain.ddns.net
Performing the following challenges:
http-01 challenge for mydomain.ddns.net
Using the webroot path /var/www for all unmatched domains.
Waiting for verification...
Challenge failed for domain mydomain.ddns.net
http-01 challenge for mydomain.ddns.net
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: mydomain.ddns.net
   Type:   connection
   Detail: Fetching
   http://mydomain.ddns.net/.well-known/acme-challenge/tYYM3AzROsPoaO-42XkFXD0fFQCR2WVGVjpxh84vEbA:
   Timeout during connect (likely firewall problem)

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address. Additionally, please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin, you should also verify
   that you are serving files from the webroot path you provided.
[FAILED] DietPi-LetsEncrypt | Certbot failed, please check its above terminal output. Aborting...

Press any key to return to the DietPi-LetsEncrypt menu ...

it should be your DDNS domain. You need to ensure DDNS is up to date, pointing to your externe IP address. Because Certbot will do a test to resolve your DDNS and try to connect on port 80 from external. This is done to verify your DDNS exist and is pointing to correct system.