keycloak-scim/server_admin/topics/initialization.adoc

76 lines
2.4 KiB
Text
Raw Normal View History

2016-05-13 01:04:47 +00:00
[id="creating-first-admin_{context}"]
== Creating the first administrator
2016-05-13 01:04:47 +00:00
After installing {project_name}, you need an administrator account that can act as a _super_ admin with full permissions to manage all parts of {project_name}. With this account, you can log into the {project_name} Admin Console where you create realms and users and register applications that are secured by {project_name}.
2016-05-13 01:04:47 +00:00
.Prerequisites
2016-05-13 01:04:47 +00:00
* Perform the installation and configuration tasks defined in the link:{installguide_link}[{installguide_name}] to the point that the {project_name} server is running.
=== Creating the account on the local host
If your server is accessible from `localhost`, perform these steps.
.Procedure
. In a web browser, go to the http://localhost:8080{kc_base_path} URL.
. Supply a username and password that you can recall.
+
.Welcome page
image:{project_images}/initial-welcome-page.png[Welcome Page]
2016-05-13 01:04:47 +00:00
=== Creating the account remotely
2016-05-13 01:04:47 +00:00
ifeval::["{kc_dist}" == "quarkus"]
If you cannot access the server from a `localhost` address, or just want to start {project_name} from the command line, use the `KEYCLOAK_ADMIN` and `KEYCLOAK_ADMIN_PASSWORD` environment variables to create an initial admin account.
For example:
[source,bash]
----
export KEYCLOAK_ADMIN=<username>
export KEYCLOAK_ADMIN_PASSWORD=<password>
bin/kc.[sh|bat] start
----
endif::[]
ifeval::["{kc_dist}" == "wildfly"]
If you cannot access the server from a `localhost` address, or just want to start {project_name} from the command line, use the `.../bin/add-user-keycloak` script.
2016-05-13 01:04:47 +00:00
.Add-user-keycloak script
2017-08-28 12:50:14 +00:00
image:{project_images}/add-user-script.png[]
2016-05-13 13:39:56 +00:00
The parameters are a little different depending if you are using the standalone operation mode or domain operation mode. For standalone mode, here is how you use the script.
2016-05-13 13:39:56 +00:00
.Linux/Unix
[source]
----
$ .../bin/add-user-keycloak.sh -r master -u <username> -p <password>
----
.Windows
[source]
----
> ...\bin\add-user-keycloak.bat -r master -u <username> -p <password>
----
For domain mode, you have to point the script to one of your server hosts using the `-sc` switch.
.Linux/Unix
[source]
----
$ .../bin/add-user-keycloak.sh --sc domain/servers/server-one/configuration -r master -u <username> -p <password>
----
.Windows
[source]
----
> ...\bin\add-user-keycloak.bat --sc domain/servers/server-one/configuration -r master -u <username> -p <password>
----
endif::[]
2016-05-13 01:04:47 +00:00