Change port 3000

Hello,

I used Metabase in my entreprise. I installed it following the documentation. I can access with the port 3000. But my manager wants to change the port.

I used the command “export MB_JETTY_PORT=” but it doesnt work:

image

I’m on Windows Server 2012.

Thanks for your help

Hi NicolasDa, good morning!

Try using it this way:
java -DMB_JETTY_PORT = 12345 -jar metabase.jar

Hug,

1 Like

Hello Lourival, thanks for your answer !

I finally foun the informations alone :
export is a command for Linux so I searched the equivalent with Windows : it’s “SET”

So the command to change the port 3000 with windows is :

SET MB_JETTY_PORT= PORTNUMBER

Hello @NicolasDa
Very good, this one I didn’t know!
what I sent you, tested it here and it worked…but at runtime. Already the one that you quote, seems to change permanently, correct?

Thank you and success there!

Hi

Using this command is like installing a new metabase on that port.

How would it be done if I already have a mint base where I have already created several boards?

@santiago.vidal Without knowing how you're running Metabase, then it's difficult to tell.
You can set the environment variable MB_JETTY_PORT=3000 in multiple ways (without creating a new instance):
https://www.metabase.com/docs/latest/operations-guide/environment-variables.html

I have a test environment with ubunto server, for now it is local, the idea is then to apply it to the production server, but I also tried this command on the production server and it still didn't work.

I have already set the variable, but it doesn't work for me either.

@santiago.vidal You have to use the EnvironmentFile, just like all your other environment variables:
https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-debian.html

You cannot just change port to 443. It requires sudo access for ports below 1024. That's how Linux works.
You should use a reverse-proxy like Nginx if you want that to manage certificates.

Do you have a video explaining how to do it?