mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
📖 docs: Update README.md (#189)
## Description Update the readme file ## Related Issues none ## Type of Change - [ ] Bug fix (non-breaking change) - [ ] New feature (non-breaking change) - [ ] Breaking change (fix or feature that changes existing functionality) - [x] Documentation update - [ ] Other (please describe): ## Checklist - [x] I have updated relevant documentation - [x] My code follows the project's coding style - [x] My changes generate no new warnings/errors ## Notes for Reviewers none ## Screenshots/Demo none ## Additional Context none <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Major overhaul of documentation structure and content for improved clarity, modern presentation, and ease of navigation. - Updated and expanded guides for installation, setup, architecture, and command-line interfaces. - Enhanced FAQ and troubleshooting sections with more comprehensive answers and technical details. - Added new guides for self-hosting with reverse proxy examples (Caddy, Traefik) and developer notes. - Improved theming, styling, and home page layout for the documentation site. - Simplified main README to a minimalistic project header and tagline. - Added new documentation files for Nestri Relay introduction and container CLI parameters. - Removed outdated or redundant documentation files and components to streamline content. - **Chores** - Updated, reorganized, or removed configuration files for dependencies, linting, and environment setup. - Switched to a new documentation theme and updated related project dependencies. - Removed Renovate configuration and ESLint config specific to docs app. - Adjusted TypeScript and package configurations for better compatibility. - **Style** - Improved dark mode support and visual consistency across documentation and components. - Introduced new Tailwind CSS theming and animation support for the documentation site. - **New Features** - Added example configuration files for deploying Nestri Relay with Caddy and Traefik reverse proxies. - Introduced new Tailwind CSS theming and animation support for the documentation site. - Added a new logo component supporting light/dark mode and optional title display. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Victor Pahuus Petersen <49293748+victorpahuus@users.noreply.github.com> Co-authored-by: Wanjohi <elviswanjohi47@gmail.com> Co-authored-by: DatCaptainHorse <DatCaptainHorse@users.noreply.github.com>
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
# 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,8 @@
|
||||
---
|
||||
title: What is Nestri Relay?
|
||||
description: This FAQ is made to address common questions about Nestri Node, the container which runs your games. Whether you're curious about compatibility, setup, or performance, you'll find answers to help you get started.
|
||||
icon: 'lucide:info'
|
||||
---
|
||||
|
||||
Nestri Relay is an essential component in the Nestri cloud-gaming ecosystem, responsible for taking the audio-video stream from your Nestri Node and further forwarding that to the device you’re playing on.
|
||||
It is built using WebRTC, for lowest latency streaming.
|
||||
@@ -1,20 +1,37 @@
|
||||
## Should I Self-Host a Nestri Relay?
|
||||
|
||||
If you want to use and enjoy the simplicity of the Nestri ecosystem, then you should not set up the Nestri Relay locally. Our free BYOG (Bring Your Own GPU) plan includes free shared relay access, which we highly recommend for those who want to start playing quickly on their own hardware without additional setup.
|
||||
|
||||
However, if you prefer to install and manage the Nestri Relay yourself, there are some important considerations to keep in mind.
|
||||
|
||||
### Important Considerations for Self-Hosting Nestri Relay
|
||||
|
||||
1. WebRTC and Firewall Issues
|
||||
* WebRTC, by default, attempts to access your public IP even if both the relay and Nestri Node are on the same local network.
|
||||
* This behavior can cause firewalls to block traffic, as the connection may attempt to access itself, resulting in connection failures.
|
||||
* Unordered Third
|
||||
2. Recommended Deployment Strategy
|
||||
* Instead of hosting the relay on your local network, we strongly recommend deploying the Nestri Relay on a VPS (Virtual Private Server) in the cloud.
|
||||
* Using a cloud-based VPS minimizes potential firewall conflicts and ensures a more stable connection between your Nestri Node and the relay.
|
||||
|
||||
If you're set on self-hosting despite the potential challenges, proceed with caution and ensure you have a proper understanding of firewall configurations and networking setups to mitigate connectivity issues.
|
||||
|
||||
## 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:
|
||||
For those who prefer full control over the Nestri stack, it is possible to self-host the Nestri Relay. However, setting this up can be a bit complex, as it requires 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.
|
||||
- **Let's Encrypt Certificate**: This is the most common certificates 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.
|
||||
- **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 and renewals, 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.
|
||||
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 using the BYOG package 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**.
|
||||
- The server should have at least **6-8GB RAM** and **2 vCPUs**.
|
||||
- Supports both ARM or AMD64 architecture.
|
||||
|
||||
2. **Software Requirements:**
|
||||
@@ -23,3 +40,127 @@ While self-hosting offers more flexibility, most users will find the **Nestri-ho
|
||||
|
||||
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.
|
||||
|
||||
## Self-hosted Nestri Relay with an Reverse Proxy
|
||||
|
||||
### Caddy
|
||||
As caddy user you can use the following docker-compose.yml file:
|
||||
|
||||
```yaml [docker-compose.caddy.yml]
|
||||
services:
|
||||
caddy:
|
||||
image: caddy:latest
|
||||
container_name: caddy
|
||||
ports:
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile # your caddyfile
|
||||
- ./cert:/etc/caddy/certs
|
||||
depends_on:
|
||||
- relay
|
||||
networks:
|
||||
- relay_network
|
||||
restart: unless-stopped
|
||||
|
||||
relay:
|
||||
#image: ghcr.io/nestrilabs/nestri/relay:nightly # Offical relay image
|
||||
image: ghcr.io/datcaptainhorse/nestri-relay:latest # Most current relay image
|
||||
container_name: relay
|
||||
environment:
|
||||
#- AUTO_ADD_LOCAL_IP=false # use with WEBRTC_NAT_IPS
|
||||
#- WEBRTC_NAT_IPS=1.2.3.4 # Add the LAN IP of your container here if connections fail
|
||||
- VERBOSE=true
|
||||
- DEBUG=true
|
||||
ports:
|
||||
- "8088:8088/udp"
|
||||
networks:
|
||||
- relay_network
|
||||
restart:
|
||||
unless-stopped
|
||||
networks:
|
||||
relay_network:
|
||||
driver: bridge
|
||||
```
|
||||
|
||||
The Caddyfile should look like this:
|
||||
```caddyfile [Caddyfile]
|
||||
relay.example.com {
|
||||
@ws {
|
||||
header Connection Upgrade
|
||||
header Upgrade websocket
|
||||
}
|
||||
tls you@example.com
|
||||
reverse_proxy @ws relay:8088
|
||||
reverse_proxy relay:8088
|
||||
}
|
||||
```
|
||||
|
||||
Please modify it to your needs and replace the placeholder values with your own.
|
||||
You should also setup the Caddyfile to match your domain.
|
||||
|
||||
### Traefik
|
||||
As traefik user you can use the following docker-compose.yml file:
|
||||
|
||||
```yaml [docker-compose.relay.traefik.yml]
|
||||
services:
|
||||
traefik:
|
||||
image: "traefik:v2.3"
|
||||
restart: always
|
||||
container_name: "traefik"
|
||||
networks:
|
||||
- traefik
|
||||
command:
|
||||
- "--api.insecure=true"
|
||||
- "--providers.docker=true"
|
||||
- "--providers.docker.network=traefik"
|
||||
- "--providers.docker.exposedbydefault=false"
|
||||
- "--entrypoints.web.address=:80"
|
||||
- "--entrypoints.web.http.redirections.entrypoint.to=web-secure"
|
||||
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
|
||||
- "--entrypoints.web-secure.address=:443"
|
||||
- "--certificatesresolvers.default.acme.tlschallenge=true"
|
||||
- "--certificatesresolvers.default.acme.email=foo@example.com" # Your email for tls challenge
|
||||
- "--certificatesresolvers.default.acme.storage=/letsencrypt/acme.json"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- "./letsencrypt:/letsencrypt" # Your letsencrypt folder for certificate persistence
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
restart:
|
||||
unless-stopped
|
||||
relay:
|
||||
#image: ghcr.io/nestrilabs/nestri/relay:nightly # Offical relay image
|
||||
image: ghcr.io/datcaptainhorse/nestri-relay:latest # Most current relay image
|
||||
container_name: relay
|
||||
environment:
|
||||
- AUTO_ADD_LOCAL_IP=false # Use with WEBRTC_NAT_IPS
|
||||
#- WEBRTC_NAT_IPS=1.2.3.4 # Add the LAN IP of your container here if connections fail
|
||||
- VERBOSE=true
|
||||
- DEBUG=true
|
||||
ports:
|
||||
- "8088:8088/udp"
|
||||
networks:
|
||||
- traefik
|
||||
restart:
|
||||
unless-stopped
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.relay.rule=Host(`relay.example.com`) # Your domain for tls challenge
|
||||
- traefik.http.routers.relay.tls=true
|
||||
- traefik.http.routers.relay.tls.certresolver=default
|
||||
- traefik.http.routers.relay.entrypoints=web-secure
|
||||
- traefik.http.services.relay.loadbalancer.server.port=8088
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
```
|
||||
|
||||
Please modify it to your needs and replace the placeholder values with your own.
|
||||
|
||||
### Where to find the relay compose files?
|
||||
|
||||
You will also find the relay compose files in our [github repository](https://github.com/nestrilabs/nestri/tree/main/containers).
|
||||
|
||||
|
||||
|
||||
|
||||
25
apps/docs/content/3.nestri-relay/3.container-cli.md
Normal file
25
apps/docs/content/3.nestri-relay/3.container-cli.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: Container CLI
|
||||
description: Configure and manage your Nestri Relay environment using CLI parameters for WebRTC settings, STUN servers, local IP handling, and TLS options.
|
||||
icon: 'lucide:terminal'
|
||||
---
|
||||
|
||||
The Nestri Relay CLI provides configuration parameters to manage your relay environment. These options allow you to set values like `WebRTC ports`, `STUN servers`, and `TLS certificates`. Additionally, you can enable `verbose` mode and debugging for troubleshooting purposes. This documentation details each parameter to help you optimize your relay setup effectively.
|
||||
|
||||
## Parameters
|
||||
|
||||
| **Parameter** | **Type** | **Default** | **Description** |
|
||||
|----------------------------------|-----------|------------------------------------|------------------------------------------------------------------------------------------------------|
|
||||
| `-v, --verbose` | `boolean` | false | Shows more logs; useful for debugging issues. Recommended before reporting problems. |
|
||||
| `-d, --debug` | `boolean` | false | Enables debugging mode for additional logs and troubleshooting insights. |
|
||||
| `-p, --endpointPort` | `integer` | 8088 | Specifies the main port for the relay endpoint. |
|
||||
| **WebRTC Settings** | | | |
|
||||
| `--webrtcUDPStart` | `integer` | 10000 | Defines the starting UDP port for WebRTC connections. |
|
||||
| `--webrtcUDPEnd` | `integer` | 20000 | Defines the ending UDP port for WebRTC connections. |
|
||||
| `--webrtcUDPMux` | `integer` | 8088 | Specifies the WebRTC UDP multiplexing port. |
|
||||
| `--stunServer` | `string` | stun.l.google.com:19302 | Defines the STUN server address for NAT traversal. |
|
||||
| `--autoAddLocalIP` | `boolean` | true | Automatically adds local IP addresses to WebRTC candidates. |
|
||||
| `--WEBRTC_NAT_IPS` | `string` | "" | Comma-separated list of public IPs for WebRTC NAT traversal (e.g., `"192.168.0.1,192.168.0.2"`). |
|
||||
| **TLS Configuration** | | | |
|
||||
| `--tlsCert` | `string` | "" | Path to the TLS certificate file for secure connections. |
|
||||
| `--tlsKey` | `string` | "" | Path to the TLS private key file for secure connections. |
|
||||
@@ -1,69 +0,0 @@
|
||||
## 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).
|
||||
@@ -1,42 +0,0 @@
|
||||
# ⚠️ 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_*
|
||||
```
|
||||
@@ -1,4 +0,0 @@
|
||||
## 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}
|
||||
@@ -1,2 +1,3 @@
|
||||
title: 'Nestri Relay'
|
||||
icon: heroicons-outline:bookmark-alt
|
||||
title: Nestri Relay
|
||||
navigation.redirect: /nestri-relay/what-is-nestri-relay
|
||||
icon: lucide:box
|
||||
Reference in New Issue
Block a user