Nextcloud Desktop Client
The Nextcloud desktop client keeps a local folder synchronised with your self-hosted Nextcloud server. Changes made on the desktop appear on every other device connected to the same server. Changes made on your phone, tablet, or another desktop appear on this one. The sync is bidirectional, continuous, and happens silently in the background.
The server setup is covered in the server section of this series. This page covers the desktop client: installation, account configuration, Dolphin integration, selective sync, and the command line tools for scripted operations.
Installation
The version of the Nextcloud client in the standard Ubuntu repositories tends to lag behind the server version. A version mismatch between client and server can cause sync compatibility issues. Install from the Nextcloud PPA to get the current release:
curl -fsSL https://download.nextcloud.com/desktop/releases/Linux/latest/GPG_KEY | \
gpg --dearmor | \
sudo tee /usr/share/keyrings/nextcloud-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/nextcloud-keyring.gpg] \
https://download.nextcloud.com/desktop/releases/Linux/latest/apt noble main" | \
sudo tee /etc/apt/sources.list.d/nextcloud-client.list
sudo apt update
sudo apt install nextcloud-desktop
This repository should already be in the 3rd-party repos list from that section of the series.
Install the Dolphin integration package to add Nextcloud overlay icons and context menu options in the file manager:
sudo apt install dolphin-nextcloud
Verify the installation:
nextcloud --version
Initial setup
Launch the Nextcloud client from the application launcher. The setup wizard opens on first launch.
Connecting to your server
Enter your Nextcloud server address:
https://nextcloud.yourdomain.net
The client opens a browser window to complete authentication. Log in with your Nextcloud credentials. If your server uses a certificate from your internal CA, Brave must already trust the CA for this to work cleanly. Once authenticated, the browser confirms the connection and the client proceeds to the folder setup.
Trusting the server certificate
If the browser shows a certificate warning during setup despite the CA being in the system trust store, the Nextcloud client may need the CA added separately:
# The Nextcloud client uses its own certificate bundle on some installations
sudo cp /path/to/your-root-ca.crt /etc/ssl/certs/
sudo update-ca-certificates
Restart the Nextcloud client after updating.
Choosing sync folders
The wizard asks which folders to synchronise. Two options:
Sync everything: synchronises the entire Nextcloud server storage to a local folder. Simple, but potentially large depending on how much is stored on the server.
Choose folders: synchronises specific folders only. The right choice for most setups, particularly if the server hosts large media libraries you do not need locally.
The default local sync folder is ~/Nextcloud. This is fine as a default. The folder is created automatically.
For this series, the recommended selective sync configuration at minimum:
- Documents
- Calibre Library (if using Nextcloud for e-book sync)
- Photos (if not using a dedicated photo management tool)
Exclude large media directories that are better accessed via streaming (Jellyfin) than local sync.
Dolphin integration
The dolphin-nextcloud package adds Nextcloud overlay icons and a context menu to Dolphin for Kubuntu specifically. Once installed and the client is running, files in the sync folder show status icons:
- Green checkmark: synced and current
- Blue arrows: sync in progress
- Yellow warning: sync issue, click to see details
- Red X: configuration error
Right-click any file or folder in the Nextcloud sync directory to access share options: create a public link, share with a specific Nextcloud user, or set an expiry date on a shared link, all without opening the browser.
Account settings
Open the Nextcloud client settings by clicking the system tray icon and selecting Settings.
General tab
- Launch on system startup: Enable. The client should always be running.
- Use monochrome icons: Personal preference. Monochrome integrates better with KDE Plasma’s system tray.
- Show desktop notifications: Enable for sync error alerts. Disable for routine sync notifications if they become distracting.
Network tab
Configure bandwidth limits if Nextcloud sync is competing with other network usage:
- Download limit: Leave unlimited for most home network setups
- Upload limit: Consider a modest limit (2-5 MB/s) if the Nextcloud server is outside the home network and you do not want uploads saturating the connection
Ignored files
The Edit Ignored Files button opens a pattern editor for files that should never be synced. The defaults cover most cases. Add additional patterns for project-specific files worth excluding:
# Common additions
.DS_Store
Thumbs.db
*.tmp
*.swp
.git
node_modules
__pycache__
*.pyc
Selective sync per folder
For folders already synced, adjust which subfolders are included without removing the account. Click the three-dot menu next to a sync folder > Choose what to sync. Uncheck any subfolders you do not want synchronised locally.
This is useful for keeping the Nextcloud server as the authoritative archive while only pulling a working subset to the desktop.
Adding multiple accounts
You may configure multiple Nextcloud accounts in the desktop sync client. Click Account > Add New to add a new account, and it will appear as a new tab in the settings dialog.
For this three-site setup, a single Nextcloud server is the likely configuration. If each site runs its own Nextcloud instance, add each as a separate account and configure selective sync per account to avoid duplicating data.
The command line client
nextcloudcmd is the command line Nextcloud sync client that allows scripted synchronisation operations.
Install it alongside the desktop client:
sudo apt install nextcloud-desktop-cmd
Basic sync of a local folder to the server:
nextcloudcmd ~/Documents https://yourusername:yourpassword@nextcloud.yourdomain.net/
Sync a specific remote path to a local directory:
nextcloudcmd --path /Documents ~/Documents \
https://yourusername:yourpassword@nextcloud.yourdomain.net/
Sync without prompts (for use in scripts):
nextcloudcmd --non-interactive --silent \
~/Documents \
https://yourusername:apppassword@nextcloud.yourdomain.net/
Use an app password rather than your main account password for scripted access. Generate one in the Nextcloud web interface under Settings > Security > App passwords.
Scripted sync via anacron
For a one-way backup sync of a directory to Nextcloud that runs daily via anacron, create ~/.anacron/cron.daily/nextcloud-sync:
#!/usr/bin/env bash
# One-way sync of local directory to Nextcloud
nextcloudcmd \
--non-interactive \
--silent \
--path /Backups/Desktop \
~/borgmatic-reports \
https://yourusername:apppassword@nextcloud.yourdomain.net/ \
2>/dev/null
EOF
chmod 0755 ~/.anacron/cron.daily/nextcloud-sync
Store the app password in KeePassXC and reference it from a secrets file rather than hardcoding it in the script.
Virtual file system (VFS)
The Nextcloud client supports virtual files: placeholders that appear in the sync folder without the actual content being downloaded. Files only download when you open them. This significantly reduces the local storage required while keeping all files browsable.
Enable VFS for a sync folder via the three-dot menu > Enable virtual file support. The folder shows all server files with cloud icons; files download on access.
VFS works on Kubuntu via the CFAPI or suffix VFS implementation. The suffix method creates placeholder files with a .nextcloud extension that become the real file on access. Enable it in the folder settings.
Troubleshooting
Sync stuck or not progressing
# Check client log for errors
~/.local/share/Nextcloud/logs/
Or launch with logging:
nextcloud --logfile /tmp/nextcloud.log
Certificate errors after CA update
sudo update-ca-certificates
# Restart the client
pkill nextcloud && nextcloud &
Conflict files
When the same file is modified on two devices before syncing, Nextcloud creates a conflict copy named filename_conflict_YYYY-MM-DD.ext. Review and resolve conflicts manually. The conflict copy is the version from the other device; the original filename is the version from this device.
Regularly check for conflict files:
find ~/Nextcloud -name "*_conflict_*" 2>/dev/null
The Nextcloud sync folder is not a backup. It synchronises deletions as well as additions, which means a file deleted on any connected device is deleted everywhere. The Borg backup configured earlier in this series is the backup. Nextcloud is the sync layer. Both are needed and they serve different purposes.