> For the complete documentation index, see [llms.txt](https://docs.coherence.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherence.io/hosting/self-hosting.md).

# Self-Hosting

### What is Self-Hosting?

Self-hosting is when you take on the responsibility of launching, managing and scaling replication servers using your own server infrastructure. [coherence Cloud](/hosting/coherence-cloud.md) offers a secure and comprehensive solution for hosting Replication Servers but if you already have server capacity, and the technical capability, you might consider this option.

{% hint style="info" %}
Using the replication server for self hosting requires special licensing, please contact <devrel@coherence.io> for more info.
{% endhint %}

{% hint style="warning" %}
Self hosting presumes reasonably deep knowledge of how coherence works, specifically around the difference between rooms and world mode in the replication server and how the client connects to a replication server.
{% endhint %}

### Launching the Replication Server

Similar to [local development](/hosting/self-hosting/rooms-mode.md), self hosting relies on launching the [Replication Server](/manual/replication-server.md) application in either [world](/hosting/self-hosting/world-mode.md) or [rooms](/manual/replication-server/rooms-and-worlds.md#rooms) mode using command line options:

`replication-server (world|rooms) [options]`

Which options to use and other settings depend on which mode is selected. See [World ](/manual/replication-server/rooms-and-worlds.md#worlds)and [Rooms ](/manual/replication-server/rooms-and-worlds.md#rooms)for more info.

The SDK includes binaries of the replication server suitable for 64 bit systems:

* Windows (10/11)
* Darwin (universal)
* Linux (intel and ARM)

These binaries are found in the SDK package **Runtime\~** folder.

### Monitoring

Once the ReplicationServer is launched, it can be [monitored](/hosting/self-hosting/monitoring.md) for health and a variety of metrics can be scraped to provide performance information. Also, the Replication Server provides logs to both the **stdout** and **stderr** channels.

### Managing Replication Server Resources

The memory monitoring system uses the `GOMEMLIMIT` environment variable. Before running the Replication Server, export `GOMEMLIMIT=4096MiB` to set the limit. The system has two thresholds:

* High at 85%
* Critical at 95%

As soon as you hit the high threshold, new client connections will be rejected.
