---
schema_version: "1"
id: 6de854453c5ea833a84c952ca2c11defd39b1cc79c5cf9ce7ec386fb170be82f
title: Configuring Replicas for Omni Gateway in Local Mode
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/latest/local-rep-run.md
canonical_url: https://docs.mulesoft.com/gateway/latest/local-rep-run
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8bab9498c65041ecf58adfbe530f1aa9d2f1c4b79a96fbaf6a3eaa696994c3c3
description: MuleSoft Documentation Site
release: "1.14"
latest: true
---
---
product: Omni Gateway
version: 1.14
is-latest-version: true
---

# Configuring Replicas for Omni Gateway in Local Mode

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

<table><colgroup><col> <col></colgroup><tbody><tr><td><div><div><p><span><a href="#add-an-omni-replica-as-a-linux-service"><img src="https://docs.mulesoft.com/gateway/latest/_images/install-linux-logo.png" alt="20%" width="20%"></a></span></p></div></div></td><td><div><div><p><span><a href="#docker"><img src="https://docs.mulesoft.com/gateway/latest/_images/install-docker-logo.png" alt="25%" width="25%"></a></span></p></div></div></td></tr><tr><td><div><div><p><a href="#add-an-omni-replica-as-a-linux-service">Add an Omni Replica as a Linux Service</a></p></div></div></td><td><div><div><p><a href="#docker">Add an Omni Replica in a Docker Container</a></p></div></div></td></tr></tbody></table>

## Omni Replicas

An Omni Replica is an instance of Omni Gateway. Setting up your gateway layer with multiple Omni
Gateway replicas enables the APIs deployed on Omni Gateway to serve more traffic.

When using Omni Gateway to manage APIs in production, configure more than one Omni Replica to avoid
a single point of failure. Running multiple Omni Replicas also increases performance if your API
service receives a significant amount of traffic.

## Before You Begin

Before getting started, ensure you have completed the following tasks:

- [Install an Omni Gateway](https://docs.mulesoft.com/gateway/latest/install)

- [Register and Run in Local Mode](https://docs.mulesoft.com/gateway/latest/local-reg-run)

## Add an Omni Replica as a Linux Service

Adding an Omni Replica as a Linux Service includes the following tasks:

- Copy and paste the registration file created during registration to your Linux machine or VM.

- Run the Omni Gateway start command.

### Copy the Registration File

Copy the `registration.yaml` file to the following location on your Linux machine or VM:

- `/usr/local/share/mulesoft/flex-gateway/conf.d`

### Start Commands

Start Omni Gateway with the following command:

```ssh
sudo systemctl start flex-gateway
```

Verify that the Omni Gateway service is running successfully:

```ssh
systemctl list-units flex-gateway*
```

If `flex-gateway.service` has a status of `active`, Omni Gateway is successfully running.

```text
  UNIT                              LOAD   ACTIVE SUB     DESCRIPTION
  flex-gateway.service              loaded active running Application
```

## Add an Omni Replica in a Docker Container

To add an Omni Replica in a Docker Container you must run the Omni Gateway start command using the
same `registration.yaml` file created during registration. If you are running the container locally,
you will also need to use a different port.

```ssh
docker run --rm \
-v "$(pwd)":/usr/local/share/mulesoft/flex-gateway/conf.d \
-p 8080:8080 \
mulesoft/flex-gateway
```

> [!NOTE] Specify an optional name you want to assign to your Omni Replica by including the
> following: `-e FLEX_NAME=<name-for-flex-replica> \`.
