Service Amazon S3 is a cloud storage web service offered by Amazon Web Services (AWS). Amazon S3 provides object storage through web services interfaces.
Uses of S3 include web hosting, image hosting, and storage for backup systems.
These services offered by Amazon they are usually an excellent proposal for web masters since many tend to occupy the hosting of images in order to reduce the requests to the server itself and in this way to be able to deliver faster webs.
Although costs are affordable and managed (in the case of image storage) the cost for requestsThat is, every time someone enters your website and you have, for example, an image hosted on amazon, it charges you every time that image is loaded with your entire website.
In the case of enthusiasts who are just starting, this can represent a minimal economic expense, since the visits they usually receive (requests) are not many and what you will spend on Amazon is little.
Although not all of them also have a capital or in addition to that for personal projects or for any reason it is not worth disbursing.
In the case of those who use WordPress, they can use a similar service offered by the guys who develop this CMS With the help of the Jetpak plug-in, here the “extension” is called “Photon”.
Although for the taste of many it is not a good implementation, (I include myself). This is where this excellent alternative that we will see today comes into play.
About Minio
Minio is a self-hosted solution to create your own object storage. It is an alternative for AWS S3.
The software of Minio is delivered as a simple binary and even the official documentation suggests that they use it that way, instead of using a package manager. Of course there are Docker images if you want to use them to run minio on your VPS.
Minio is more suitable for storing unstructured datasuch as photos, videos, log files, backups, and container / VM images. The size of an object can vary from a few KB to a maximum of 5 TB.
The Minio server is light enough to be bundled with the application stack, similar to NodeJS, Redis, and MySQL.
How to install Minio on Ubuntu?
In order to use this excellent service we are going to type the following commands to be able to implement Minio in our system.
First we are going to download and install the binary on the system:
sudo useradd --system minio-user --shell /sbin/nologin curl -O https://dl.minio.io/server/minio/release/linux-amd64/minio sudo mv minio /usr/local/bin sudo chmod +x /usr/local/bin/minio sudo chown minio-user:minio-user /usr/local/bin/minio
Now Minio needs to start with system reboot and recognized by the OS as a running service.
sudo mkdir /usr/local/share/minio sudo mkdir /etc/minio sudo chown minio-user:minio-user /usr/local/share/minio sudo chown minio-user:minio-user /etc/minio
Inside the / etc / default directory we need to create a minio file to specify environment variables such as the port number that we will listen to and the directory where the data should be saved.
Let's to create a file in / etc / default / minio and add the following content inside it:
sudo nano /etc/default/minio MINIO_VOLUMES="/usr/local/share/minio/" MINIO_OPTS="-C /etc/minio --address tu-dominio.com:443"
You must edit "your-domain" for the domain or subdomain that you will assign especially to minio:
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/minio curl -O https://raw.githubusercontent.com/minio/minio-service/master/linux-systemd/ minio.service sudo mv minio.service /etc/systemd/system sudo systemctl daemon-reload sudo systemctl enable minio
Now we are going to implement the TLS certificates with certbot:
sudo apt update sudo apt-get install software-properties-common sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install certbot sudo certbot certonly --standalone -d tu-dominio.com --staple-ocsp -m tu@correoelectronico.com --agree-tos cp /etc/letsencrypt/live/minio.ranvirslog.com/fullchain.pem /etc/minio/certs/public.crt cp /etc/letsencrypt/live/minio.ranvirslog.com/privkey.pem /etc/minio/certs/private.key chown minio-user:minio-user /etc/minio/certs/public.crt chown minio-user:minio-user /etc/minio/certs/private.key
Finally We are going to start the service and check that everything is working correctly:
sudo service minio start sudo service minio status
At the end of the output they should receive something similar to this:
https://tu-dominio.com
XXXAAAXXXAAA XXAAAXX….
Where the latter will be your access codes, where the longest is the secret key to be able to enter the Minio web service.
You must enter the domain or subdomain that you assigned to minio from your web browser.
https://tu-dominio-minio.com