Set username and password of PMM server via Docker env

I am automating an installation of PMM server, and want to add the clients automatically as well. In my case, this requires the server username and password.

With PMM v1 I could set the username and password in Docker with extra environment variables, using:

SERVER_USER
SERVER_PASSWORD

How do I set this for v2? I tried using the same values, but this doesn’t work.

The docs. don’t describe a way of setting this. It only describes ; browse to the web-gui and login using admin as username and password. Then change the password…

This is undesired in my situation, as I’d like to set the username and password automatically.

Hi, @kevinr1

Unfortunately, it’s not supported yet, we have task for it https://jira.percona.com/browse/PMM-4673

You can subscribe to this task to learn earlier about progress.

Grafana is used for handles authentication in PMM2 Server. So mentioned environment variables aren’t working yet.

You may use next command for changing an admin password.

docker exec -t pmm-server bash -c 'ln -s /srv/grafana /usr/share/grafana/data; grafana-cli --homepath /usr/share/grafana admin reset-admin-pass

word NEWPASSWD’

Thanks for both responses.

@adivinho, I can confirm your workaround works.

Hi,

Screen Shot 2021-10-21 at 1.06.36 PM
I can’t see the issue. How likely it’ll be possible to set a custom password?

1 Like

Not sure why that was set “Internal Only”…I changed it to world! I didn’t see anything sensitive in there.

1 Like