info:To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
---
# Configure GitLab using an external PostgreSQL service
# Configure GitLab using an external PostgreSQL service
If you're hosting GitLab on a cloud provider, you can optionally use a
If you're hosting GitLab on a cloud provider, you can optionally use a
info:To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
type:reference
type:reference
---
---
# Configuring PostgreSQL for scaling
# Configuring PostgreSQL for scaling
In this section, you'll be guided through configuring a PostgreSQL database to
In this section, you'll be guided through configuring a PostgreSQL database to
be used with GitLab in one of our [Scalable and Highly Available Setups](../reference_architectures/index.md).
be used with GitLab in one of our [reference architectures](../reference_architectures/index.md).
There are essentially three setups to choose from.
There are essentially three setups to choose from.
## PostgreSQL replication and failover with Omnibus GitLab **(PREMIUM ONLY)**
## PostgreSQL replication and failover with Omnibus GitLab **(PREMIUM ONLY)**
info:To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
info:To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
---
# PostgreSQL replication and failover with Omnibus GitLab **(PREMIUM ONLY)**
# PostgreSQL replication and failover with Omnibus GitLab **(PREMIUM ONLY)**
This document will focus only on configuration supported with [GitLab Premium](https://about.gitlab.com/pricing/), using the Omnibus GitLab package.
This document focuses on configuration supported with [GitLab Premium](https://about.gitlab.com/pricing/), using the Omnibus GitLab package.
If you are a Community Edition or Starter user, consider using a cloud hosted solution.
If you're a Community Edition or Starter user, consider using a cloud hosted solution.
This document will not cover installations from source.
This document doesn't cover installations from source.
If a setup with replication and failover is not what you were looking for, see
If a setup with replication and failover isn't what you were looking for, see
the [database configuration document](https://docs.gitlab.com/omnibus/settings/database.html)
the [database configuration document](https://docs.gitlab.com/omnibus/settings/database.html)
info:To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
---
# Standalone PostgreSQL using Omnibus GitLab **(CORE ONLY)**
# Standalone PostgreSQL using Omnibus GitLab **(CORE ONLY)**
If you wish to have your database service hosted separately from your GitLab
If you wish to have your database service hosted separately from your GitLab
application server(s), you can do this using the PostgreSQL binaries packaged
application servers, you can do this using the PostgreSQL binaries packaged
together with Omnibus GitLab. This is recommended as part of our
together with Omnibus GitLab. This is recommended as part of our
[reference architecture for up to 2,000 users](../reference_architectures/2k_users.md).
[reference architecture for up to 2,000 users](../reference_architectures/2k_users.md).
## Setting it up
## Setting it up
1. SSH into the PostgreSQL server.
1. SSH into the PostgreSQL server.
1.[Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
1.[Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
package you want using **steps 1 and 2** from the GitLab downloads page.
package you want using *steps 1 and 2* from the GitLab downloads page.
- Do not complete any other steps on the download page.
- Do not complete any other steps on the download page.
1. Generate a password hash for PostgreSQL. This assumes you will use the default
1. Generate a password hash for PostgreSQL. This assumes you will use the default
username of `gitlab` (recommended). The command will request a password
username of `gitlab` (recommended). The command will request a password