How to Install Minio on Debian Latest

Minio is an open-source, high-performance object storage system. It provides a cloud storage experience for developers and enterprises. Here's how to install Minio on Debian Latest:

Step 1: Update and Upgrade the System

Before starting, it is important to have the latest package list and perform system upgrades. Run the following commands in the terminal to update and upgrade the system.

sudo apt update
sudo apt upgrade -y

Step 2: Download Minio

The Minio package can be downloaded using the wget command.

wget https://dl.minio.io/server/minio/release/linux-amd64/minio

After downloading, make the downloaded package executable as follows:

chmod +x minio

Step 3: Create a System User for Minio

It is best to have a dedicated user to run the Minio service. This helps to isolate the service, and it also improves security.

sudo useradd -r minio-user -s /sbin/nologin 

Here, the -r flag creates a system user account, and /sbin/nologin means that the user will not have login access.

Step 4: Create Required Directories

Create the directories required for Minio to run.

sudo mkdir /etc/minio
sudo mkdir /usr/share/minio
sudo mkdir /var/minio-data

Here, the /etc/minio directory contains the configuration files and keys required by the Minio server. The /usr/share/minio directory is where the Minio service server binary is stored. The /var/minio-data directory is where the data will be stored.

Step 5: Configure Minio

Configure Minio by adding the access and secret keys to the configuration file.

sudo nano /etc/minio/minio.conf

A sample configuration file that includes the access key and secret key is shown below:

MINIO_ACCESS_KEY=minio-access-key
MINIO_SECRET_KEY=minio-secret-key
MINIO_VOLUMES="/var/minio-data"
# MINIO_OPTS="--address :9000"

Step 6: Create a Systemd Service Entry

Create a system entry to manage the running of the Minio server as a background service.

sudo nano /etc/systemd/system/minio.service

Add the following contents to the file:

[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target

[Service]
User=minio-user
Group=minio-user
EnvironmentFile=-/etc/minio/minio.conf
WorkingDirectory=/usr/share/minio
ExecStart=/usr/bin/env bash -c "(rm -f /tmp/minio.pid); /usr/share/minio/minio server $MINIO_OPTS $MINIO_VOLUMES"

# Let systemd restart this service always
Restart=always

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target

Save and close the file.

Step 7: Start the Minio Server Service

Reload the unit file so that SystemD will know of the new service.

sudo systemctl daemon-reload

After that, start the Minio server using the following command:

sudo systemctl start minio

Finally, enable the service to start on boot.

sudo systemctl enable minio

Conclusion

With these steps, Minio is now installed, configured, and started as a background system service on Debian Latest. You should now be able to access and interface with your new Minio server.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!