BorgWarehouse

BorgWarehouse

Official

Docker app from jamesfreeman959's Repository

Overview

BorgWarehouse is a fast, modern web interface for running a BorgBackup server. It turns your Unraid server into a central destination for Borg backups from your other machines: create and manage repositories, assign SSH keys, set quotas, monitor backup status and storage use, and get alerts by email or Apprise when a backup is late. Clients back up over SSH using borg, Vorta or borgmatic. Before installing: generate two secrets for BETTER_AUTH_SECRET and CRONJOB_KEY (for example with "openssl rand -base64 32" in the Unraid terminal), and set SSH_SERVER_PORT to the same value as the SSH host port. Unraid's own SSH already uses port 22, so the default here is 2222. Status and storage checks run on a schedule outside the container. Install the User Scripts plugin and add the script from the support page to keep the dashboard up to date. OIDC single sign-on (Authentik, Keycloak, Zitadel and others), SMTP and the LAN settings are under Show more settings.

BorgWarehouse for Unraid

A Community Applications template for BorgWarehouse, a web interface for running your own BorgBackup server. With it, your Unraid server becomes the destination for Borg backups from your other machines (borg, Vorta, borgmatic).

The template uses the official borgwarehouse/borgwarehouse image unchanged. This repository only holds the Unraid template, a User Scripts script for the scheduled checks, and these notes.

Install

Search for BorgWarehouse in the Apps tab (Community Applications).

Before you click Apply, fill in:

Setting What to put
SSH port / SSH_SERVER_PORT The same port in both. The default is 2222, because Unraid's own SSH uses 22.
FQDN The hostname or IP your clients use to reach Unraid, e.g. tower.local.
BETTER_AUTH_URL The main URL you open the web UI at, e.g. https://borg.example.com or http://192.168.1.10:3000. If you also use other addresses (say both the proxy domain and the IP), list them in BETTER_AUTH_TRUSTED_ORIGINS. Otherwise logins from them fail and the log shows Invalid origin.
BETTER_AUTH_SECRET, CRONJOB_KEY Two different random values. In the Unraid terminal run openssl rand -base64 32 twice.
Repositories A share for the backups themselves, /mnt/user/borgwarehouse/ by default. Don't use appdata: backups get large.

Then open the web UI and create the admin account.

Known issue in BorgWarehouse 3.7.0: on a brand new install, the first start fails with Database schema mismatch ... table account has no column named issuer and the web UI returns error 500. Restart the container once and it works. This is an upstream bug (3.6.3 starts cleanly). Existing installs upgrading from 3.6.x hit a related problem, tracked in Ravinou/borgwarehouse#723.

Scheduled checks (User Scripts)

BorgWarehouse doesn't schedule its own status and storage checks. Something outside the container has to call them, otherwise the dashboard never updates "last backup" times or storage usage, and late-backup alerts are never sent. On Unraid, use the User Scripts plugin:

  1. Install User Scripts from the Apps tab.
  2. Settings → User Scripts → Add New Script, and name it borgwarehouse-checks.
  3. Edit the script and paste in scripts/borgwarehouse-cron.sh.
  4. Set the schedule to Custom, 0 * * * * (hourly).

The script runs the checks inside the container using the CRONJOB_KEY from the template, so the key isn't copied anywhere else. If you renamed the container, change CONTAINER= at the top of the script.

Single sign-on (OIDC)

Under Show more settings:

  • OIDC_ISSUER_URL: your provider's issuer, e.g. https://auth.example.com/application/o/borgwarehouse/ for Authentik or https://kc.example.com/realms/home for Keycloak.
  • OIDC_CLIENT_ID, OIDC_CLIENT_SECRET: from the provider (confidential client).
  • OIDC_PROVIDER_NAME: label on the login button (optional).
  • Redirect URI at the provider: <BETTER_AUTH_URL>/api/auth/callback/oidc, e.g. https://borg.example.com/api/auth/callback/oidc. BorgWarehouse always builds it from BETTER_AUTH_URL, so scheme, host and port must match that exactly, whichever address you started from. If the provider reports a redirect URI mismatch, the redirect_uri parameter in the address bar of its error page shows what was sent.
  • Start SSO logins from the BETTER_AUTH_URL address. Starting from another trusted address (e.g. the IP) can fail on the way back, because the login state cookie belongs to the address you started from.

