5

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

Ted
  • 365
  • 1
  • 7
  • 16

2 Answers2

7

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:

enter image description here

References

Yuci
  • 27,235
  • 10
  • 114
  • 113
1

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.

Space134
  • 13
  • 3