selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Restic logo

Self-host Restic

v0.19.1

Fast, encrypted, deduplicated command-line backup tool

ReleaseOpen SourceBSD-2-Clause
apt-get install restic
Updated4 months ago
LanguageGo
Setup difficultyModerate
Stars
37 231
Docker
restic/restic

What is Restic?

restic is a command-line backup program for people who want to protect their own files on disks, servers or object-storage buckets without running a backup service. Each run writes a snapshot into an encrypted repository, splits content into chunks so unchanged data is never uploaded twice, and deduplicates across several hosts sharing one repository. Snapshots can be listed, browsed through a FUSE mount, diffed, restored selectively, verified with the check command, and trimmed by keep-last retention policies followed by pruning; they can also be copied between repositories. Repositories can live on a local directory, over SFTP, on a REST server, on S3 and S3-compatible storage, OpenStack Swift, Backblaze B2, Azure Blob Storage, Google Cloud Storage, or on many other services through rclone. Installation is a distro package, an official reproducible binary, or a minimal container image on Docker Hub and ghcr.io; restic runs when invoked rather than as a daemon, so scheduling is left to cron, systemd or Task Scheduler. It is written in Go under the BSD 2-Clause licence, is free of charge and completely open source, but remains pre-1.0, so breaking changes are still possible between releases even though the project follows semantic versioning for the repository format.

Restic alternatives

Should you self-host Restic?

Restic scores 82/100 on selfhost.directory (how scoring works) and ranks #1 of 46 in Backup. It has 37 231 GitHub stars, +743 in the last 30 days.

It shipped 2 stable releases in the past year. The latest, v0.19.1, came out on 5 July 2026. New versions land roughly every 4 weeks.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is BSD-2-Clause-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is kopia (75/100, 14 685 stars). Restic scores higher overall. See Restic vs kopia side by side.

Features

  • Append-only mode supportRequires an append-only capable backend such as rest-server or rclone serve restic.
  • Compression
  • Copy snapshots between repositories
  • Deduplication
  • Encrypted, authenticated backups
  • Include and exclude patterns
  • Incremental snapshots
  • JSON output for scripting
  • Mount repository via FUSE
  • Multiple repository keys or passwords
  • Multiple Storage Backends
  • Repository integrity verification
  • Retention policies and pruning
  • Self-update
  • Snapshot restore

Restic README

Documentation Build Status Go Report Card

Introduction

restic is a backup program that is fast, efficient and secure. It supports the three major operating systems (Linux, macOS, Windows) and a few smaller ones (FreeBSD, OpenBSD).

For detailed usage and installation instructions check out the documentation.

You can ask questions in our Discourse forum.

Quick start

Once you've installed restic, start off with creating a repository for your backups:

How to install Restic

Install Restic with Docker

Environment variables
NICE, IONICE_CLASS, IONICE_PRIORITY, RESTIC_REPOSITORY, RESTIC_PASSWORD

A minimal Docker image with just a few files and the restic binary is available; you can get it with docker pull like this:

$ docker pull restic/restic

The container is also available on the GitHub Container Registry:

$ docker pull ghcr.io/restic/restic

Restic relies on the hostname for various operations. Make sure to set a static hostname using --hostname when creating a Docker container, otherwise Docker will assign a random hostname each time.

The container runs restic on demand (for example `docker run -e NICE=20 -e IONICE_CLASS=2 -e IONICE_PRIORITY=7 ghcr.io/restic/restic`); it is not a long-running server.

How to configure Restic

  • RESTIC_REPOSITORYLocation of the repository; replaces the -r flag.
  • RESTIC_REPOSITORY_FILEName of a file holding the repository location; replaces --repository-file.
  • RESTIC_PASSWORDThe repository password itself.
  • RESTIC_PASSWORD_FILELocation of a password file; replaces --password-file.
  • RESTIC_PASSWORD_COMMANDCommand that prints the repository password to stdout; replaces --password-command.

Restic releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

Are “cold storages” supported?

Not natively, though experimental support exists for restoring from S3 Glacier and Glacier Deep Archive; expect slow restores and treat the feature as alpha.

Restic backup command fails to find a valid file in Windows

A file whose name contains an invalid Windows character cannot be read by restic, so rename that file.

How do I choose a strong password?

Length matters most, combined with complexity and randomness; tools such as OpenSSL, pwgen or KeePass can generate one.

Why does restic perform so poorly on Windows?

Real-time antivirus scanning often interferes; test by disabling it temporarily and otherwise add the restic binary to your scanner's exclusions.

Creating new repository on a Synology NAS via sftp fails

Synology appears to expose a different directory tree over sftp, so use an absolute path as seen via sftp and try dropping the /volume1 prefix.

How to prioritize restic’s IO and CPU time

Wrap the process with ionice for IO scheduling class and nice for CPU scheduling priority, which you can combine to keep the host responsive during backups.

How can I specify encryption passwords automatically?

Supply it non-interactively via --password-file or through the RESTIC_PASSWORD, RESTIC_PASSWORD_FILE or RESTIC_PASSWORD_COMMAND environment variables, taking care that the secret is not exposed in the process list.

I ran a restic command but it is not working as intended, what do I do now?

Print the arguments your shell actually passed to restic (for example with ruby -e 'puts ARGV.inspect' before the command) to see how quoting, tilde and glob expansion were handled.

restic check reports packs that aren’t referenced in any index, is my repository broken?

No, that is uncritical leftover data, usually duplicates left by an interrupted backup or upload; running restic prune cleans it up.

Will restic resume an interrupted backup?

Yes - index files are written periodically during the run, so re-running uploads only what is still missing. The file list does have to be rescanned because no parent snapshot existed yet.

More in Backup

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…