2020-06-19 11:08:39 -04:00
---
type: howto
stage: Enablement
group: Distribution
2020-11-26 01:09:20 -05:00
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/#assignments
2020-06-19 11:08:39 -04:00
---
2021-01-28 01:08:59 -05:00
# Standalone Redis using Omnibus GitLab **(FREE SELF)**
2020-06-19 11:08:39 -04:00
The Omnibus GitLab package can be used to configure a standalone Redis server.
In this configuration, Redis is not scaled, and represents a single
point of failure. However, in a scaled environment the objective is to allow
the environment to handle more users or to increase throughput. Redis itself
is generally stable and can handle many requests, so it is an acceptable
trade off to have only a single instance. See the [reference architectures ](../reference_architectures/index.md )
page for an overview of GitLab scaling options.
2020-08-10 11:09:49 -04:00
## Set up the standalone Redis instance
2020-06-19 11:08:39 -04:00
The steps below are the minimum necessary to configure a Redis server with
Omnibus GitLab:
1. SSH into the Redis server.
1. [Download and install ](https://about.gitlab.com/install/ ) the Omnibus GitLab
package you want by using **steps 1 and 2** from the GitLab downloads page.
Do not complete any other steps on the download page.
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
```ruby
2020-08-10 11:09:49 -04:00
## Enable Redis and disable all other services
## https://docs.gitlab.com/omnibus/roles/
roles ['redis_master_role']
2020-06-19 11:08:39 -04:00
2020-08-10 11:09:49 -04:00
## Redis configuration
2020-06-19 11:08:39 -04:00
redis['bind'] = '0.0.0.0'
redis['port'] = 6379
2020-08-10 11:09:49 -04:00
redis['password'] = '< redis_password > '
2020-06-19 11:08:39 -04:00
2020-08-10 11:09:49 -04:00
## Disable automatic database migrations
## Only the primary GitLab application server should handle migrations
gitlab_rails['auto_migrate'] = false
2020-06-19 11:08:39 -04:00
```
1. [Reconfigure Omnibus GitLab ](../restart_gitlab.md#omnibus-gitlab-reconfigure ) for the changes to take effect.
1. Note the Redis node's IP address or hostname, port, and
2020-08-10 11:09:49 -04:00
Redis password. These will be necessary when [configuring the GitLab
application servers](#set-up-the-gitlab-rails-application-instance).
2020-06-19 11:08:39 -04:00
[Advanced configuration options ](https://docs.gitlab.com/omnibus/settings/redis.html )
are supported and can be added if needed.
2020-08-10 11:09:49 -04:00
## Set up the GitLab Rails application instance
On the instance where GitLab is installed:
1. Edit the `/etc/gitlab/gitlab.rb` file and add the following contents:
```ruby
## Disable Redis
redis['enable'] = false
gitlab_rails['redis_host'] = 'redis.example.com'
gitlab_rails['redis_port'] = 6379
## Required if Redis authentication is configured on the Redis node
gitlab_rails['redis_password'] = '< redis_password > '
```
1. Save your changes to `/etc/gitlab/gitlab.rb` .
1. [Reconfigure Omnibus GitLab ](../restart_gitlab.md#omnibus-gitlab-reconfigure ) for the changes to take effect.
2020-06-19 11:08:39 -04:00
## Troubleshooting
See the [Redis troubleshooting guide ](troubleshooting.md ).