How to setup a standalone Minio Node on Ubuntu or Debian using Docker-Compose
Server Requirements
Minio’s offical requirements are .. a lot however I’ve managed to run it for the past several months in non-production on nodes with the following hardware.
vCPU: 1+
RAM: 512MB+ # 512MB+ Swap also needed)
HDD: 10GB+ # it's S3 storage, you'll want lots lets be real
Step 1 – Install docker & docker-compose
Firstly update your system, on Debian you can use the below command.
apt-get update && apt upgrade
Then install docker if it’s not already installed, I use typically use the docker install script found at github.com/docker/docker-install
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
After the script is complete, install docker-compose.
apt install docker-compose
Step 2 – Setup your directories & docker-compose file.
Start by creating a directory & the required subdirectories
mkdir /minio
mkdir /minio/data
CD into the newly created minio directory.
cd minio
Create the docker-compose file.
nano docker-compose.yml
Paste the following into it.
version: '3.3'
services:
minio:
image: docker.io/bitnami/minio:latest
ports:
- '9000:9000'
- '9001:9001'
volumes:
- /path/to/minio-persistence:/data
environment:
MINIO_ROOT_USER: your_username_here
MINIO_ROOT_PASSWORD: your_password_here
restart: unless-stopped
volumes:
minio_data:
driver: local
Edit the following variables as needed
/path/to/minio-persistence
MINIO_ROOT_USER:
MINIO_ROOT_PASSWORD:
Step 3 – Setting permissions for the persistent data folder
As this is using the Bitnami docker image for Minio, it will run as UID 1001 so you’ll need to make sure the mounted files and directories have the proper permissions for the UID 1001. There is a few ways to do this, the easiest I’ve found is the simple chown one-liner.
chown 1001 /path/to/minio-persistence
Step 4 – Starting the container
You should now be able to start the container, the easiest way is to ensure you’re working in the minio directory then running the following command.
docker-compose up -d
This will launch Minio in the background as a detached container. To check the container is running:
docker ps
Output:
root@vps:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
74cb45fc4bd7 bitnami/minio:latest "/opt/bitnami/scriptโฆ" 27 minutes ago Up 27 minutes 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp minio_minio_1
Step 5 – Signing in
Using a web browser navigate over to the IP address of your VPS/Server using port 9001 to access the WebUI.
192.168.0.1:9001
You should now be able to sign into the WebUI & start configuring access keys, buckets & more.
Final Notes
Congratulations on successfully installing Minio in a docker container, for easy SSL connections, you can setup a cloudflare tunnel with the below configurations using your own domain name.