[Enhancement]: Allow backup configuration via environment variables #2919

Open
opened 2026-04-25 00:11:50 +02:00 by adam · 0 comments
Owner

Originally created by @CrazyVito11 on GitHub (Jul 27, 2025).

Type of Enhancement

Server Backend

Describe the Feature/Enhancement

I like to configure all my docker containers as much as possible using version management, and Audiobookshelf is one of them.

Now creating automatic backups is also important in case something happens to the database or physical hardware. To configure this, I had to write some documentation on how to configure this properly in my configuration repository.

It would be much nicer if I could just pre-configure this inside the docker-compose file using environment variables. Currently only BACKUP_PATH is supported, but it would be really nice if the backup frequency, backups to keep and backup size limit to also be configurable via environment variables.

Why would this be helpful?

This would save me from having to do manual configurations in case I ever want to change the limit or have to reinstall Audiobookshelf on another machine.

Future Implementation (Screenshot)

services:
  audiobookshelf:
    image: ghcr.io/advplyr/audiobookshelf:2.26.3
    restart: unless-stopped
    volumes:
      - ./backup:/backup
      - ./data/audiobooks:/audiobooks
      - ./data/podcasts:/podcasts
      - ./data/config:/config
      - ./data/metadata:/metadata
    environment:
      - BACKUP_PATH=/backup # This one currently already exists
      - BACKUP_FREQUENCY="59 23 * * *"
      - BACKUP_FILES_TO_KEEP=30
      - BACKUP_FILE_SIZE_LIMIT=1G

Audiobookshelf Server Version

v2.26.3

Current Implementation (Screenshot)

No response

Originally created by @CrazyVito11 on GitHub (Jul 27, 2025). ### Type of Enhancement Server Backend ### Describe the Feature/Enhancement I like to configure all my docker containers as much as possible using version management, and Audiobookshelf is one of them. Now creating automatic backups is also important in case something happens to the database or physical hardware. To configure this, I had to write some documentation on how to configure this properly in my configuration repository. It would be much nicer if I could just pre-configure this inside the docker-compose file using environment variables. Currently only `BACKUP_PATH` is supported, but it would be really nice if the backup frequency, backups to keep and backup size limit to also be configurable via environment variables. ### Why would this be helpful? This would save me from having to do manual configurations in case I ever want to change the limit or have to reinstall Audiobookshelf on another machine. ### Future Implementation (Screenshot) ```yaml services: audiobookshelf: image: ghcr.io/advplyr/audiobookshelf:2.26.3 restart: unless-stopped volumes: - ./backup:/backup - ./data/audiobooks:/audiobooks - ./data/podcasts:/podcasts - ./data/config:/config - ./data/metadata:/metadata environment: - BACKUP_PATH=/backup # This one currently already exists - BACKUP_FREQUENCY="59 23 * * *" - BACKUP_FILES_TO_KEEP=30 - BACKUP_FILE_SIZE_LIMIT=1G ``` ### Audiobookshelf Server Version v2.26.3 ### Current Implementation (Screenshot) _No response_
adam added the enhancement label 2026-04-25 00:11:50 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2919