Set Up Minio as Backup Storage for Zimly: A Step-by-Step Guide

Minio Object Storage is an open-source, S3-compatible object store. It comes with an API service and a web application that allows you to manage your buckets, access keys/secrets, and browse your media. If you’re looking for a self-hosted solution, look no further.

Minio’s service offering is targeted at large-scale use cases, so it might not be the best fit for private backup solutions.

Prerequisites

We will set up a local Minio server using Docker. This guide is not intended for setting up a Minio server on internet-facing appliances.

Before you begin, make sure to:

Docker compose

We will automate the Minio setup, including key/secret creation, policy assignment, and bucket creation, using the following docker-compose.yml file.

services:
  zimly-minio:
    image: minio/minio
    ports:
      - "9000:9000"
      - "9001:9001"
    environment:
      - MINIO_ROOT_USER=zimly
      - MINIO_ROOT_PASSWORD=zimlypwd
    command: minio server /data --console-address ":9001"
    volumes:
      - ./local-data:/data

  zimly-minio-init:
    image: minio/mc
    depends_on:
      - zimly-minio
    entrypoint: >
      /bin/sh -c '
          mc alias set zimly-minio http://zimly-minio:9000 zimly zimlypwd;
          if [ -n "$(mc ls zimly-minio)" ]; then
              echo "Bucket found... skipping creation of bucket and user"
          else
              echo "Creating bucket and user..."
              mc mb --ignore-existing zimly-minio/2024-zimly;
              mc admin user add zimly-minio zimly-user zimly-pwd;
              mc admin policy attach zimly-minio readwrite --user=zimly-user;
          fi
      '      

Start the services with docker compose up

Finalizing Your Backup Setup in zimly

Now, let’s put everything together and finalize the backup setup in zimly. We’ll create a new configuration to back up the Pictures folder.

Name: Zimly Docker bucket
URL: http://localhost:9000
Key: zimly-user
Secret: zimly-pwd
Bucket: 2024-zimly

Folder: Pictures

You can access the web console with the same key/secret on http://localhost:9001.