# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coherence.io/hosting/self-hosting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
