How to set up a remote game-streaming server for Moonlight

Discover how to configure a remotely accessible game-streaming server on Windows, macOS, and Linux using Meshnet.

A game-streaming server allows you to start a game instance on a dedicated machine and play it from other client devices. Such configuration can help overcome operating system and hardware limitations and enjoy various games on devices that can’t run them natively.

While the app combination can be used hassle-free on the local area network (LAN), the remote gaming option is available only by configuring port forwarding or complicated network setups. By supplementing the game-streaming setup with Meshnet, you can easily connect your remote devices to a single network and enjoy your games over a fast and encrypted network tunnel.

For a quick visual overview, check out the video below:

If you prefer a text-based approach, follow the written instructions that explain how you can turn your device into a VPN gaming server using Sunshine and play remotely using the Moonlight client.

Before you begin

Make sure that your server’s hardware and software fit the system requirements provided on the Sunshine documentation page.

Configure the Sunshine server

Start your setup process by configuring the Sunshine server.

Installing Sunshine

Begin by installing Sunshine on the machine that will function as your game server.

  1. Visit the Releases page of the Sunshine GitHub repository.

  2. Download the Windows installer file for the latest available version.

  3. Launch the downloaded file. If the Microsoft Defender SmartScreen window shows up, select More info and click Run anyway.

  4. Follow the instructions presented by the installation wizard.

  5. Click Finish to complete the process and close the installer window.

Starting Sunshine

After installing Sunshine, you need to initialize the server app and access its web user interface (UI), where all of the settings are located.

  1. Launch Sunshine. It will open the https://localhost:47990/ URL in your default internet browser.

  2. Enter your preferred Sunshine username and password and click Login.

  3. Once the page reloads, log in using your newly created account credentials.

Note

You may see a “Your connection is not private” message because Sunshine is using a self-signed SSL certificate. To proceed further, click Advanced > Proceed to localhost (unsafe).

Importing games

Once you access the Sunshine web UI, you can import the games you want to play on other remote devices. The steps may vary slightly depending on the OS you use and the games you want to add. For this example, a game from Steam on Windows will be imported to the Sunshine library.

  1. On the Sunshine web interface, select the Applications section.

  2. Click Add new.

  3. Fill in the following fields:

    • In the Application name field, type in the name of the game you want to import.

    • In the Command field, enter a command to initialize the game’s executable file.

      • For Windows: cmd /c <file_name.exe>

      • For macOS and Linux: <file_name>

    • In the Working directory field, enter the path of the game’s folder on your system. Example

  4. Click Save.

The game is now added to your Sunshine server library, and client devices will be able to play it remotely .

Note

You can find more detailed guidelines for adding games and apps to your server’s library on the Sunshine documentation page.

Set up the Moonlight client

Once the Sunshine server is running and you have added your desired games, you can install the Moonlight game-streaming client on all devices connecting to the server.

Installing Moonlight

On devices running desktop operating systems, you can get the Moonlight client installer files from the “Downloads” section of the Moonlight PC GitHub repository.

On mobile devices, you can download the Moonlight client from the following sources:

Pairing with the Sunshine server

To establish a connection between your Sunshine server and the Moonlight client, you need to pair the devices. While Moonlight automatically scans for servers in your LAN, you need to manually add your remote Meshnet server.

  1. Open Moonlight.

  2. In the upper-right corner, select the computer icon. Alternatively, you can press Ctrl + N on your keyboard.

  3. In the new dialog, enter the Nord name of your Sunshine server and click OK.

  4. Select the newly added device’s icon in the Moonlight window. Upon clicking the server’s icon, you will be shown a PIN code.

  5. Open the Sunshine web interface and select PIN at the top.

  6. Enter the PIN code prompted on your client device and click Send.

You should see a green success message indicating that pairing was successful.

Play games remotely over Meshnet

After successful pairing, you can start playing games from your server’s library on other devices remotely.

  1. In Moonlight, select your Sunshine server.

  2. From the list of available games, select the one you want to play.

The game will shortly load, and you’ll be able to enjoy your remote gaming session!

Tip

You can use the Moonlight settings menu to change the streaming resolution and bitrate to optimize the game-streaming quality for your setup.

Last updated

© 2024 Nord Security. All Rights Reserved.