Borg remote backup not working after fresh setup

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Nextcloud Hub 26 Winter (33.0.6)
      Nextcloud AIO v13.3.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Openmediavault8.5.4-1 (Synchrony) on Linux 7.0.13+deb13-amd64
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • First time trying the remote backup (local backup works) after fresh install
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

I recently installed OMV / Nextcloud on an old laptop with a usb disk attached just to try out and it was working fine, until I realized I had ignored many recent updates. Unfortunately after updating nextcloud the database would not startup, and…guess what? I had not made any backups…

So I reset the instance with the instructions here and started over with the same host name and recreating the users and moving the data back etc (basically blindly follwing the quickstart guides as at the start). However once I got to backing up I ran into this little issue.

A local backup on the USB disk worked OK but I was interested in remote backups so I went with the BorgBase offer.

Remote borg backup fails with an UNPROTECTED PRIVATE KEY FILE error (see log below)

I made it work by setting the permissions to 600 on /volumes/nextcloud_aio_mastercontainer/_data/data/id_borg (even 640 don’t work) but I’m not sure of any side effects

Is this more an issue with docker on OMV? Just thought I’d share

Steps to replicate it (hint: details matter!):

  1. Setup a borgBase account and backup plan for 250Gb

  2. Set the backup location to the repo url

  3. Attempt a 1st backup with expected key error

  4. save the indicated public key in borgbase and set it for full access to the repo

  5. stop the containers and click create backup

  6. backup fils with the error below

  7. /srv//volumes/nextcloud_aio_mastercontainer/_data/data/id_borg permissions set to 600

Log entries

Backup Log

2026-07-22T13:02:45.603977552Z Remote: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2026-07-22T13:02:45.604026144Z Remote: @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
2026-07-22T13:02:45.604035288Z Remote: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2026-07-22T13:02:45.604044009Z Remote: Permissions 0644 for '/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/id_borg' are too open.
2026-07-22T13:02:45.604052621Z Remote: It is required that your private key files are NOT accessible by others.
2026-07-22T13:02:45.604061219Z Remote: This private key will be ignored.
2026-07-22T13:02:45.604069563Z Remote: Load key "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/id_borg": bad permissions
2026-07-22T13:02:45.604078455Z Remote: wpneph4t@wpneph4t.repo.borgbase.com: Permission denied (publickey).
2026-07-22T13:02:45.616177266Z Connection closed by remote host. Is borg working on the server?
2026-07-22T13:02:45.704998437Z Could not initialize borg repository.

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

bash-5.3# ./occ config:list system
{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "update_channel": "stable",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "timeout": 3,
            "read_timeout": 10,
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "skeltonnc.ddns.net",
        "overwriteprotocol": "https",
        "serverid": 445,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "skeltonnc.ddns.net"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "33.0.6.2",
        "overwrite.cli.url": "https:\/\/skeltonnc.ddns.net\/",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "updatechecker": false,
        "loglevel": 2,
        "log_type": "file",
        "log_type_audit": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "logfile_audit": "\/var\/www\/html\/data\/audit.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "24": "OCA\\Eurooffice\\Preview",
            "0": "OC\\Preview\\Imaginary",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "updatedirectory": "\/nc-updater",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "eurooffice": {
            "editors_check_interval": 0,
            "jwt_secret": "09bb3a2bdd4d1e2158173c170bfc5f1aaa215a4f0490be98",
            "jwt_header": "AuthorizationJwt"
        },
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "DOMAIN": "skeltonnc.ddns.net",
        "AIO_VERSION": "v13.3.1"
    }
}
bash-5.3# 

Apps

The output of occ app:list (if possible).

bash-5.3# ./occ app:list
Enabled:
  - activity: 6.0.0
  - admin_audit: 1.23.0
  - bruteforcesettings: 6.0.0
  - calendar: 6.5.1
  - circles: 33.0.0
  - cloud_federation_api: 1.17.0
  - comments: 1.23.0
  - contacts: 8.7.4
  - contactsinteraction: 1.14.1
  - dashboard: 7.13.0
  - dav: 1.36.0
  - deck: 1.17.4
  - eurooffice: 11.0.1
  - federatedfilesharing: 1.23.0
  - federation: 1.23.0
  - files: 2.5.0
  - files_downloadlimit: 5.1.0
  - files_pdfviewer: 6.0.0
  - files_reminders: 1.6.0
  - files_sharing: 1.25.2
  - files_trashbin: 1.23.0
  - files_versions: 1.26.0
  - firstrunwizard: 6.0.0
  - logreader: 6.0.0
  - lookup_server_connector: 1.21.0
  - nextcloud-aio: 0.8.0
  - nextcloud_announcements: 5.0.0
  - notes: 6.0.1
  - notifications: 6.0.0
  - notify_push: 1.3.3
  - oauth2: 1.21.0
  - password_policy: 5.0.0
  - passwords: 2026.7.10
  - photos: 6.0.0
  - privacy: 5.0.0
  - profile: 1.2.0
  - provisioning_api: 1.23.0
  - recommendations: 6.0.0
  - related_resources: 4.0.0
  - serverinfo: 5.0.0
  - settings: 1.16.0
  - sharebymail: 1.23.0
  - spreed: 23.0.8
  - support: 5.0.0
  - survey_client: 5.0.0
  - systemtags: 1.23.0
  - tasks: 0.18.1
  - text: 7.0.1
  - theming: 2.8.0
  - twofactor_backupcodes: 1.22.0
  - twofactor_totp: 15.0.0
  - updatenotification: 1.23.0
  - user_status: 1.13.0
  - viewer: 6.0.0
  - weather_status: 1.13.0
  - webhook_listeners: 1.5.0
  - whiteboard: 1.5.9
  - workflowengine: 2.15.0
Disabled:
  - app_api: 33.0.0 (installed 33.0.0)
  - encryption: 2.21.0
  - files_external: 1.25.1
  - suspicious_login: 11.0.0
  - twofactor_nextcloud_notification: 7.0.0
  - user_ldap: 1.24.0
bash-5.3# 

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

Just do

chmod 600 /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/id_borg

which will set safer perms for the borg-key.

Is there a special reason why you are not using repokey in borg? I think if you do not have the above file you will be unable to access this repo, so you need to back it up somewhere else.

GOOD LUCK!