The idea here is to use snap to install nextcloud.
If you have ubuntu server , great because snap is already pre installed but if you are not, then you need to install it. So for this tutorial we're going to go with Debian 10+ servers:
su -
apt update -y
apt install snapd sudo ufw -y
/sbin/usermod -aG sudo [NAME OF THE NON-PRIVILEGED USER]
/sbin/ufw enable
/sbin/ufw allow 22
/sbin/ufw allow 80
/sbin/ufw allow 443
/sbin/ufw allow ssh
/sbin/ufw allow http
/sbin/ufw allow https
sudo snap install core
exit
sudo reboot now
Using snap, installing nextcloud is fairly simple:
su -
snap install nextcloud
ip a | grep inet
curl ifconfig.me
you can verify that the nextcloud server works by going at the ip adress of the server http://server_ip/ where you'll create the administrator account.
Once that's done you should have access to your nextcloud instance, but instead of accessing it through the ip address, we'll set it up in such a way that we can access it through a domain name (for example DuckDNS) and with a HTTPS certificate.
Log into DuckDNS and register a domain name pointing to your public ip like so:
Now that we have the domain name pointing to the public ip address of the nextcloud server, we can setup the https certificate using let'sencrypt, just ssh into your server once more and run the following commands:
su -
nextcloud.enable-https lets-encrypt
nextcloud.occ config:system:set trusted_domains 1 --value=yourdomain.duckdns.org
And once that's done, you can access your nextcloud instance from a free domain, which uses a free HTTPS certificate ! at https://yourdomain.duckdns.org/
And that's it! This is a very simple installation of nextcloud, you can use it as a server to host your keepass passwords database for example. To do so, just use the URL feature of keepass, and use the webdav link that points to the kdbx file you uploaded on the nextcloud server.
Some Address 67120,
Duttlenheim, France.
This cute theme was created to showcase your work in a simple way. Use it wisely.