TFGrid Nextcloud Guide¶
Nextcloud All-in-One cloud platform on ThreeFold Grid.
Overview¶
Deploy a complete Nextcloud instance with automatic management, built-in backups, and enterprise features.
Key Features:
- π File Sync & Share - Access files from anywhere
- π Calendar & Contacts - Integrated productivity apps
- π₯ Talk - Video calls and chat
- π Office - Collaborative document editing
- π End-to-end Encryption - Optional E2EE for sensitive files
- πΎ BorgBackup - Automatic encrypted backups
Quick Start¶
Prerequisites¶
- TFGrid account with mnemonic configured
tfgrid-composeinstalled (Installation Guide)- Domain with DNS pointing to your server
Deploy¶
# Deploy from registry
tfgrid-compose up tfgrid-nextcloud
# Or with custom configuration
tfgrid-compose up tfgrid-nextcloud --var DOMAIN=cloud.example.com
Complete Setup¶
After deployment:
- Open AIO Interface:
https://<server-ip>:8443 - Enter your domain in the setup wizard
- Set admin password
- Configure optional features (Talk, Office, etc.)
- Click "Start containers"
- Access Nextcloud:
https://your-domain.com
Configuration¶
Environment Variables¶
| Variable | Required | Default | Description |
|---|---|---|---|
DOMAIN |
Yes | - | Public domain for Nextcloud |
NEXTCLOUD_DATADIR |
No | Docker volume | Custom data directory |
NEXTCLOUD_UPLOAD_LIMIT |
No | 10G | Maximum upload size |
NEXTCLOUD_MEMORY_LIMIT |
No | 512M | PHP memory limit |
NEXTCLOUD_TIMEZONE |
No | UTC | Server timezone |
Example Configuration¶
DOMAIN=cloud.example.com
NEXTCLOUD_UPLOAD_LIMIT=10G
NEXTCLOUD_MEMORY_LIMIT=1024M
NEXTCLOUD_TIMEZONE=America/New_York
Architecture¶
βββββββββββββββ βββββββββββββββββββββββββββββββββββββ
β Internet ββββββΆβ Nextcloud AIO β
β β β (Apache + Let's Encrypt) β
βββββββββββββββ βββββββββββββββββ¬ββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
β β β
βββββββΌββββββ βββββββΌββββββ βββββββΌββββββ
β Nextcloud β β PostgreSQLβ β Redis β
β App β β Database β β Cache β
βββββββββββββ βββββββββββββ βββββββββββββ
Components (managed by AIO):
- Apache - Web server with SSL
- Nextcloud - Main application
- PostgreSQL - Database
- Redis - Caching
- Collabora/OnlyOffice - Document editing (optional)
- Talk - Video conferencing (optional)
- Imaginary - Image processing (optional)
Commands¶
Backup & Restore¶
# Trigger AIO backup
tfgrid-compose backup
# Check backup status
tfgrid-compose backup-status
# Show restore instructions
tfgrid-compose restore
Note: Nextcloud AIO uses BorgBackup. Backups are managed through the AIO interface at https://<server-ip>:8443.
Logs¶
# All logs
tfgrid-compose logs
# Specific service
tfgrid-compose logs mastercontainer
tfgrid-compose logs nextcloud
tfgrid-compose logs database
tfgrid-compose logs redis
tfgrid-compose logs apache
# Follow logs
tfgrid-compose logs nextcloud --follow
Management¶
# Run Nextcloud occ commands
tfgrid-compose occ status
tfgrid-compose occ user:list
tfgrid-compose occ files:scan --all
tfgrid-compose occ maintenance:mode --on
# Check for updates
tfgrid-compose update
# Restart services
tfgrid-compose restart
# Health check
tfgrid-compose healthcheck
Resource Requirements¶
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4 cores |
| Memory | 4 GB | 8 GB |
| Disk | 50 GB | 200 GB |
Estimated Cost: $30-50/month on ThreeFold Grid
AIO Interface¶
The All-in-One interface (https://<server-ip>:8443) provides:
- Container Management - Start/stop/restart containers
- Backup Configuration - Set up automated backups
- Update Management - Check and apply updates
- Optional Features - Enable/disable apps
- Domain Configuration - Change domain settings
Accessing AIO Interface¶
- Open
https://<server-ip>:8443in your browser - Accept the self-signed certificate warning
- Use the password shown during initial setup
Backup System¶
BorgBackup Features¶
- Deduplication - Only stores changes, saves space
- Encryption - All backups are encrypted
- Compression - Reduces backup size
- Remote Support - Backup to external storage
Configure Backups¶
- Open AIO interface
- Go to "Backup and restore"
- Set backup location (local or remote)
- Configure backup schedule
- Set retention policy
Restore from Backup¶
- Stop all Nextcloud containers
- Open AIO interface
- Go to "Backup and restore"
- Select backup to restore
- Click "Restore"
- Wait for completion
- Restart containers
SSL Configuration¶
Automatic SSL (Default)¶
Nextcloud AIO handles SSL automatically using Let's Encrypt.
Requirements¶
- Domain DNS must point to server IP
- Ports 80 and 443 must be accessible
- Valid domain name (not IP address)
Behind Reverse Proxy¶
If running behind another reverse proxy, configure AIO:
- Set
APACHE_PORTandAPACHE_IP_BINDINGenvironment variables - Configure your reverse proxy to forward to AIO
Optional Features¶
Enable these in the AIO interface:
| Feature | Description | Resources |
|---|---|---|
| Collabora | Document editing | +2GB RAM |
| OnlyOffice | Alternative office suite | +2GB RAM |
| Talk | Video conferencing | +1GB RAM |
| Imaginary | Image processing | +512MB RAM |
| Fulltextsearch | Full-text search | +1GB RAM |
| ClamAV | Antivirus scanning | +1GB RAM |
Troubleshooting¶
Common Issues¶
AIO interface not accessible
- Check Docker is running:
- Check mastercontainer is running:
- Ensure port 8443 is open
SSL certificate errors
- Verify domain DNS:
- Check AIO logs:
- Ensure ports 80/443 are accessible
Slow performance
- Enable Redis caching (enabled by default)
- Increase PHP memory limit:
- Check available resources:
File upload fails
- Check upload limit:
- Increase limit in
.env:
Health Check¶
Checks: - Docker service - Mastercontainer status - Nextcloud container status - Database and Redis - HTTP response
Mobile & Desktop Apps¶
Desktop Sync Client¶
Download from: https://nextcloud.com/install/#install-clients
Configure:
1. Server address: https://your-domain.com
2. Login with your credentials
3. Select folders to sync
Mobile Apps¶
- iOS: App Store - "Nextcloud"
- Android: Play Store or F-Droid - "Nextcloud"
Security Best Practices¶
- Use strong admin password
- Enable 2FA - Settings β Security β Two-Factor Authentication
- Regular backups - Configure automated daily backups
- Keep updated - Apply updates promptly via AIO
- Review sharing - Audit shared files/folders regularly
- Enable encryption - For sensitive data
Migration¶
From Existing Nextcloud¶
- Export data using Nextcloud's migration tools
- Deploy TFGrid Nextcloud
- Import data via AIO restore or manual migration
To Another Server¶
- Create backup via AIO interface
- Deploy TFGrid Nextcloud on new server
- Restore backup on new server
Related Documentation¶
TFGrid Studio Ecosystem
Integrated tools and resources