-
Notifications
You must be signed in to change notification settings - Fork 0
Configuring Nextcloud
🇫🇷 Cette page est également disponible en français : fr-Configuring-Nextcloud
This page walks you through the initial Nextcloud configuration after deployment, including the setup wizard and key post-installation settings.
- HTTPS is configured and your domain resolves correctly — see HTTPS-TLS-Certificate.
- All four services are running — see Post-Deployment-Verification.
- Open your browser and navigate to
https://cloud.example.com. - The Nextcloud Setup Wizard appears on first access.
Note: If the Setup Wizard does not appear and you see a login page, Nextcloud was pre-configured during deployment. Skip to Step 3.
Fill in the following fields:
| Field | Value |
|---|---|
| Admin username | Choose a secure username (not admin) |
| Admin password | Choose a strong password (≥12 characters) |
The default data folder is /var/nextcloud-data.
If you attached a separate data disk during deployment, change this to the mount point of that disk
(e.g. /mnt/data/nextcloud).
| Field | Value |
|---|---|
| Database type | PostgreSQL |
| Database user |
nextcloud (pre-configured) |
| Database password | See /root/nextcloud-db-password.txt or the deployment output |
| Database name | nextcloud |
| Database host | 127.0.0.1:5432 |
Click Finish setup.
If you prefer to configure Nextcloud without the web wizard, use the occ CLI:
sudo -u www-data php /var/www/nextcloud/occ maintenance:install \
--database "pgsql" \
--database-host "127.0.0.1:5432" \
--database-name "nextcloud" \
--database-user "nextcloud" \
--database-pass "YOUR_DB_PASSWORD" \
--admin-user "YOUR_ADMIN_USER" \
--admin-pass "YOUR_ADMIN_PASSWORD" \
--data-dir "/var/nextcloud-data"Replace
YOUR_DB_PASSWORD,YOUR_ADMIN_USER, andYOUR_ADMIN_PASSWORDwith your actual values.
sudo -u www-data php /var/www/nextcloud/occ config:system:set overwrite.cli.url \
--value="https://cloud.example.com"- In the Nextcloud admin interface, go to Settings > Personal info > Email.
- Under Basic settings, configure your SMTP server.
Redis is pre-configured on this VM. Verify it is active in config.php:
sudo grep -A 10 'memcache' /var/www/nextcloud/config/config.phpExpected entries:
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',Set Nextcloud to use the system cron for background tasks (recommended over the default Ajax):
sudo -u www-data php /var/www/nextcloud/occ background:cronVerify the cron job exists:
sudo crontab -u www-data -lExpected:
*/5 * * * * php /var/www/nextcloud/occ background:job
If the cron entry is missing, add it:
echo "*/5 * * * * php /var/www/nextcloud/occ background:job" | sudo crontab -u www-data -- Log in to Nextcloud at
https://cloud.example.comwith your admin credentials. - Go to Settings > Overview — confirm no warnings are shown (or resolve listed warnings).
- Upload a test file to verify file storage is working.
"Your data directory is invalid" warning
The data directory path in config.php does not exist or has incorrect ownership.
Set correct ownership: sudo chown -R www-data:www-data /var/nextcloud-data
"Maintenance mode is active"
Turn off maintenance mode: sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
Setup Wizard shows database connection error
Verify PostgreSQL is running and the database credentials are correct.
Check PostgreSQL with: sudo -u postgres psql -U nextcloud -d nextcloud -c "\\conninfo"
| Next | Page |
|---|---|
| Explore Nextcloud features | Exploring-Nextcloud |
| Keep Nextcloud up to date | Updating-Nextcloud |
| Manage user accounts | Managing-Users |
Getting Started
Configuration
Administration
Using Nextcloud
Help
Démarrage
Configuration
Administration
Utiliser Nextcloud
Aide