nc-backup 2.0 · Ubuntu 26.04 LTS · AGPL-3.0
Setup guide
Current 2.1.1 for Ubuntu 26.04 LTS (Resolute) and Ubuntu 24.04 – Raspberry Pi and Intel/AMD. One package for all architectures. Incremental backups with restic.
Versions
2.1.1 (current): for Ubuntu 26.04 LTS because policykit-1 no longer exists there. Depends on polkitd + pkexec. Also runs on Ubuntu 24.04.
Version 1.8.3 runs only on Ubuntu 24.04 LTS, not on Ubuntu 26.04. Download: nc-backup_1.8.3-1_all.deb · source 1.8.3.
Install
sudo dpkg -i nc-backup_2.1.1-1_all.deb sudo apt -f install systemctl status nc-backup-web # http://SERVER-IP:42173
From source: sudo ./scripts/install-ubuntu.sh
Port
Default: 42173, bind 0.0.0.0. Change with sudo systemctl edit nc-backup-web → Environment=NC_BACKUP_WEB_PORT=…, then sudo systemctl daemon-reload && sudo systemctl restart nc-backup-web.
If UFW is installed, the installer adds allow 42173/tcp. It does not enable UFW automatically.
sudo ufw allow 42173/tcp comment "nc-backup-web"
systemd
Service nc-backup-web starts at boot: ExecStart=/usr/bin/python3 -m nc_backup_web. No nginx – Python standard library HTTP. Logs: journalctl -u nc-backup-web -f
Scheduled backups: nc-backup.timer (enabled when you set a schedule). The service nc-backup.service is oneshot and often disabled: ExecStart=/usr/bin/python3 -m nc_backup run.
First setup
- Access key required (strong: upper/lower case, digit, special character) –
/etc/nc-backup/web-token - restic password with the same strength –
/etc/nc-backup/restic-password - Native / Docker / AIO detection, extra DB container,
datadirectoryfromconfig.php - restic backs up dump +
config.php+ data directory (mysqldump --single-transaction, native ordocker exec) - Web UI and GUI show an update notice from GitHub Releases – no auto-install
Nextcloud app (optional, not in the App Store)
This app is optional – the web UI is enough for backup and restore. It is not listed in the Nextcloud App Store. Nextcloud only loads it if the folder sits in the real apps/ directory, belongs to www-data, and is enabled with occ. It starts backups only – restore stays in the web UI (port 42173).
- Settings → Administration → NC Backup: URL + access key only (token from
/etc/nc-backup/web-tokenor the web UI) - NC Backup icon in the header (like Calendar): pick a target and start
From nc-backup 2.1.1 / app 1.3.3: empty backup-start body as {} or accepted [] (no 400 “JSON object expected”). API unchanged: /api/backup, /api/status, /api/targets with Authorization: Bearer ….
Find Nextcloud and copy the app
The folder name must be exactly ncbackup. Wrong apps/ path is the usual failure.
cd /tmp git clone --depth 1 https://github.com/MarkusFroendhoff/nc-backup.git sudo find /var/www /opt /srv -name occ 2>/dev/null | head NC=/var/www/nextcloud SRC=/tmp/nc-backup/nextcloud-app/ncbackup # or after the .deb: SRC=/usr/share/nc-backup/nextcloud-app/ncbackup sudo rm -rf "$NC/apps/ncbackup" sudo cp -a "$SRC" "$NC/apps/ncbackup" sudo chown -R www-data:www-data "$NC/apps/ncbackup" sudo -u www-data php "$NC/occ" app:enable ncbackup # if Nextcloud says incompatible: sudo -u www-data php "$NC/occ" app:enable --force ncbackup sudo -u www-data php "$NC/occ" app:list | grep ncbackup
Docker: copy into the mounted apps volume, then docker exec -u www-data CONTAINER php occ app:enable --force ncbackup. Do not use http://127.0.0.1:42173 from inside the container – use the host LAN IP or http://172.17.0.1:42173.
Token and URL
- Read the access key from the web UI or
sudo cat /etc/nc-backup/web-token. - Nextcloud → Settings → Administration → NC Backup (not Personal).
- Native, same host: URL
http://127.0.0.1:42173, paste token, save. - Click the NC Backup icon → choose target → start.
sudo -u www-data php /var/www/nextcloud/occ config:system:set allow_local_remote_servers --value=true --type=boolean
Needed if Nextcloud blocks local URLs. Then hard-reload the browser (Ctrl+F5).
Previous version
Version 1.8.3 runs only on Ubuntu 24.04 LTS, not on Ubuntu 26.04.
Package: nc-backup_1.8.3-1_all.deb · source: nc-backup-1.8.3-source.tar.gz
License
AGPL-3.0-or-later · free · optional PayPal donation