Chapter 3. Preparing your system to deploy Red Hat Quay


For a proof of concept Red Hat Quay deployment, you must configure port mapping, a database, and Redis prior to deploying the registry. Use the following procedures to prepare your system to deploy Red Hat Quay.

3.1. Configuring port mapping for Red Hat Quay

You can use port mappings to expose ports on the host and then use these ports in combination with the host IP address or host name to navigate to the Red Hat Quay endpoint.

Procedure

  1. Enter the following command to obtain your static IP address for your host system:

    $ ip a
    Copy to Clipboard Toggle word wrap

    Example output

    ---
        link/ether 6c:6a:77:eb:09:f1 brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.132/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp82s0
    ---
    Copy to Clipboard Toggle word wrap

  2. Add the IP address and a local hostname, for example, quay-server.example.com to your /etc/hosts file that will be used to reach the Red Hat Quay endpoint. You can confirm that the IP address and hostname have been added to the /etc/hosts file by entering the following command:

    $ cat /etc/hosts
    Copy to Clipboard Toggle word wrap

    Example output

    192.168.1.132 quay-server.example.com
    Copy to Clipboard Toggle word wrap

3.2. Configuring the database

Red Hat Quay requires a database for storing metadata. PostgreSQL is used throughout this document. For this deployment, a directory on the local file system to persist database data is used.

Use the following procedure to set up a PostgreSQL database.

Procedure

  1. In the installation folder, denoted here by the $QUAY variable, create a directory for the database data by entering the following command:

    $ mkdir -p $QUAY/postgres-quay
    Copy to Clipboard Toggle word wrap
  2. Set the appropriate permissions by entering the following command:

    $ setfacl -m u:26:-wx $QUAY/postgres-quay
    Copy to Clipboard Toggle word wrap
  3. Start the Postgres container, specifying the username, password, and database name and port, with the volume definition for database data:

    $ sudo podman run -d --rm --name postgresql-quay \
      -e POSTGRESQL_USER=quayuser \
      -e POSTGRESQL_PASSWORD=quaypass \
      -e POSTGRESQL_DATABASE=quay \
      -e POSTGRESQL_ADMIN_PASSWORD=adminpass \
      -p 5432:5432 \
      -v $QUAY/postgres-quay:/var/lib/pgsql/data:Z \
      registry.redhat.io/rhel8/postgresql-13
    Copy to Clipboard Toggle word wrap
  4. Ensure that the Postgres pg_trgm module is installed by running the following command:

    $ sudo podman exec -it postgresql-quay /bin/bash -c 'echo "CREATE EXTENSION IF NOT EXISTS pg_trgm" | psql -d quay -U postgres'
    Copy to Clipboard Toggle word wrap
    Note

    The pg_trgm module is required for the Quay container.

3.3. Configuring Redis

Redis is a key-value store that is used by Red Hat Quay for live builder logs.

Use the following procedure to deploy the Redis container for the Red Hat Quay proof of concept.

Procedure

  • Start the Redis container, specifying the port and password, by entering the following command:

    $ sudo podman run -d --rm --name redis \
      -p 6379:6379 \
      -e REDIS_PASSWORD=strongpassword \
      registry.redhat.io/rhel8/redis-6:1-110
    Copy to Clipboard Toggle word wrap
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat