backrest

backrest

Docker app from AlexRed's Repository

Overview

Web UI and orchestrator for Restic backup. Backrest is a web-accessible backup solution built on top of restic and providing a WebUI which wraps the restic CLI and makes it easy to create repos, browse snapshots, and restore files. Additionally, Backrest can run in the background and take an opinionated approach to scheduling snapshots and orchestrating repo health operations. Features: - Import your existing restic repositories - Cron scheduled backups and health operations (e.g. prune and forget) - UI for browsing and restoring files from snapshots - Configurable backup notifications (e.g. Discord, Slack, Shoutrrr, Gotify) - Add shell command hooks to run before and after backup operations. - Compatible with rclone remotes - Backup to any restic supported storage (e.g. S3, B2, Azure, GCS, local, SFTP, and all rclone remotes) Inside Backrest, use /backup/... for backup plan paths and /repos/... for local repos. These are the container paths of the mappings below, not the Unraid host paths. Github: https://github.com/garethgeorge/backrest Documentation: https://garethgeorge.github.io/backrest/introduction/getting-started

External image (view source) External image (view source)


Overview

Backrest is a web-accessible backup solution built on top of restic. Backrest provides a WebUI which wraps the restic CLI and makes it easy to create repos, browse snapshots, and restore files. Additionally, Backrest can run in the background and take an opinionated approach to scheduling snapshots and orchestrating repo health operations.

By building on restic, Backrest leverages its mature, fast, reliable, and secure backup capabilities while adding an intuitive interface.

Built with Go, Backrest is distributed as a standalone, lightweight binary with restic as its sole dependency. It can securely create new repositories or manage existing ones. Once storage is configured, the WebUI handles most operations, while still allowing direct access to the powerful restic CLI for advanced operations when needed.

Key Features

  • Web Interface: Access locally or remotely (perfect for NAS deployments)
  • Multi-Platform Support:
    • Linux
    • macOS
    • Windows
    • FreeBSD
    • Docker
  • Backup Management:
    • Import existing restic repositories
    • Cron-scheduled backups and maintenance (e.g. prune, check, forget, etc)
    • Browse and restore files from snapshots
    • Configurable notifications (Discord, Slack, Shoutrrr, Gotify, Healthchecks)
    • Pre/post backup command hooks to execute shell scripts
  • Storage Options:
    • Compatible with rclone remotes
    • Supports all restic storage backends (S3, B2, Azure, GCS, local, SFTP, and all rclone remotes)

Preview

External image (view source) External image (view source) External image (view source)


User Guide

See the Backrest docs.


Installation

Backrest is packaged as a single executable. It runs directly on Linux, macOS, and Windows. restic is downloaded automatically on first run.

Once installed, access Backrest at http://localhost:9898 (default port). First-time setup will prompt for username and password creation.

[!NOTE] To change the default port, set the BACKREST_PORT environment variable (e.g., BACKREST_PORT=0.0.0.0:9898 to listen on all interfaces). The install script accepts --allow-remote-access as a shortcut for this.

Backrest will use your system's installed version of restic if it's available and compatible. If not, Backrest will download and install a suitable version in its data directory, keeping it updated. To use a specific restic binary, set the BACKREST_RESTIC_COMMAND environment variable to the desired path.

Linux & macOS (Recommended)

The install script downloads the latest release, drops the binary into /usr/local/bin, and sets up the appropriate auto-start integration (systemd or OpenRC on Linux; launchd on macOS):

curl -fsSL https://raw.githubusercontent.com/garethgeorge/backrest/main/install.sh | bash

Flags go after --:

# Bind to all interfaces (default: 127.0.0.1:9898)
curl -fsSL https://raw.githubusercontent.com/garethgeorge/backrest/main/install.sh | bash -s -- --allow-remote-access

# Uninstall (removes service, autostart entry, and /usr/local/bin/backrest)
curl -fsSL https://raw.githubusercontent.com/garethgeorge/backrest/main/install.sh | bash -s -- --uninstall

The service runs as your user by default (so config and data live under your $HOME). To install as root instead, pass --root. After install, access Backrest at http://localhost:9898.

[!TIP] Review install.sh before piping it into a shell. You can also clone the repo and run ./install.sh locally; it accepts the same flags.

macOS — Homebrew (alternative)

Homebrew tap:

brew tap garethgeorge/homebrew-backrest-tap
brew install backrest
brew services start backrest

[!NOTE] You may need to grant Full Disk Access to Backrest. Go to System Preferences > Security & Privacy > Privacy > Full Disk Access and add /usr/local/bin/backrest.

Arch Linux (AUR)

Backrest on AUR is third-party (not maintained by the Backrest project) and tweaks the systemd unit; see the AUR service file for details.

