Skip to content

Configuration ​

ResticGUI reads config.yaml from the folder it starts in: /etc/resticgui with the Linux service, /opt in the Docker image and on Kubernetes. It is read once at start: restart ResticGUI after a change.

Repositories, schedules, retention, hooks and notifiers are not in this file: they are set in the web interface and kept in the database.

Settings ​

KeyDefaultWhat it does
server.ip127.0.0.1Address to listen on. 0.0.0.0 listens on every address: set a password first.
server.allowed_hosts[]Without a login, the host names the server answers to besides IP addresses and localhost, such as [backup.lan]. Other names are refused, so that a web page cannot reach the API through a domain that resolves to this machine (DNS rebinding). Not needed with a password.
server.port3001Port of the web interface and the API. The images use 3030.
store.pathresticgui.sqliteThe SQLite database, created on the first start.
store.key_fileresticgui.keyThe key that encrypts repository passwords and credentials, created on the first start. $RESTICGUI_SECRET_KEY (a base64 32-byte key) takes its place when set.
store.legacy_pathresticgui.dbA database of ResticGUI 0.1, imported once when store.path does not exist yet. "" turns the import off. See upgrading.
restic.binresticThe restic binary, a path or a name found in PATH. restic 0.17 or later.
jobs.workers2How many restic commands may run at once, across repositories. Each repository runs one at a time.
jobs.scheduletrueRun the schedules. false leaves only the jobs started by hand.
paths.roots[]Folders that may be backed up, browsed and restored into. Empty allows every path.
auth.usernameadminThe login name.
auth.password_hash""A bcrypt hash from resticgui hash-password. Empty turns the login off: anyone who reaches the server can use it.
hooks.commandsfalseAllow command hooks, which run with ResticGUI's rights. Webhooks need no setting.
metrics.enabledfalseServe Prometheus metrics at /metrics.
metrics.token""When set, /metrics needs Authorization: Bearer <token>.
logs.level10 debug, 1 info, 2 warnings, 3 errors only.
logs.debugfalseDebug logs, whatever logs.level says.

A complete file ​

yaml
logs:
  debug: false
  level: 1

server:
  ip: "127.0.0.1"
  port: 3001
  # host names the server is reached by without a login, besides IP
  # addresses and localhost; others are refused against DNS rebinding
  allowed_hosts: []

store:
  # SQLite database, created on the first start
  path: resticgui.sqlite
  # key that encrypts repository passwords and credentials; $RESTICGUI_SECRET_KEY wins
  key_file: resticgui.key
  # database of ResticGUI v0.1, imported once when path does not exist yet
  legacy_path: resticgui.db

restic:
  bin: restic

jobs:
  # how many restic commands may run at once (one per repository at most)
  workers: 2
  # run the backup, forget/prune and check schedules
  schedule: true

paths:
  # directories that may be backed up, restored into and browsed; empty allows all
  roots: []

auth:
  # leave password_hash empty to run without a login (only on a trusted network)
  # make a hash with: resticgui hash-password
  username: admin
  password_hash: ""

hooks:
  # allow command hooks, which run before and after backups with ResticGUI's
  # rights; webhooks need no setting. See https://docs.resticgui.com/features/hooks
  commands: false

metrics:
  # serve Prometheus metrics at /metrics. See https://docs.resticgui.com/features/metrics
  enabled: false
  # when set, scrapes must send "Authorization: Bearer <token>"
  token: ""

Environment ​

VariableWhat it does
RESTICGUI_SECRET_KEYThe encryption key, base64, instead of store.key_file: openssl rand -base64 32.
TZThe time zone of the schedules, such as Europe/Paris.
RESTIC_CACHE_DIRWhere restic keeps its cache; by default ~/.cache/restic.
HTTPS_PROXY, NO_PROXYA proxy for the cloud storages.
GIN_MODE=releaseQuieter HTTP logs; the images set it.

ResticGUI passes restic only the variables it needs (PATH, HOME, TZ, the cache, certificate and proxy settings, SSH_AUTH_SOCK) and the credentials of the repository at hand, never its own secrets.

Commands ​

CommandDoes
resticguiStarts the server.
resticgui versionPrints the version.
resticgui hash-passwordReads a password and prints its hash for auth.password_hash.
resticgui migrate-legacy -from OLD.db -to NEW.db [-key-file FILE]Imports a ResticGUI 0.1 database by hand.

Released under the GPL-3.0 license.