SSO only signs in existing users. Set your BorgWarehouse account's email to the one your provider sends, sign in with SSO, then optionally set DISABLE_PASSWORD_LOGIN to true.

GitHub, Google, Microsoft and GitLab login are also supported upstream. Add the variables with Add another Path, Port, Variable… (GITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET, etc.). See the upstream docs.

Notes

  • SSH host keys are kept in appdata/borgwarehouse/ssh_host. Keep that folder, otherwise clients get a host key changed warning after reinstalling.
  • Permissions: the container runs as PUID/PGID (99:100 by default) and fixes the ownership of the mapped folders when it starts. PUID or PGID 0 (root) is refused.
  • Can't log in, Invalid origin in the log: the address in your browser isn't BETTER_AUTH_URL or listed in BETTER_AUTH_TRUSTED_ORIGINS. Scheme, host and port must all match. After several failed attempts the login is also rate limited for a while; restarting the container clears that.
  • Reverse proxy: set BETTER_AUTH_URL to the proxied URL. If you also use the direct http://IP:3000 address, add it to BETTER_AUTH_TRUSTED_ORIGINS. Only the web UI goes through the proxy: Borg traffic is SSH on the SSH port, so forward that port on your router if clients back up from outside your network.
  • Extra storage locations (STORAGE_TARGETS): add each path as a Path mapping too.
  • Notifications: BorgWarehouse can use an Apprise API server. Run the Apprise container and point BorgWarehouse at it in the web UI.

Support

Questions and help on Unraid: the support thread on the Unraid forums. Bugs in the template (defaults, descriptions, the User Scripts script): open an issue here. Problems with BorgWarehouse itself: upstream.

Repository layout

