Docker deployment

Use the official BorgWarehouse docker image

  • Get the latest BorgWarehouse docker image from the docker hub.
docker pull borgwarehouse/borgwarehouse:latest
version: "3"
    container_name: borgwarehouse
    # If you want to build the image yourself and use it, uncomment the following lines and comment the image line
    #   context: .
    #   dockerfile: Dockerfile
    image: borgwarehouse/borgwarehouse
    # UID:GID must match the user and group ID of the host folders and must be > 1000
    user: "1001:1001"
      - "3000:3000"
      - "2222:22"
      - NEXTAUTH_SECRET=your-secret
      - CRONJOB_KEY=your-other-secret
      # The SSH_SERVER_PORT must match the port exposed above
      - SSH_SERVER_PORT=2222
      # The host folders must be owned by the user with UID and GID specified above
      - <host-folder>/config:/home/borgwarehouse/app/config
      - <host-folder>/ssh:/home/borgwarehouse/.ssh
      - <host-folder>/ssh_host:/etc/ssh
      - <host-folder>/repos:/home/borgwarehouse/repos
  # Apprise is used to send notifications, it's optional. http://apprise:8000 is the URL to use in BorgWarehouse.
    container_name: apprise
    image: caronc/apprise
    user: "www-data:www-data"
  • Create the 4 volumes on the host and adapt the permissions.
  • Launch the docker-compose file with docker-compose up -d.

Build your own docker image

Of course, you can build your own docker image.

Firstly, clone the repository and go to the docker directory. Then, build the image with the following command :

docker build -t borgwarehouse .