– Install Nextcloud
sudo snap install nextcloud
– Make admin account
sudo nextcloud.manual-install ADMINUSER PASSWORD
– Add Trusted Domains
sudo nextcloud.occ config:system:set trusted_domains 1 –value=YOUR.DOMAIN.HERE
– Open firewall ports in /etc/iptables/rules.v4 add two lines below:
sudo iptables -I INPUT -p tcp -m tcp –dport 443 -j ACCEPT
sudo iptables -I INPUT -p tcp -m tcp –dport 80 -j ACCEPT
– Reload iptables running config
iptables-restore ‘<’ /etc/iptables/rules.v4
– Set SSL
sudo nextcloud.enable-https lets-encrypt
– To renew SSL
sudo snap refresh
實作使用Ubuntu 22.04.1
- 安裝時sanp 出現proxy 錯誤, 隔天再用就好了, 可能當時伺服器在維護
- iptable 無法寫入參數檔案. 跳過不設定
參考資料
https://www.youtube.com/watch?v=5fJb0gKzNgE&ab_channel=TechTutelage