Run MinIO as Daemon

Ana Jessica
featurepreneur
Published in
2 min readFeb 8, 2022

MinIO is an open-source distributed object storage server, designed for Private Cloud infrastructure providing S3 storage functionality.

It is the best server suited for storing unstructured data such as photos, videos, log files, backups, and containers.

To create applications using MinIO, refer here:

To Run MinIO in the background:

Local Environment

  • To run the command in the background, add the ampersand symbol (&) at the end of the command
MINIO_ROOT_USER=admin MINIO_ROOT_PASSWORD=password minio server ./data{1...5} --console-address :9001 &
  • The shell job ID (surrounded with brackets) and process ID will be printed on the terminal
  • To terminate the background process, use the kill a command followed by the process ID
kill -9 <process_id>

In EC2 Instance / after the shell exits

  • Create a python file
import osos.system ("MINIO_ROOT_USER=admin MINIO_ROOT_PASSWORD=password minio server ./data{1...5} --console-address :9001")
  • Run the file with ‘nohup command’
nohup python <filename.py> &
  • The nohup command means “no hang-up”. It executes the command such that it ignores the HUP (hangup) signal and therefore the process does not stop when the terminal is closed.

Using docker

  • Running docker in detached mode
sudo docker run -d  \
-p 9000:9000 \
-p 9001:9001 \
-e "MINIO_ROOT_USER=<ACCESS_KEY>"
-e "MINIO_ROOT_PASSWORD=<PASS_KEY>" \
quay.io/minio/minio server /data --console-address ":9001"

Hope you had fun learning!

--

--