Prerequisites
sudo apt install -y openssh-server net-tools
Install
sudo snap install nextcloud
Configure
sudo nextcloud.manual-install <username> <password>
Set Trusted Domain
set it to the hostname that your server is at, or the ip it is at
sudo nextcloud.occ config:system:set trusted_domains 1 --value=<example.com>
sudo nextcloud.occ config:system:set trusted_domains 1 --value=192.168.0.219
certificate
open up some ports
sudo ufw allow 22
sudo ufw allow 80,443/tcp
sudo ufw enable
select which encryption method
sudo nextcloud.enable-https lets-encrypt
sudo nextcloud.enable-https self-signed
Go to the website, sign on as admin, and continue configuring.
Hard to backup and manage files because snap data is stored in root.
Workaround: