Skip to content

Commit

Permalink
docs(docs): 📝 Add information about alternative ssh-key management
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherStranger committed May 17, 2023
1 parent b63d026 commit bc2d276
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# docker-borg-backup

A dockerized Borg Backup server. For more information about Borg Backup, an
excellent de-duplicating backup, refer to: <https://www.borgbackup.org/>
excellent de-duplicating backup, refer to: <https://www.borgbackup.org/>.

## Usage

**TL;DR**: pull the docker image from docker hub or ghcr, set the ssh-key
variable `BORG_AUTHORIZED_KEYS`, and mount volumes to `/home/borg/backups` and
`/var/lib/docker-borg`. Once the container is up and running you can start
creating backups with following Repo url:
`ssh://borg@<host or ip>:<port>/./backups/<your_repo>`
`ssh://borg@<host or ip>:<port>/./backups/<your_repo>`.

### Docker run

Expand Down Expand Up @@ -52,20 +52,20 @@ volumes:
<!-- markdownlint-disable -->
| Path | Description |
| --------------------------------- | ---------------------------------------------------------------------------------------- |
|-----------------------------------|------------------------------------------------------------------------------------------|
| `/home/borg/backups` | All backups will be in this volume |
| `/var/lib/docker-borg` | This volume persists the hosts ssh-keys across updates |
| `/home/borg/.ssh/authorized_keys` | As an alternative to the variable `BORG_AUTHORIZED_KEYS` you can mount the file directly |
<!-- markdownlint-enable -->
### Environment variables

<!-- markdownlint-disable -->
| Variable | Description | Example |
| ---------------------------- | -------------------------------------- | ---------------------- |
| `BORG_AUTHORIZED_KEYS` | Public ssh keys for backups. Required. | `<key-one>\n<key-two>` |
| `BORG_UID` | UID for the backup user. | `1000` |
| `BORG_GID` | GID for the backup user. | `1000` |
| `BORG_SERVE_ADDITIONAL_ARGS` | Additional CMD args to borg serve | `--append-only` |
| Variable | Description | Example |
|------------------------------|-----------------------------------------------------------------------------------|------------------------|
| `BORG_AUTHORIZED_KEYS` | Public ssh keys for backups. Use either this Variable or the authorized_key file. | `<key-one>\n<key-two>` |
| `BORG_UID` | UID for the backup user. | `1000` |
| `BORG_GID` | GID for the backup user. | `1000` |
| `BORG_SERVE_ADDITIONAL_ARGS` | Additional CMD args to borg serve | `--append-only` |
<!-- markdownlint-enable -->

### Important Notes
Expand Down

0 comments on commit bc2d276

Please sign in to comment.