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.
Sunshine is an open-source solution that allows you to transform your device into a dedicated game server. It's easy to set up and doesn't require permanent changes to your system. Sunshine is designed to work as a host for the Moonlight game-streaming client.
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.
Visit the Releases page of the Sunshine GitHub repository.
Download the Windows installer file for the latest available version.
Launch the downloaded file. If the Microsoft Defender SmartScreen window shows up, select More info and click Run anyway.
Follow the instructions presented by the installation wizard.
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.
Launch Sunshine. It will open the
https://localhost:47990/
URL in your default internet browser.Enter your preferred Sunshine username and password and click Login.
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.
On the Sunshine web interface, select the Applications section.
Click Add new.
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
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:
On Android, you can install Moonlight from the Google Play Store or the Moonlight for Android GitHub repository.
On iOS, you can install Moonlight from the App Store.
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.
Open Moonlight.
In the upper-right corner, select the computer icon. Alternatively, you can press Ctrl + N on your keyboard.
In the new dialog, enter the Nord name of your Sunshine server and click OK.
Select the newly added device’s icon in the Moonlight window. Upon clicking the server’s icon, you will be shown a PIN code.
Open the Sunshine web interface and select PIN at the top.
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.
In Moonlight, select your Sunshine server.
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