Deployment guide

Backrest

Overview

Backrest is a popular open-source web interface and orchestrator for restic, the fast, secure, deduplicating backup program. From an ordinary browser, you configure backup repositories, define backup plans and schedules, set retention and forget policies, run integrity checks, and browse or restore any snapshot. You never need the restic command line.

Every operation Backrest runs is a real restic command. Your backups stay in the open, well-documented restic repository format, so you can read or restore them with restic directly at any time.

This SecureAnyCloud image serves Backrest 1.14.1 behind an nginx reverse proxy on a hardened Ubuntu 24.04 LTS base, patched at build time. The matching restic 0.19.1 binary is already installed, so the appliance is ready offline.

What you get:

  • Backrest 1.14.1 served behind nginx, managed by systemd. Backrest is a single, self-contained Go binary that embeds its own web UI and an SQLite operation log.
  • restic 0.19.1 preinstalled at /usr/local/bin/restic (the version Backrest expects), so the appliance needs no download on first use
  • The Backrest web interface on :80, with a per-VM administrator login required
  • A per-VM administrator password generated on first boot and recorded in a root-only file, so no shared or default login ever ships in the image
  • A fresh per-instance authentication signing key generated on first boot, so sessions cannot be forged across deployments
  • The Backrest server bound to 127.0.0.1:9898 only, never exposed directly to the network
  • A dedicated Azure data disk at /var/lib/backrest for the configuration, the operation log and any local restic repositories
  • backrest.service and nginx.service as enabled systemd units
  • 24/7 SecureAnyCloud support

Backrest is licensed under the GNU General Public License v3.0. This image bundles the unmodified upstream Backrest and restic binaries. SecureAnyCloud is not affiliated with or endorsed by the Backrest or restic projects.

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Standard_B2s (2 vCPU / 4 GiB RAM) is a sensible starting size. Choose a larger size for heavier backup workloads or larger local repositories.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp for the web interface. Backrest serves plain HTTP on port 80, so for production, terminate TLS in front of it with your own domain. The Backrest server is never exposed directly. It listens on 127.0.0.1:9898 only, so port 9898 stays off the network.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Backrest by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Review the dedicated data disk on the Disks tab, then select Review + create and Create.

Step 2 - Deploy from the Azure CLI

az vm create \
  --resource-group <your-rg> \
  --name backrest \
  --image <marketplace-image-urn> \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Open port 80 for the web interface:

az vm open-port --resource-group <your-rg> --name backrest --port 80

Step 3 - Confirm the services are running

SSH in as azureuser and confirm that Backrest and nginx are active. The Backrest server listens only on 127.0.0.1:9898, while nginx serves the web interface on port 80.

systemctl is-active backrest nginx backrest-firstboot
ss -tlnp | grep -E ':80 |:9898 ' | awk '{print $1, $4}'

Step 4 - Retrieve the per-VM administrator password

Every VM generates its own administrator password on first boot. It writes the password, along with the login user and URL, to a root-only credentials file. Read it with sudo:

sudo cat /root/backrest-credentials.txt

Sign in to Backrest with username admin and the backrest.admin.pass value from this file. To confirm the login works from the command line, request an authentication token with those credentials:

PASS=$(sudo grep '^backrest.admin.pass=' /root/backrest-credentials.txt | cut -d= -f2-); curl -s -o /dev/null -w 'login HTTP %{http_code}\n' -m 20 -H 'Content-Type: application/json' -H 'Connect-Protocol-Version: 1' -d "{\"username\":\"admin\",\"password\":\"$PASS\"}" http://127.0.0.1/v1.Authentication/Login

Step 5 - Sign in to Backrest

Browse to http://<vm-public-ip>/. Backrest opens on its sign-in screen. Enter username admin and the password from Step 4.

After you sign in, you land on the summary dashboard. It shows the health of every plan at a glance: when each plan last backed up, how much data is protected, and a recent activity feed.

Step 6 - Add a backup repository

