Question: How to set the default admin password for Galaxy Docker?
0
gravatar for steve
2.1 years ago by
steve • 30
NYC
steve • 30 wrote:

In the documentation it shows how to set the default admin email and API key at startup;

docker run -p 8080:80 \
    -e "GALAXY_CONFIG_ADMIN_USERS=albert@einstein.gov" \
    -e "GALAXY_CONFIG_MASTER_API_KEY=83D4jaba7330aDKHkakjGa937" \
    -e "GALAXY_CONFIG_BRAND='My own Galaxy flavour'" \
    bgruening/galaxy-stable

However I cannot find anything for how to set the default password. I have search online, and have searched the Galaxy config .ini files and was not able to find this field. And after setting an admin password using this method, I cannot figure out what the corresponding password is when you log in through Galaxy. Any suggestions? Thanks.

admin galaxy docker • 1.2k views
ADD COMMENT • link • modified 2.1 years ago by Devon Ryan • 1.9k • written 2.1 years ago by steve • 30
0
gravatar for Devon Ryan
2.1 years ago by
Devon Ryan • 1.9k
Germany
Devon Ryan • 1.9k wrote:

That's probably not what you want to do. I think, at least, that the admin users work by assigning admin privileges to a user that already exists. So the $GALAXY_CONFIG_ADMIN_USERS needs to already be present in the database.

ADD COMMENT • link written 2.1 years ago by Devon Ryan • 1.9k

OK thanks. I am trying to start a fresh Galaxy Docker instance and have the admin username & password already set upon starting the container for the first time. Is that not possible?

ADD REPLY • link written 2.1 years ago by steve • 30

You'd likely need to modify the startup script to run one of the add user scripts. I have a Dockerfile that I've customized to modify the startup script (in my case, to add the galaxy user to various groups), so it's certainly possible to do.

ADD REPLY • link written 2.1 years ago by Devon Ryan • 1.9k

We also provide a few utility scripts that creates these users for you at run-time. The question here is a little bit if you want to create users via run- or build-time.

ADD REPLY • link written 2.1 years ago by Bjoern Gruening ♦ 5.1k

for the moment, I am looking to setup the admin usernames & passwords upon running the container, though the latter would also be useful when I eventually start building my own containers. Are there links to the scripts?

ADD REPLY • link written 2.1 years ago by steve • 30

I see the section in the Dockerfile (line 180-191, starting at # Configure PostgreSQL) where the admin user is being added to the database, is this what you meant by setting the admin user at build time? I tried exporting the GALAXY_DEFAULT_ADMIN_USER and GALAXY_DEFAULT_ADMIN_PASSWORD environment variables when running the container but it did not work. I guess because it did not update the database?

ADD REPLY • link written 2.1 years ago by steve • 30

The mail addresses you pass in via environment variabales needs to be valid users. So if you start your fresh instance with GALAXY_CONFIG_ADMIN_USERS=foo@bar.org make sure to create this user afterwards, for example with the web-interface.

https://github.com/galaxyproject/galaxy/blob/dev/config/galaxy.ini.sample#L947

Hope this helps, Bjoern

ADD REPLY • link written 2.1 years ago by Bjoern Gruening ♦ 5.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 177 users visited in the last hour