'Using https for minio server
I am trying to get a minio server to run on https but everytime i try to run it i get the following error:
{"level":"FATAL","time":"2018-06-15T15:12:19.2189519Z","error":{"message":"The
parameter is incorrect.","source":["cmd\\server-main.go:225:cmd.serverMain()"]}}
I have followed the following guide: https://docs.minio.io/docs/how-to-secure-access-to-minio-server-with-tls
And tried to generate my own certificate but nothing seems to work... I placed the certificates inside the .minio/certs folder and named them public.crt and private.key. I have tried to re-generate the certs over and over again but I am still getting that error message... If anyone can point me in the right direction, i would greatly appropriate it
Solution 1:[1]
Step 1: you can generate the SSL Certificate if you don't have one, for example:
sudo mkdir -p /tmp/.minio/certs
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/.minio/certs/private.key -out /tmp/.minio/certs/public.crt
Step 2: run Minio sever secured by HTTPS. Here I'm using Docker with docker-compose:
docker-compose.yaml:
version: '3'
services:
minio:
image: minio/minio
command: server --address ":443" /data
ports:
- "443:443"
environment:
MINIO_ACCESS_KEY: "YourAccesskey"
MINIO_SECRET_KEY: "YourSecretkey"
volumes:
- /tmp/minio/data:/data
- /tmp/.minio:/root/.minio
Note: here assume that you have a directory on your host, called /tmp/minio/data. If you don't, create it: mkdir -p /tmp/minio/data
Now start the container: docker-compose up
That's it.
Check: You can access your Minio server via HTTPS, see below:
References
Solution 2:[2]
if you using sudo you must have private.key and public.crt in /root/.minio/certs/. In my case, I must rename my minio.key and minio.crt because minio doesn't want to use them.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yuci |
| Solution 2 | Space134 |