paru -Sy backrest  # or: yay -Sy backrest
sudo systemctl enable --now backrest@$USER.service

Docker

Image: ghcr.io/garethgeorge/backrest (also on Docker Hub).

  • Includes rclone and common Unix utilities
  • For a minimal image, use ghcr.io/garethgeorge/backrest:scratch

Docker Compose

version: "3.8"
services:
  backrest:
    image: ghcr.io/garethgeorge/backrest:latest
    container_name: backrest
    hostname: backrest
    volumes:
      - ./backrest/data:/data
      - ./backrest/config:/config
      - ./backrest/cache:/cache
      - ./backrest/tmp:/tmp
      - ./backrest/rclone:/root/.config/rclone # Mount for rclone config (needed when using rclone remotes)
      - /path/to/backup/data:/userdata  # Mount local paths to backup
      - /path/to/local/repos:/repos     # Mount local repos (optional for remote storage)
    environment:
      - BACKREST_DATA=/data
      - BACKREST_CONFIG=/config/config.json
      - XDG_CACHE_HOME=/cache
      - TMPDIR=/tmp
      - TZ=America/Los_Angeles
    ports:
      - "9898:9898"
    restart: unless-stopped

Windows

Download the Windows installer for your architecture from the releases page. The installer, named Backrest-setup-[arch].exe, places Backrest and a GUI tray application in %localappdata%\Programs\Backrest\. The tray application, set to start on login, monitors Backrest.

[!TIP] To override the default port before installation, set a user environment variable named BACKREST_PORT. On Windows 10+, navigate to Settings > About > Advanced system settings > Environment Variables. Under "User variables", create a new variable BACKREST_PORT with the value 127.0.0.1:port (e.g. 127.0.0.1:8080). If changing post-installation, re-run the installer to update shortcuts with the new port.


Configuration

Environment Variables (Unix)

Variable Description Default
BACKREST_PORT Port to bind to 127.0.0.1:9898 (or 0.0.0.0:9898 for the docker images)
BACKREST_CONFIG Path to config file $HOME/.config/backrest/config.json
(or, if $XDG_CONFIG_HOME is set, $XDG_CONFIG_HOME/backrest/config.json)
BACKREST_DATA Path to the data directory $HOME/.local/share/backrest
(or, if $XDG_DATA_HOME is set, $XDG_DATA_HOME/backrest)
BACKREST_RESTIC_COMMAND Path to restic binary Defaults to a Backrest managed version of restic at $XDG_DATA_HOME/backrest/restic-x.x.x
XDG_CACHE_HOME Path to the cache directory

Environment Variables (Windows)

Variable Description Default
BACKREST_PORT Port to bind to 127.0.0.1:9898
BACKREST_CONFIG Path to config file %appdata%\backrest\config.json
BACKREST_DATA Path to the data directory %appdata%\backrest\data
BACKREST_RESTIC_COMMAND Path to restic binary Defaults to a Backrest managed version of restic in C:\Program Files\restic\restic-x.x.x
XDG_CACHE_HOME Path to the cache directory

Development

Contributing

Contributions are welcome! See the issues or feel free to open a new issue to discuss a project. Beyond the core codebase, contributions to documentation, cookbooks, and testing are always welcome.

Build Dependencies

All build dependencies are defined in shell.nix and can be activated automatically using Nix and direnv.

Using Nix + direnv (Recommended)

  1. Install Nix and direnv
  2. Hook direnv into your shell (e.g. eval "$(direnv hook bash)" in your .bashrc)
  3. Clone the repo and cd into it
  4. Run direnv allow to trust the .envrc — all dependencies (Go, Node.js, pnpm, protoc, buf, etc.) will be available in your shell automatically

Manual Setup

If you prefer not to use Nix, install the following manually:

(Optional) To edit protobuf definitions:

apt install -y protobuf-compiler
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/bufbuild/buf/cmd/buf@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install connectrpc.com/connect/cmd/protoc-gen-connect-go@latest
npm install -g @bufbuild/protoc-gen-es

Compiling

(cd webui && pnpm i && pnpm run build)
(cd cmd/backrest && go build .)

Using VSCode Dev Containers

The dev container uses Nix and direnv to provide all dependencies. When the container starts, direnv allow runs automatically so the Nix shell is activated in every terminal.

  1. Make sure Docker and VSCode with the Dev Containers extension is installed
  2. Clone this repository
  3. Open this folder in VSCode
  4. When prompted, click on Open in Container button, or run > Dev Containers: Rebuild and Reopen in Containers command
  5. When the container is started, go to Run and Debug, choose Debug Backrest (backend+frontend) and run it

[!NOTE] Provided launch configuration has hot reload for the typescript frontend.

Translations

Translations are stored in ./webui/messages and are generated using inlang. Machine translations can be updated by running npx @inlang/cli machine translate --project ./project.inlang.

Text is translated on a best-effort basis and is not guaranteed to be accurate. If you find any translations that are incorrect, please submit a pull request to fix them. Contributions here are greatly appreciated!

Requirements

Notes
===
Paths entered in the Backrest UI are paths inside the container, not on the Unraid host. Only mapped paths are visible to Backrest and anything written elsewhere is lost when the container is recreated.

- Path to backup: the host folder (default /mnt/user/backup) is available as /backup. Use /backup/... in backup plans. To back up shares, point it at /mnt/user or a specific share.
- Path to backup is read/write so Backrest can restore files. Restores default to a new folder next to the original (path-backrest-restore-snapshotid). Set it to read only if you never restore through Backrest.
- Restic repos: the host folder (default /mnt/user/appdata/backrest/repos) is available as /repos. Use /repos/your-repo as the repo URI for local repos. Not needed for cloud/SFTP/rclone repos.
- The default is in appdata, which is usually on the cache pool. For local repos, point it at a share or disk separate from the data you back up. If Path to backup includes the repo folder (e.g. backing up /mnt/user or appdata), exclude it in the plan so the repo doesn't back up itself.
- A local repo URI outside /repos (e.g. /mnt/user/resticbackup) is created inside the container and lost when the container is recreated.
- To back up unassigned devices or other locations, add another path mapping for them (e.g. /mnt/disks with access mode RW/Slave).

Environment Variables

BACKREST_PORT - address/port to bind to. Defaults to 0.0.0.0:9898 in the docker image.
BACKREST_CONFIG - path to the config file.
BACKREST_DATA - path to the data directory. The managed restic binary and the operation database are stored here.
BACKREST_RESTIC_COMMAND - path to the restic binary. Defaults to a Backrest managed version of restic in the data directory.
XDG_CACHE_HOME - path to the cache directory. This is propagated to restic.
TMPDIR - path for temporary files used by restic and rclone.

Download Statistics

5,765,567
Total Downloads
830,312
This Month
489,971
Avg / Month

Total Downloads Over Time

Loading chart...

Related apps

Explore more like this

Explore all

Details

Repository
garethgeorge/backrest:latest
Last Updated2026-07-12
First Seen2024-08-24

Runtime arguments

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

Template configuration

ConfigPathrw

location of the config.json file

Target
/config
Default
/mnt/user/appdata/backrest/config
Value
/mnt/user/appdata/backrest/config
DataPathrw

backrest data directory. The restic binary and the operation database are placed here.

Target
/data
Default
/mnt/user/appdata/backrest/data
Value
/mnt/user/appdata/backrest/data
CachePathrw

path for the restic cache which greatly improves performance.

Target
/cache
Default
/mnt/user/appdata/backrest/cache
Value
/mnt/user/appdata/backrest/cache
TempPathrw

temporary files used by restic and rclone.

Target
/tmp
Default
/mnt/user/appdata/backrest/tmp
Value
/mnt/user/appdata/backrest/tmp
Path to backupPathrw

Folder with the data to back up, e.g. /mnt/user. In Backrest plans use /backup in place of this path, e.g. /mnt/user/apps becomes /backup/apps. Read/Write is needed to restore files.

Target
/backup
Default
/mnt/user/backup
Value
/mnt/user/backup
Restic reposPathrw

(optional) Folder to store local restic repos. In Backrest set the repo URI to /repos/name in place of this path. The default is in appdata (usually cache), for local repos point this at a separate share or disk from the data you back up. Not needed for cloud/SFTP/rclone repos.

Target
/repos
Default
/mnt/user/appdata/backrest/repos
Value
/mnt/user/appdata/backrest/repos
Rclone configPathrw

(optional) - rclone config directory, needed when using rclone remotes.

Target
/root/.config/rclone
Default
/mnt/user/appdata/backrest/rclone
Value
/mnt/user/appdata/backrest/rclone
WebUIPorttcp

Webui access port, BACKREST_PORT env variable can be used to change the app port as well

Target
9898
Default
9898
Value
9898
BACKREST_DATAVariable

path for backrest data. restic binary and the database are placed here.

Default
/data
Value
/data
BACKREST_CONFIGVariable

path for the backrest config file.

Default
/config/config.json
Value
/config/config.json
XDG_CACHE_HOMEVariable

path for the restic cache which greatly improves performance.

Default
/cache
Value
/cache
TMPDIRVariable

path for temporary files used by restic and rclone.

Default
/tmp
Value
/tmp
TZVariable

Timezone, used for backup schedules

Default
America/Toronto
Value
America/Toronto