Ethan G
Ethan G

Reputation: 101

How to change port number when hosting minio server?

I am currently working on a project where I am attempting to use MinIO with a data moving program developed by my company. This broker software only allows for devices using port 80 to successfully complete a job; however, any avid user of MinIO knows that MinIO hosts on port 9000. So my question is, is there a way to change the port on which the MinIO server is hosted? I've tried looking through the config.json file to find an address variable to assign a port number to but each of the address variables I attempted to change had no effect on the endpoint port number. For reference, I am hosting MinIO on a windows 10 virtual machine during the test phase of the project and will be moving it onto a dedicated server (also windows 10) upon successful completion of testing.

Upvotes: 10

Views: 28358

Answers (4)

Brook
Brook

Reputation: 159

you can config env variables by editing the /etc/default/minio file. For example, to modify the WebUI port (default 9001) and the endpoint port (default 9000), you can adjust the MINIO_OPTS item in this file. Here's how you might change the WebUI port to 19001 and the endpoint port to 19000, modify it as follows

MINIO_OPTS=' --console-address=":19001" --address=":19000" '

hope this helps

Upvotes: 1

Jamil Noyda
Jamil Noyda

Reputation: 3649

As per minio official documentation, you can Update/Create an environment file at /etc/default/minio and update the environment variable called MINIO_OPTS


# Set all MinIO server options
#
# The following explicitly sets the MinIO Console listen to address to
# port 9001 on all network interfaces. The default behavior is dynamic
# port selection.

MINIO_OPTS="--console-address :9001"

you can update the port value of the console-address argument.

restart the service using the below command

sudo systemctl restart minio.service

verify wheather port has been changed or not using the below command

sudo systemctl status minio.service

Upvotes: 1

Dan Grant
Dan Grant

Reputation: 1

When you start the minio server use the following command…

minio server start --address :[port you want to use]

for example…

minio server start --address :8000

Upvotes: 0

s123unny
s123unny

Reputation: 141

Add --address :80 when you start your minio. You can refer to this: https://docs.min.io/docs/multi-tenant-minio-deployment-guide.html

Upvotes: 14

Related Questions