---
title: "Docker: Setting the initial database credentials"
description: When using a Docker image, set the database credentials using UNIX environment variables. Specify the environment variables as command-line options in the docker run command.
component: pingauthorize
version: 11.0
page_id: pingauthorize:pingauthorize_server_administration_guide:paz_docker_set_db_creds
canonical_url: https://docs.pingidentity.com/pingauthorize/11.0/pingauthorize_server_administration_guide/paz_docker_set_db_creds.html
revdate: April 28, 2025
section_ids:
  steps: Steps
  example: Example
---

# Docker: Setting the initial database credentials

When using a Docker image, set the database credentials using UNIX environment variables. Specify the environment variables as command-line options in the `docker run` command.

## Steps

* In the `docker run` command, specify the desired following environment variables using the `--env` command-line option:

  * `--dbAdminUsername`

  * `--dbAdminPassword`

  * `--dbAppUsername`

  * `--dbAppPassword`

## Example

This example initializes the policy database with the admin credentials `admin`/ `Passw0rd` and the application credentials `app`/ `S3cret`. Also, it uses the Ping DevOps image.

|   |                                                                                                                                                                                                                                      |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|   | Specify a separate volume to store the policy database to perform future upgrades. See [Deploying the Policy Editor using Docker](../installing_and_uninstalling_pingauthorize/paz_install_server_pe_docker.html#pe_install_docker). |

|   |                                                                                                                                                                                                                                           |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | For proper communication between containers, create a Docker network using a command such as `docker network create --driver <network_type> <network_name>`, and then connect to that network with the `--network=<network_name>` option. |

```shell
$ docker run --network=<network_name>  \
  --env PING_DB_ADMIN_USERNAME=admin \
  --env PING_DB_ADMIN_PASSWORD=Passw0rd \
  --env PING_DB_APP_USERNAME=app \
  --env PING_DB_APP_PASSWORD=S3cret \
    pingidentity/{PAP_CONTAINER_NAME}
```
