Using https for minio server [closed]
Asked Answered
B

3

6

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

Blakley answered 15/6, 2018 at 15:17 Comment(0)
K
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

Kafka answered 15/3, 2019 at 11:54 Comment(1)
Is there a way to use other that 443 port and still enable https?Parada
X
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.

Xhosa answered 11/2, 2022 at 10:15 Comment(0)
O
0

If you are using minio-go client, then you can set SSL_CERT_FILE=/path/to/ca.crt

Ordzhonikidze answered 13/11, 2023 at 23:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.