mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
Documentation for Nestri (#116)
I have made documentation for Nestri, so everybody easy can find instructions to get started. It will also make it easier for people to help contribute to the documentation. The documentation is built with Nuxt3, [Docus ](https://github.com/nuxt-themes) which uses Nuxt Content.  
This commit is contained in:
committed by
GitHub
parent
bae089e223
commit
390ee2ac0f
@@ -0,0 +1,9 @@
|
||||
# What is Nestri Relay?
|
||||
|
||||
Nestri Relay is an essential component in the Nestri cloud-gaming ecosystem, responsible for transporting the video gameplay stream from your Nestri Node to the device you’re playing on. It is built on the moq-rs protocol, designed for efficient and smooth video transmission, ensuring a low-latency gaming experience.
|
||||
|
||||
By default, your Nestri Node will connect to the Nestri-hosted Relay, which we manage and is available for all users. This is the simplest and most straightforward option, requiring no additional configuration on your end.
|
||||
## ⚠️ Important Note
|
||||
|
||||
We recommend not installing Nestri Node on your primary PC if you only intend to use it over a weekend. This is because Nestri Node cannot run simultaneously with Xorg, the display server responsible for managing the graphical user interface (GUI). This means that while Nestri Node is running, you will not be able to use an attached screen. For this reason, Nestri Node is best set up on a dedicated machine that won’t be used for other tasks.
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
## Self-hosted Nestri Relay
|
||||
|
||||
For those who prefer full control over their infrastructure, it is possible to self-host the Nestri Relay. However, setting this up can be a bit complex, as it requires generating SSL certificates for secure communication between your Nestri Node and your gaming devices. There are three main options:
|
||||
|
||||
- **Let's Encrypt Certificate**: This is the **recommended option** for self-hosting and requires a domain name. You can generate a certificate using tools like **certbot** or **acme.sh**. Let's Encrypt provides free SSL certificates that are trusted by most browsers and are relatively straightforward to set up.
|
||||
|
||||
- **Purchased SSL Certificate**: The **easiest option** for most users is to buy an SSL certificate from a trusted Certificate Authority (CA). This option eliminates much of the hassle involved with certificate generation, as these certificates are already trusted by browsers and don’t require as much manual setup.
|
||||
|
||||
While self-hosting offers more flexibility, most users will find the **Nestri-hosted Relay** to be the easiest and most reliable option for getting started with cloud gaming on Nestri. This hosted relay is available to everyone and requires no configuration.
|
||||
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. **Server Requirements:**
|
||||
- Ensure **port 443** is open for both **TCP and UDP** (`:443/udp & :443/tcp`).
|
||||
- The server should have at least **4GB RAM** and **2 vCPUs**.
|
||||
- Supports both ARM or AMD64 architecture.
|
||||
|
||||
2. **Software Requirements:**
|
||||
- Docker and `docker-compose` must be installed on the server. You can use [this installation script](https://github.com/docker/docker-install) to set up Docker.
|
||||
- Git must be installed to clone the necessary repository.
|
||||
|
||||
3. **Certificates:**
|
||||
- You will need both private and public SSL certificates. It is recommended to use certificates from a **trusted Certificate Authority** (CA), either by using **Let's Encrypt** or purchasing a commercial SSL certificate, for secure communication. Avoid using self-signed certificates, as they can lead to compatibility issues and security warnings in browsers.
|
||||
69
apps/docs/content/3.nestri-relay/3.deploy-moq.md
Normal file
69
apps/docs/content/3.nestri-relay/3.deploy-moq.md
Normal file
@@ -0,0 +1,69 @@
|
||||
## Installation Steps
|
||||
|
||||
### Step 1: Clone the Repository
|
||||
|
||||
Clone the `kixelated/moq-rs` repository to your local machine:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/kixelated/moq-rs moq
|
||||
```
|
||||
|
||||
### Step 2: Verify Port Availability
|
||||
|
||||
Check if port 443 is already in use on your server:
|
||||
|
||||
```bash
|
||||
sudo netstat -tulpn | grep ':443' | grep LISTEN
|
||||
```
|
||||
or
|
||||
```bash
|
||||
sudo lsof -i -P -n | grep LISTEN | grep 443
|
||||
```
|
||||
|
||||
If you find any processes using port 443, consider terminating them.
|
||||
|
||||
### Step 3: Configure Ports
|
||||
|
||||
Navigate to the cloned directory and edit the Docker compose file to use port 443:
|
||||
|
||||
```bash
|
||||
cd moq
|
||||
vim docker-compose.yml
|
||||
```
|
||||
|
||||
Change the ports section from lines 34 to 35 to:
|
||||
|
||||
```yaml
|
||||
ports:
|
||||
- "443:443"
|
||||
- "443:443/udp"
|
||||
```
|
||||
|
||||
### Step 4: Prepare Certificates
|
||||
|
||||
Copy your generated certificates into the `moq/dev` directory and rename them:
|
||||
|
||||
```bash
|
||||
cp cert.pem moq/dev/localhost.crt
|
||||
cp key.pem moq/dev/localhost.key
|
||||
```
|
||||
|
||||
### Step 5: Start Docker Instances
|
||||
|
||||
Ensure you are in the root directory of the `moq` project, then start the Docker containers:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
### Step 6: Link Domain to Server IP
|
||||
|
||||
Configure your DNS settings to connect your server's IP address to your domain:
|
||||
|
||||
```
|
||||
Record Type: A
|
||||
Subdomain: relay.fst.so
|
||||
IP Address: xx.xxx.xx.xxx
|
||||
```
|
||||
|
||||
Congratulations, your MoQ server is now set up! You can verify its functionality by using the [MoQ Checker](https://nestri.pages.dev/moq/checker).
|
||||
42
apps/docs/content/3.nestri-relay/4.advanced-users.md
Normal file
42
apps/docs/content/3.nestri-relay/4.advanced-users.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# ⚠️ Advanced users
|
||||
|
||||
## Generating an SSL Certificate for Nestri Relay
|
||||
|
||||
This guide is for developers and advanced users who wish to self-host Nestri Relay. We strongly discourage this setup for general users due to its complexity, particularly when it comes to configuring SSL certificates correctly. Using a self-signed certificate or manually generating certificates can lead to issues with browser compatibility and security warnings, making it difficult to ensure a smooth experience.
|
||||
|
||||
For most users, we highly recommend using the **Nestri-hosted Relay**, which requires no manual setup and is ready to use out of the box.
|
||||
|
||||
---
|
||||
|
||||
## Generating an SSL Certificate Using Terraform
|
||||
|
||||
If you still wish to proceed with self-hosting, we recommend using Terraform to generate a valid SSL certificate. This method provides a secure, automated way to obtain the necessary certificates for Nestri Relay.
|
||||
|
||||
### Usage
|
||||
|
||||
1. **Update the `terraform.tfvars`** file with your domain and email.
|
||||
2. Run the following command to initialize the Terraform working directory:
|
||||
|
||||
```bash
|
||||
terraform init
|
||||
```
|
||||
```bash
|
||||
terraform plan
|
||||
```
|
||||
```bash
|
||||
terraform apply
|
||||
```
|
||||
The configuration provides two sensitive outputs:
|
||||
```bash
|
||||
certificate_pem: The full certificate chain
|
||||
private_key_pem: The private key for the certificate
|
||||
```
|
||||
|
||||
These can be then be used in your `moq-relay` as it requires SSL/TLS certificates.
|
||||
|
||||
## Note
|
||||
The generated certificate and key files are saved locally and ignored by git:
|
||||
```git
|
||||
.terraform
|
||||
relay_*
|
||||
```
|
||||
4
apps/docs/content/3.nestri-relay/5.moq-tester.md
Normal file
4
apps/docs/content/3.nestri-relay/5.moq-tester.md
Normal file
@@ -0,0 +1,4 @@
|
||||
## MOQ Tester
|
||||
Test your Nestri Relay, with our MOQ tester tool.
|
||||
|
||||
:button-link[Try MOQ Test Tool]{size="small" icon="IconStackBlitz" href="https://nestri.pages.dev/moq/checker" blank}
|
||||
2
apps/docs/content/3.nestri-relay/_dir.yml
Normal file
2
apps/docs/content/3.nestri-relay/_dir.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
title: 'Nestri Relay'
|
||||
icon: heroicons-outline:bookmark-alt
|
||||
Reference in New Issue
Block a user