> For the complete documentation index, see [llms.txt](https://ztrust.gitbook.io/ztrust-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ztrust.gitbook.io/ztrust-documentation/user-manual-ztrust-v4.2/2.-installation/2.1-docker-podman.md).

# 2.1 Docker/Podman

#### Local Container Engine such as Docker or Podman

This section provides instructions for running ZTrust SSO in a **Docker** or **Podman** environment.

1. **Before you start**\
   Before starting, ensure that Docker or Podman is installed on your system and you have downloaded the latest container image of the ZTrust SSO.

2. **Download the ZTrust SSO image**\
   To download the ZTrust container image, first you need to log in to the Prodevans’ container registry using docker login command.

3. **Save the Certificate & Key files**\
   Before running container image, save the certificate and key files in your system at your desired location.

4. To get the credentials, reach out to the ZTrust Team at <contact@ztrust.in>\
   Then use,

   ```shell
   docker pull <image-address>
   ```

5. **Start ZTrust SSO Container**\
   To start the ZTrust SSO container, execute the following command in your terminal:

   ```shell
   docker run -d -p 8443:8443 \
     -v <path/to/cert-files>:/opt/ZTrust/conf:ro \
     -e ZTRUST_ADMIN=admin \
     -e ZTRUST_ADMIN_PASSWORD=<pasword> \
     -e ZT_DB=postgres \
     -e ZT_DB_URL=jdbc:postgresql://<db-host:db-port>/<db-name> \
     -e ZT_DB_USERNAME=<db-username> \
     -e ZT_DB_PASSWORD=<db-password> \
     -e ZT_HTTPS_CERTIFICATE_FILE=/opt/ZTrust/conf/cert.crt \
     -e ZT_HTTPS_CERTIFICATE_KEY_FILE=/opt/ZTrust/conf/key.pem \
     -e ZT_HOSTNAME=<hostname> \
     <image-id:tag>
   ```

6. This command launches ZTrust SSO in your Docker or Podman environment. The admin console is accessible on port 8443 and establishes an initial admin user with the username "admin" and the password you set above in the command. **'path/to/cert-files'** is the location of your certificate and key files in your system.

7. **Log in to the Admin Console**\
   Go to the ZTrust Administration Console URL.\
   \
   Log in to the ZTrust Admin Console using the credentials that you created earlier. You will land on the “Master Realm” page, which is the default for a new installation of ZTrust SSO. To create a new realm and continue with other configurations, check the Realm Setup section.
