Sign inSign up

ralphpy/borgserver

By ralphpy

•Updated over 3 years ago

Alpine based image, running opensshd only serving borgbackup clients (amd64 & armv7)

Image
0

2.2K

ralphpy/borgserver repository overview

⁠BorgBackup⁠ docker image based on Alpine Linux⁠.

Image based on Nold360/borgserver. Adapted to Alpine Linux and able to run on various QNAP NAS devices (armv7 and amd64)

Alpine linux⁠ v3.17.3

BorgBackup⁠ v1.24

Running openssh-daemon only accessible by user "borg" using SSH-Publickey Auth & "borgbackup" as client. Backup-repositories, client's SSH-Keys and SSHd's Hostkeys will be stored in persistent storage. For every ssh-key added, a separate Borg repository will be created.

⁠Supported architecture(s):

  • amd64 (x86_64), armv7 (arm32v7)

⁠Container run example

docker run -td \
  -p 2222:22  \
  --volume ./borg/sshkeys:/sshkeys \
  --volume ./borg/backup:/backup \
  ralphpy/borgserver:latest

NOTE: "latest" tag will automatically select the correct architecture image

⁠Persistent Storage

Two persistent storage locations are needed for this container to be useful.

⁠/backup

This will be the root for all repositories.

⁠/sshkeys

This directory has two subdirectories:

⁠/sshkeys/clients/

This is where client SSH public keys need to go. Every key must be it's own file, containing only one line, with the key. The name of the file will also become the name of the Borg repository root for the particular client.

e.g.

cp client_id_rsa.pub /sshkeys/clients/myserver.mydomain.com

Now if you Initialize repo from client,

borg init ssh://borg@borgserver:my_first_repo

the repo location on server will be:

backup/myserver.mydomain.com/my_first_repo

!IMPORTANT!: Container does not start until there is at least one ssh-keyfile in this clients directory!

⁠/sshkeys/host/

This directory will be created on first run and contains the SSH-Hostkeys, enabling clients to verify them.


Tag summary

Content type

Image

Digest

sha256:444a78969…

Size

24.1 MB

Last updated

over 3 years ago

docker pull ralphpy/borgserver