A repository is where restic stores your encrypted, deduplicated snapshots. Click Add Repo in the sidebar to open the repository form.

Give the repository a name. Under Connection, set its location: either a local path such as /var/lib/backrest/repos/main on the data disk, or a remote such as S3, Backblaze B2, SFTP or any restic-supported backend. Then set an encryption password. Use Test Configuration to validate access before saving.

Local repositories live on the dedicated data disk under /var/lib/backrest/repos. They are captured with the disk and kept separate from the operating system disk.

Step 7 - Create a backup plan

A plan tells Backrest what to back up, where, and on what schedule. Click Add Plan and give it a name. Select the repository from Step 6, and add one or more paths to include under Scope.

Then set a Schedule (for example an hourly or daily cron) and a Retention policy to prune old snapshots automatically.

Step 8 - Browse and restore snapshots

Each time a plan runs, it creates a snapshot in its repository. Open the plan from the sidebar to see its backup history as a browsable tree by date.

From any snapshot, you can inspect the files it captured and restore individual files or whole directories. You can also run restic operations such as check, prune and forget, all from the web UI.

Step 9 - Verify the stack

Confirm the Backrest and restic versions, confirm that the services are enabled, and check that authentication is enforced end to end through nginx:

/usr/local/bin/backrest --version | grep -i version:
/usr/local/bin/restic version | head -1
systemctl is-enabled backrest nginx
PASS=$(sudo grep '^backrest.admin.pass=' /root/backrest-credentials.txt | cut -d= -f2-);
U=$(curl -s -o /dev/null -w '%{http_code}' -X POST -H 'Content-Type: application/json' -H 'Connect-Protocol-Version: 1' -d '{}' http://127.0.0.1/v1.Backrest/GetConfig);
TOK=$(curl -s -H 'Content-Type: application/json' -H 'Connect-Protocol-Version: 1' -d "{\"username\":\"admin\",\"password\":\"$PASS\"}" http://127.0.0.1/v1.Authentication/Login | sed -n 's/.*"token":"\([^"]*\)".*/\1/p');
A=$(curl -s -o /dev/null -w '%{http_code}' -X POST -H "Authorization: Bearer $TOK" -H 'Content-Type: application/json' -H 'Connect-Protocol-Version: 1' -d '{}' http://127.0.0.1/v1.Backrest/GetConfig); echo "no token: $U with token: $A"

The unauthenticated request returns 401, and the request with the token returns 200. This proves that authentication is enforced on the API:

no token: 401 with token: 200

Step 10 - Where your data lives

The Backrest configuration, its operation log and any local restic repositories live on a dedicated Azure data disk mounted at /var/lib/backrest, separate from the OS disk. The image captures this disk and re-provisions it on every VM. Confirm the mount and the filesystem:

df -h /var/lib/backrest | tail -1
findmnt -no SOURCE,TARGET,FSTYPE /var/lib/backrest

Security notes

  • Encrypt web traffic. Backrest serves plain HTTP on port 80. For production, put it behind your own TLS-terminating reverse proxy or an Azure Application Gateway with a certificate for your domain, and restrict port 80 in the NSG to trusted networks.
  • Keep the server private. The Backrest server listens on 127.0.0.1:9898 only and is never exposed directly. Only nginx on port 80 faces the network.
  • Protect the administrator password. Authentication is required on the API. The per-VM administrator password lives in /root/backrest-credentials.txt, readable only by root. If you wish, sign in and add or change users from Settings. Keep a copy of the password somewhere safe.
  • Guard your encryption passwords. Choose a strong, unique encryption password for every repository. restic encrypts all data at rest with it, and losing it means the backups cannot be recovered.
  • Keep the VM patched. The image is patched at build time and ships with unattended security upgrades enabled.

Support

SecureAnyCloud images come with 24/7 support. For questions about this Backrest image or help with your deployment, contact us through the SecureAnyCloud website.

Deploy on Azure

Launch Backrest on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure