Skip to content

Instantly share code, notes, and snippets.

@Jabb0
Last active September 9, 2023 11:53
Show Gist options
  • Save Jabb0/81f9a3153941ffd2c3998c0954bad6d7 to your computer and use it in GitHub Desktop.
Save Jabb0/81f9a3153941ffd2c3998c0954bad6d7 to your computer and use it in GitHub Desktop.
Dockerized Borgbackup
command="borg serve --restrict-to-path /mounted_backups/backup_bla/" ssh-rsa <pubkey>
version: "2.1"
services:
server:
image: borgbackup:latest
hostname: borgbackupserver
environment:
# Used because of file system permissions of mounted storage
- PUID=<UID>
- PGID=<GID>
# SSH username
- USER_NAME=borgbackup
- TZ=Europe/Berlin
# public key that is allowed. Multiple possible. See linuxserver/openssh-server
- PUBLIC_KEY=<SSH pub key> # e.g. ssh-rsa ABCDEF...
- SUDO_ACCESS=false #optional
- PASSWORD_ACCESS=false #optional
ports:
- 3333:3333 # Port you like
restart: unless-stopped
volumes:
# Where to store the backups
- "/volume1/BorgBackups:/mounted_backups:rw"
FROM linuxserver/openssh-server:latest
RUN apk add borgbackup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment