diff --git a/apps/docs/content/2.nestri-node/3.getting-started.md b/apps/docs/content/2.nestri-node/3.getting-started.md index ad973fed..1d8007ac 100644 --- a/apps/docs/content/2.nestri-node/3.getting-started.md +++ b/apps/docs/content/2.nestri-node/3.getting-started.md @@ -3,6 +3,44 @@ ::alert{type="danger"} Nestri is in a **very early-beta phase**, so errors and bugs may occur. :: + + +## Step 1: Navigate to Your Game Directory +First, change your directory to the location of your `.exe` file. For Steam games, this typically means: +```bash +cd $HOME/.steam/steam/steamapps +ls -la . +``` +### Step 2: Generate a Session ID +Create a unique session ID using the following command: +```bash +echo "$(head /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | head -c 16)" +``` +This command generates a random 16-character string. Be sure to note this string carefully, as you'll need it for the next step. +### Step 3: Launch the Nestri Server +With your SESSION_ID ready, insert it into the command below, replacing `` with your actual session ID. Then, run the command to start the Nestri server: +``` +docker run --gpus all --device=/dev/dri --name nestri -it --entrypoint /bin/bash -e SESSION_ID= -v "$(pwd)":/game -p 8080:8080/udp --cap-add=SYS_NICE --cap-add=SYS_ADMIN ghcr.io/nestriness/nestri/server:nightly +``` +> \[!TIP] +> +> Ensure UDP port 8080 is accessible from the internet. Use `ufw allow 8080/udp` or adjust your cloud provider's security group settings accordingly. +### Step 4: Configure the Game within the Container +After executing the previous command, you'll be in a new shell within the container (example: `nestri@3f199ee68c01:~$`). Perform the following checks: +1. Verify the game is mounted by executing `ls -la /game`. If not, exit and ensure you've correctly mounted the game directory as a volume. +2. Then, start the Nestri server by running `/etc/startup.sh > /dev/null &`. +### Step 5: Running Your Game +Wait for the `.X11-unix` directory to appear in `/tmp` (check with `ls -la /tmp`). Once it appears, you're ready to launch your game. +- With Proton-GE: `nestri-proton -pr .exe` +- With Wine: `nestri-proton -wr .exe` +### Step 6: Begin Playing +Finally, construct the play URL with your session ID: +``` +echo "https://nestri.io/play/$SESSION_ID" +``` +Navigate to this URL in your browser, click on the page to capture your mouse pointer, and start playing! + +