Access Your School Lab PC Remotely with Sunshine, Moonlight, and ZeroTier
Easily access you school lab PC anytime, anywhere.
In this guide, we’ll walk you through setting up these tools to enable secure, remote access and streaming. We’ll also show you how to configure it using a virtual desktop driver so you can connect without needing a physical monitor attached. If you have a monitor, that’s great! But if not, using a dummy HDMI plug will work too.
What are Sunshine and Moonlight?
Sunshine is an open-source server that allows remote access to your PC, designed to work with Moonlight, a client app. Moonlight was originally created as part of NVIDIA’s GameStream service, allowing users to stream PC games over a network with minimal latency. Thanks to its low-latency architecture, it’s an ideal solution for accessing and using a remote PC, ensuring smooth performance even for resource-intensive tasks.
🔧 Step 1: Setting Up Sunshine on the School Lab Server PC
- Download and Install Sunshine
- Visit Sunshine’s GitHub page and download the latest version for your operating system.
- Install it on the Lab Server PC and run it with administrator privileges.
- Configure Sunshine Settings
- Open Sunshine and go to Settings.
- Set the Streaming Quality to match your desired resolution and framerate (e.g., 1080p at 60fps).
- If your PC is using a virtual desktop driver (e.g.,
TightVNCorDummy HDMI Driver), set it as the Primary Display. - Enable Hardware Encoding if your GPU supports it for smoother streaming.
- Create a User Account
- Go to the Users tab in the Sunshine interface.
- Create a username and password for the account you’ll use to access the server remotely.
- Start Sunshine
- Start the Sunshine server. You’ll see your Lab PC’s local IP address listed. This will be used by Moonlight to connect.
🌐 Step 2: Setting Up ZeroTier for Remote Access
- Create a ZeroTier Account
- Go to ZeroTier’s website and sign up for a free account.
- After logging in, create a new Network. Copy the Network ID—you’ll need it for the next steps.
- Install ZeroTier on the Lab Server PC
- Download and install ZeroTier One on your Lab Server PC.
- Once installed, join the network using the Network ID from Step 1.
- Install ZeroTier on Your Remote Device
- Download and install ZeroTier on the device you want to use for remote access (laptop, tablet, or even your phone).
- Join the same Network ID that you used for the Lab Server.
- Authorize the Devices
- Go back to your ZeroTier account in the browser.
- You should see both devices listed in the Members section. Authorize each device by checking the box next to them.
- Now, both the Lab Server PC and your remote device are virtually on the same local network!
🌙 Step 3: Setting Up Moonlight on Your Remote Device
- Download and Install Moonlight
- Download Moonlight on the device you’ll use to access the Lab PC. You can get it from the Moonlight Downloads section.
- Connect to Sunshine Using ZeroTier
- Open Moonlight and enter the ZeroTier IP address of your Lab Server PC. You can find this in the ZeroTier network settings on the Lab Server.
- When prompted, enter the username and password you set in Sunshine.
- Pair the Devices
- You may need to approve the connection request on the Lab Server PC when pairing for the first time. Check the Sunshine interface for a pairing request and approve it.
- Start Streaming
- Select the Lab PC in Moonlight, choose your preferred screen resolution and framerate, and start streaming!
Step 2 and 3 are interchangeable. You can check the Sunshine and Moonlight is working by connecting it using two PC in the same network. After stream is successfully connected, you can then install Zero Tier One and make sure both PC connected to the same Zero Tier Network.
🖥️ Virtual Desktop Driver Configuration
If your Lab PC doesn’t have a physical monitor connected, Moonlight may not stream properly. To fix this, we’ll use a Virtual Desktop Driver:
- Install a Virtual Desktop Driver
- Download a Virtual Display Driver like Virtual Display Driver.
- Set It as the Main Display
- Once installed, set the virtual display as the primary monitor in your Display Settings.
- Configure it to match your desired streaming resolution (e.g., 1920×1080).
- Use a Dummy HDMI Plug (Optional)
- If you have a Dummy HDMI Plug, plug it into your GPU. This will trick the Lab PC into thinking a monitor is connected, allowing Moonlight to stream normally.
- Restart Sunshine
- Restart the Sunshine server and verify that the virtual display is recognized. Moonlight should now stream correctly without needing a physical monitor.
If you have monitor in the Lab, it is more simple to connect you Lab PC to it. Even if the monitor is turned off, you will still get an image in your stream. If you are not connecting your PC to anything, Sunshine won’t stream anything.
💡 Tips for a Better Experience
- Use Ethernet: For a stable connection, use a wired Ethernet connection on both the Lab PC and your remote device whenever possible.
- Optimize Streaming Settings: Adjust the streaming quality in Moonlight for a balance between performance and visual quality.
- Test Locally First: Test the setup while you’re still in the school network to ensure everything is configured correctly before trying it remotely.
📢 Troubleshooting
If you run into any issues, try the following:
- Moonlight Doesn’t Detect Sunshine
- Make sure Sunshine is running and not blocked by the Windows Firewall.
- Double-check that your ZeroTier network is connected and active.
- Blank Screen or No Output
- Ensure there’s a virtual display driver or dummy HDMI plug connected.
- Check that Sunshine is set to the correct display.
- Lag or Poor Performance
- Lower the resolution or framerate in Moonlight.
- Ensure both devices are on a stable network with low latency.
Now you’re all set to access your school lab PC remotely using Sunshine, Moonlight, and ZeroTier! 🌍 Happy remote working! 💻✨
If you have any questions or need further assistance, feel free to reach out to the M.A.D Lab team! 🔧