Nextcloud Installation
Brief description: Install Nextcloud on VM-102 using Snap and configure for reverse proxy.
What You'll Learn
- How to install Nextcloud via Snap
- How to configure trusted domains and proxies
- How to verify the installation
Prerequisites
- [ ] VM-102 created with Ubuntu 24.04 LTS
- [ ] Nextcloud snap selected during Ubuntu installation (or install manually below)
- [ ] IP address: 192.168.192.102
- [ ] Nginx Proxy VM (192.168.192.20) installed
- [ ] Domain: cloud.yourdomain.com
Estimated Time
30-45 minutes
Snap Already Installed
If you selected Nextcloud during Ubuntu installation, the snap is already installed. Skip Steps 2-4 if already done.
Step-by-Step Instructions
Step 1: SSH to Nextcloud VM
Step 2: Update System
Step 3: Install Snap (if needed)
Verify:
Step 4: Install Nextcloud
This will take 10-15 minutes. Monitor progress:
Wait until status shows "Done".
Step 5: Create Admin Account
Replace <strong-password> with a secure password.
Step 6: Configure for Reverse Proxy
Configure trusted domains and trusted proxies:
# Add your domain
sudo nextcloud.occ config:system:set trusted_domains 1 --value=cloud.yourdomain.com
# Add nginx-proxy IP as trusted proxy
sudo nextcloud.occ config:system:set trusted_proxies 0 --value=192.168.192.20
# Set URL overwrite
sudo nextcloud.occ config:system:set overwrite.cli.url --value=https://cloud.yourdomain.com/
# Set protocol overwrite
sudo nextcloud.occ config:system:set overwriteprotocol --value=https
Restart Nextcloud:
Verify configuration:
sudo nextcloud.occ config:system:get trusted_domains
sudo nextcloud.occ config:system:get trusted_proxies
Step 7: Verify Installation
Check Nextcloud status:
Expected output:
Step 8: Configure Background Jobs
Set cron for background tasks:
Add cron job:
Step 9: Configure Memory Caching
Enable APCu for better performance:
Step 10: Adjust PHP Memory Limit
Step 11: Test Access
After configuring Nginx reverse proxy:
-
Open browser:
https://cloud.yourdomain.com -
Login with:
- Username: admin
-
Password: [password you set in Step 5]
-
You should see the Nextcloud dashboard
Verification
- [ ] Nextcloud snap installed
- [ ] Admin account created
- [ ] Trusted domains configured
- [ ] Trusted proxies configured (nginx-proxy IP)
- [ ] SSL certificates obtained
- [ ] Access via domain working
(End of file