Path Purpose
templates/borgwarehouse.xml Unraid Docker template. This is the canonical copy: Unraid fetches template updates from here (<TemplateURL>), and the Community Applications feed in unraid-plugins carries an identical copy
scripts/borgwarehouse-cron.sh User Scripts script for the scheduled checks
icon.svg, icon.png Icon (BorgWarehouse's own logo, from the upstream repository)

Testing the template before it is in CA

Copy the template onto the flash drive, then add the container from it:

wget -O /boot/config/plugins/dockerMan/templates-user/my-BorgWarehouse.xml https://raw.githubusercontent.com/jamesfreeman959/unraid-borgwarehouse/main/templates/borgwarehouse.xml

Then go to Docker → Add Container and pick BorgWarehouse from the template list.

Releasing a template change

Edit templates/borgwarehouse.xml here, then copy it to templates/borgwarehouse.xml in unraid-plugins. That repository's Validate workflow fails if the two copies differ.

License

The template and script are MIT licensed (see LICENSE). BorgWarehouse and its logo are by Ravinou, under the AGPL-3.0.

Requirements

Optional but recommended: the User Scripts plugin, to run BorgWarehouse's scheduled status and storage checks. See the support page for the script.

Download Statistics

675,009
Total Downloads

Related apps

Explore more like this

Explore all

Details

Repository
borgwarehouse/borgwarehouse
Last Updated2026-09-20
First Seen2026-10-16

Runtime arguments

Web UI
http://[IP]:[PORT:3000]/
Network
bridge
Shell
bash
Privileged
false

Template configuration

Web UI portPorttcp

Port for the BorgWarehouse web interface.

Target
3000
Default
3000
Value
3000
SSH portPorttcp

Port Borg clients connect to over SSH. Unraid's own SSH uses 22, so pick another port. SSH_SERVER_PORT below must match this value.

Target
22
Default
2222
Value
2222
RepositoriesPathrw

Where the Borg repositories are stored. Backups can be large, so use a share on the array (or a pool sized for it) rather than appdata.

Target
/home/borgwarehouse/repos
Default
/mnt/user/borgwarehouse/
Value
/mnt/user/borgwarehouse/
ConfigPathrw

Application config and user database.

Target
/home/borgwarehouse/app/config
Default
/mnt/user/appdata/borgwarehouse/config/
Value
/mnt/user/appdata/borgwarehouse/config/
SSH authorized keysPathrw

Client public keys managed by BorgWarehouse (authorized_keys).

Target
/home/borgwarehouse/.ssh
Default
/mnt/user/appdata/borgwarehouse/ssh/
Value
/mnt/user/appdata/borgwarehouse/ssh/
SSH host keysPathrw

The server's SSH host keys, generated on first start. Keep this so clients don't see a host key warning after an update.

Target
/etc/ssh
Default
/mnt/user/appdata/borgwarehouse/ssh_host/
Value
/mnt/user/appdata/borgwarehouse/ssh_host/
FQDNVariable

Hostname or IP address that Borg clients use to reach this server. It appears in the backup commands BorgWarehouse shows you, e.g. tower.local or backup.example.com.

SSH_SERVER_PORTVariable

Must match the SSH host port above. It appears in the backup commands BorgWarehouse shows you.

Default
2222
Value
2222
BETTER_AUTH_URLVariable

The main URL you open BorgWarehouse at, including http:// or https:// and any port, e.g. https://borg.example.com or http://192.168.1.10:3000. Logins from any other address are refused (Invalid origin in the log), so add the others to BETTER_AUTH_TRUSTED_ORIGINS under Show more settings.

BETTER_AUTH_SECRETVariable

Secret used to sign login sessions. Generate with: openssl rand -base64 32. If empty, a new one is made at every restart and everyone is logged out.

CRONJOB_KEYVariable

Key for the scheduled status and storage checks. Generate with: openssl rand -base64 32. The User Scripts script reads it from the container, so you don't need to copy it anywhere.

PUIDVariable

User ID the app runs as. 99 is Unraid's nobody user. Must not be 0.

Default
99
Value
99
PGIDVariable

Group ID the app runs as. 100 is Unraid's users group. Must not be 0.

Default
100
Value
100
OIDC_ISSUER_URLVariable

OIDC issuer URL (Authentik, Keycloak, Zitadel, ...), without /.well-known/openid-configuration. Set the redirect URI at your provider to BETTER_AUTH_URL/api/auth/callback/oidc. Users must already exist in BorgWarehouse with the same email; SSO doesn't create accounts.

OIDC_CLIENT_IDVariable

OIDC client ID.

OIDC_CLIENT_SECRETVariable

OIDC client secret.

OIDC_PROVIDER_NAMEVariable

Label on the SSO login button. Defaults to SSO.

DISABLE_PASSWORD_LOGINVariable

Allow SSO login only. Only takes effect when an SSO provider is configured.

Default
false|true
Value
false
SETUP_SECRETVariable

Passphrase required to complete the first-run setup wizard. Recommended if the web UI is reachable from the internet before you've created the admin account.

BETTER_AUTH_TRUSTED_ORIGINSVariable

Other URLs you open BorgWarehouse at besides BETTER_AUTH_URL, comma separated, e.g. http://192.168.1.10:3000 when BETTER_AUTH_URL is your reverse proxy domain. Without this, logins from those addresses fail with Invalid origin.

SESSION_EXPIRY_SECONDSVariable

Login session lifetime in seconds. Defaults to 3600 (1 hour).

FQDN_LANVariable

Optional local hostname or IP. BorgWarehouse then also shows backup commands for clients on your LAN.

SSH_SERVER_PORT_LANVariable

SSH port for the LAN commands, if different.

HIDE_SSH_PORTVariable

Leave the port out of the commands BorgWarehouse shows (e.g. when clients set it in ~/.ssh/config).

Default
false|true
Value
false
MAIL_SMTP_HOSTVariable

SMTP server for email alerts.

MAIL_SMTP_PORTVariable

SMTP port. Defaults to 587.

MAIL_SMTP_LOGINVariable

SMTP username.

MAIL_SMTP_PWDVariable

SMTP password.

MAIL_SMTP_FROMVariable

From address for alert emails.

MAIL_REJECT_SELFSIGNED_TLSVariable

Set to false to accept a self-signed certificate on the SMTP server.

Default
true|false
Value
true
DISABLE_INTEGRATIONSVariable

Turn off API tokens (integrations).

Default
false|true
Value
false
DISABLE_DELETE_REPOVariable

Prevent anyone from deleting a repository.

Default
false|true
Value
false
DISABLE_COMPACT_REPOVariable

Prevent anyone from compacting a repository.

Default
false|true
Value
false
STORAGE_TARGETSVariable

Extra storage locations selectable per repository, comma separated, optionally path|name (e.g. /mnt/offsite|Offsite disk). Each path must also be added as a Path mapping to this container.

NEXT_TELEMETRY_DISABLEDVariable

1 turns off Next.js anonymous telemetry.

Default
1
Value
1