-
Notifications
You must be signed in to change notification settings - Fork 0
Loading Sample Data
🇫🇷 Cette page est également disponible en français : Loading-Sample-Data-fr
This page explains how to load sample files and data into Nextcloud to explore its features, run demonstrations, or validate your deployment.
- Nextcloud is configured and you can log in as admin — see Configuring-Nextcloud.
- You are connected to the VM via SSH — see SSH-Connection.
The simplest way to add sample content is to upload files directly through the browser:
- Log in to Nextcloud at
https://cloud.example.com. - Click the + button in the Files toolbar.
- Select Upload file and choose files from your local machine.
You can upload any documents, images, or spreadsheets to explore sharing and collaboration features.
If you want to add a larger set of sample files quickly, SSH into the VM and copy files to a user's data directory:
# Replace "admin" with the actual Nextcloud username
NEXTCLOUD_USER="admin"
DATA_DIR="/var/nextcloud-data/${NEXTCLOUD_USER}/files"
# Create a sample directory
sudo mkdir -p "${DATA_DIR}/Sample Documents"
# Copy example files (adjust source path as needed)
sudo cp /usr/share/doc/*/copyright "${DATA_DIR}/Sample Documents/" 2>/dev/null || true
sudo chown -R www-data:www-data "${DATA_DIR}"After copying files, scan them to make Nextcloud aware of them:
sudo -u www-data php /var/www/nextcloud/occ files:scan --user="${NEXTCLOUD_USER}"For a demonstration environment, you can create multiple test users with sample data:
# Create a test user
sudo -u www-data php /var/www/nextcloud/occ user:add --password-from-env testuser1
# When prompted, or use:
sudo -u www-data php /var/www/nextcloud/occ user:add \
--display-name="Test User 1" \
--group="testgroup" \
testuser1- Log in as admin.
- Upload files to your admin Files area.
- Share them with
testuser1using the share dialog.
Use curl to upload files via WebDAV from a remote source or local file system:
# Upload a single file via WebDAV
curl -u admin:ADMIN_PASSWORD \
-T /path/to/local/file.pdf \
https://cloud.example.com/remote.php/dav/files/admin/file.pdfAfter loading sample data:
- Log in to Nextcloud at
https://cloud.example.com. - Open the Files app and confirm the uploaded files are visible.
- Try sharing a file with another user to test the sharing workflow.
- Install the Photos app (if not already installed) and upload some images to test the gallery view.
To remove all sample data when you no longer need it:
- In the Nextcloud web interface, select the files/folders and click Delete.
- Go to Files > Deleted files and permanently delete them from the trash.
Or via command line:
sudo -u www-data php /var/www/nextcloud/occ trashbin:cleanup --all-users| Next | Page |
|---|---|
| Manage user accounts | Managing-Users |
| Manage installed apps | Managing-Apps |
| Troubleshoot issues | Troubleshooting |
Getting Started
Configuration
Administration
Using Nextcloud
Help
Démarrage
Configuration
Administration
Utiliser Nextcloud
Aide