# Create a user for WildFly Server

Published 2022-12-03

This tutorial shows you how we can create a new user for the WildFly application server. In my example I will create an application user, but in the same manner you can create a management user as well.

In order to create a new user for the WildFly Application Server, you can use the add-user.bat (on Windows) or add-user.sh (on Linux):

Here is the code for the image above:


What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): b

Enter the details of the new user to add.
Using realm 'ApplicationRealm' as discovered from the existing property files.
Username : applowner
Password :
Re-enter Password :
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]:
About to add user 'applowner' for realm 'ApplicationRealm'
Is this correct yes/no? yes
Added user 'applowner' to file 'C:\Java\wildfly-10.0.0.Final\standalone\configuration\application-users.properties'
Added user 'applowner' to file 'C:\Java\wildfly-10.0.0.Final\domain\configuration\application-users.properties'
Added user 'applowner' with groups to file 'C:\Java\wildfly-10.0.0.Final\standalone\configuration\application-roles.properties'
Added user 'applowner' with groups to file 'C:\Java\wildfly-10.0.0.Final\domain\configuration\application-roles.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="YXBwbA=="/>
Press any key to continue . . .


After that, you can run this script again (add-user.bat/ add-user.sh) if you want to make some configuration change to this user (to change the password for the instance).