Last active
April 15, 2021 09:00
-
-
Save nealfennimore/c7969039dfc23ad714d98febec9ff204 to your computer and use it in GitHub Desktop.
Nextcloud Snap Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup firewall | |
sudo ufw allow ssh | |
sudo ufw allow http | |
sudo ufw allow https | |
# Install nextcloud | |
sudo snap install nextcloud | |
# Update memory limit | |
sudo snap set nextcloud php.memory-limit=1024M | |
# Go to IP and setup admin account | |
# Add trusted domain name | |
nextcloud.occ config:system:set trusted_domains 2 --value <domain_name_to_add> | |
# Get an HTTPS cert (auto-updates) | |
nextcloud.enable-https lets-encrypt | |
# Enable external file storage | |
nextcloud.occ app:enable files_external | |
# Enable encryption and encrypt files | |
nextcloud.occ app:enable encryption | |
# Log in and log out again to create encryption keys | |
nextcloud.occ encryption:encrypt-all # Have to select yes | |
# Enable U2F 2FA | |
nextcloud.occ app:install twofactor_u2f | |
# Now go to Settings > Personal > Security to setup keys | |
# --- Setup Email --- | |
# If using gmail SMTP with app passwords, still need to allow less secure apps: | |
# - https://myaccount.google.com/apppasswords | |
# - https://myaccount.google.com/lesssecureapps?pli=1 | |
# | |
# Afterwards add an email to your user profile. Go to Settings > Administration > Basic Settings. | |
# | |
# Add in the following information: | |
# SMTP / STARTTLS | |
# Authentication: Plain / Authentication Required: true | |
# Server Address: smtp.googlemail.com / Port: 587 | |
# Email / Generated App Password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment