Docs
circleci.com
Start Building for Free

Configuring External Services

2 weeks ago1 min read
Server v4.x
Server Admin
On This Page
  • PostgreSQL
  • Best practices for PostgreSQL
  • Backing Up PostgreSQL
  • MongoDB

This page describes how to configure external services for use with a CircleCI server v4.x installation.

PostgreSQL

If you choose to use an external PostgreSQL instance, add the following to your values.yaml file.

postgresql:
  internal: false
  postgresqlHost: <domain> # The domain or IP address of your PostgreSQL instance
  postgresqlPort: <port> # The port of your PostgreSQL instance

Best practices for PostgreSQL

Consider running at least two PostgreSQL replicas to allow recovery from primary failure and for backups. The table below shows the recommended specifications for PostgreSQL machines:

# of Daily Active Users# of PostgreSQL ReplicasCPURAMDiskNIC Speed

<50

2

8 Cores

16 GB

100 GB

1 Gbps

50 - 250

2

8 Cores

16 GB

200 GB

1 Gbps

250 - 1000

3

8 Cores

32 GB

500 GB

10 Gbps

1000 - 5000

3

8 Cores

32 GB

1 TB

10 Gbps

5000+

3

8 Cores

32 GB

1 TB

10 Gbps

Backing Up PostgreSQL

PostgreSQL provides official documentation for backing up and restoring your PostgreSQL 12 install, which can be found here.

We strongly recommend the following:

  • Taking daily backups.

  • Keeping at least 30 days of backups.

  • Using encrypted storage for backups as databases might contain sensitive information.

  • Performing a backup before each upgrade of CircleCI server.

MongoDB

If you choose to use an external MongoDB instance, add the following to your values.yaml file.

mongodb:
  internal: false
  hosts: <hostname:port> # this can be a comma-separated list of multiple hosts for sharded instances
  ssl: <ssl-enabled>
  # If using an SSL connection with custom CA or self-signed certs, set this
  # to true
  tlsInsecure: false
  # Any other options you'd like to append to the MongoDB connection string.
  # Format as query string (key=value pairs, separated by &, special characters
  # need to be URL encoded)
  options: <additional-options>
  auth:
    database: <authentication-source-database
    mechanism: SCRAM-SHA-1

Help make this document better

This guide, as well as the rest of our docs, are open source and available on GitHub. We welcome your contributions.

Need support?

Our support engineers are available to help with service issues, billing, or account related questions, and can help troubleshoot build configurations. Contact our support engineers by opening a ticket.

You can also visit our support site to find support articles, community forums, and training resources.