Change Password Rundeck admin using docker-compose

2,538 views
Skip to first unread message

Kelvin Ferraz da Silva

unread,
Sep 10, 2020, 8:05:21 AM9/10/20
to rundeck-discuss
Hello,

I'm start use rundeck with docker-compose, but I need change the password default user to admin.

How i do that? What is the best and safest way?

Thanks

rac...@rundeck.com

unread,
Sep 10, 2020, 8:23:31 AM9/10/20
to rundeck-discuss

Hi Kevin,

I did an example overwriting the realm.properties file through COPY sentence on Dockerfile, take a look:

Dockerfile (with COPY sentence):

FROM rundeck/rundeck:3.3.2

COPY --chown=rundeck:root volume/realm.properties /home/rundeck/server/config

docker-compose.yml:

version: '3'

services:
  rundeckserver:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        url: http://localhost:4440
    ports:
      - "4440:4440"
    restart: always

Of course, you need a directory named “volume” with the “new” realm.properties file (with the “new password”, more info here):

#
# This file defines users passwords and roles for a HashUserRealm
#
# The format is
#  <username>: <password>[,<rolename> ...]
#
# Passwords may be clear text, obfuscated or checksummed.  The class 
# org.mortbay.util.Password should be used to generate obfuscated
# passwords or password checksums
#
# This sets the temporary user accounts for the Rundeck app
#
admin:YourNewPassword,user,admin
user:user,user

#
# example users matching the example aclpolicy template roles
#
#project-admin:admin,user,project_admin
#job-runner:admin,user,job_runner
#job-writer:admin,user,job_writer
#job-reader:admin,user,job_reader
#job-viewer:admin,user,job_viewer

To build: docker-compose build
To run: docker-compose up

Regards!

Kelvin Ferraz da Silva

unread,
Sep 10, 2020, 8:25:38 AM9/10/20
to rundeck-discuss
Nice!

I just did it and it worked.

But I have another question, if I need to create a new user and he wants to change the password himself how can I proceed with this?


Regards!

rac...@rundeck.com

unread,
Sep 10, 2020, 8:38:31 AM9/10/20
to rundeck-discuss
Good news then :-)

If you like to manage your users using the local login module, you need to add new users to the `realm.properties` file (like this). But the best way to manage users (and configure it dynamically) is to configure Rundeck against LDAP/Active Directory, take a look at this, and here a good docker-compose example. If you want to use some SSO solutions like OKTA or Ping take a look at this (only on Rundeck Enterprise).

Hope it helps!

Kelvin Ferraz da Silva

unread,
Sep 10, 2020, 9:31:45 AM9/10/20
to rundeck-discuss
Thanks

I take a look

Best,

Reply all
Reply to author
Forward
0 new messages