Skip to content
TalonZeng

I Use a Mac to Control a Windows PC on My LAN

I sit at a Mac and use Moonlight to reach a Windows desktop on the LAN. This is how I pick a tool, install Sunshine, pair again, and what I checked after a reinstall when the host went offline and pairing returned 409. I have not confirmed that desktop streaming already worked this time.

zhudi8 min read
Share
Connection diagram. Sunshine on Windows sends video and audio to Moonlight on the Mac; keyboard and mouse input go back from the Mac to Windows.

I use Moonlight and Sunshine for remote work, and I also kept the steps for getting the connection back after a Windows reinstall. I put this together in November 2026.

I usually sit in front of a Mac, but some software, media files, and compute jobs live on another Windows machine. I want to see that computer's desktop directly, drive it with the Mac keyboard and mouse, and keep up when I drag windows, watch video, or preview footage. For that kind of work, I reach first for Moonlight on the Mac and Sunshine on Windows. If the day is mostly writing documents, managing files, and copying and pasting between the two machines, I try Windows' built-in Remote Desktop (RDP) first.

1. How I choose a remote-control tool#

Option

When I use it

What I watch for

Moonlight + Sunshine

I need to operate the current Windows desktop from the Mac: editing previews, playing video, using graphics software, or anything that wants a smooth picture and responsive input

The experience depends on Windows' encoding capability and the quality of the LAN. Copying text and moving files need a separate arrangement.

RDP + Windows App on macOS

Office documents, background admin, or frequent two-way clipboard and folder redirection

The Windows host has to support incoming RDP, for example Pro, Enterprise, or Education. Home cannot act as a built-in RDP host. Before collaborating, I check that an RDP session actually fits the need to watch the same screen together.

Mac Screen Sharing / VNC

When both machines are Macs, I try the built-in Screen Sharing first. I only pick a VNC product when a VNC server is already in place, or I need to support different clients.

Apple's "High Performance" is a specific mode inside Screen Sharing, with Apple silicon, macOS version, and network requirements. Ordinary VNC quality and latency depend on the implementation and the network.

When I need to see the desktop Windows is already showing, and play motion smoothly, I choose Moonlight and move files through a separate shared folder. I measure quality and latency on my own network, because resolution, frame rate, and text sharpness all change how it feels. Moonlight setup guide · Microsoft's RDP host requirements · Clipboard and folder redirection in Windows App · Apple's VNC compatibility notes · Apple's High Performance Screen Sharing notes

2. First I confirm what each computer does#

Windows runs the software. Sunshine encodes the desktop and sends it to the Mac. Moonlight shows that picture on the Mac and sends keyboard and mouse input back to Windows. What I see on the Mac is the Windows desktop; the working files stay where they were saved. The two devices just need to be on a LAN that can reach each other. When I can, I give Windows a wired connection. Sunshine getting started · Moonlight network recommendations

This Windows machine previously used 192.168.1.253. In that round I updated Moonlight on the Mac, then installed Sunshine on Windows by hand. I ran Get-Package Sunshine in PowerShell, confirmed the installed version was the then-current stable build 2026.914.233613, and also verified the desktop connection. Windows was later reinstalled, so Sunshine had to be installed and paired again, and I had to reconfirm the address. Sunshine version installed at the time

After the reinstall, the new address was 192.168.1.248. The Mac was 192.168.1.65 at the time, and both machines were on the same /24. The old Moonlight card still named Windows-Sunshine showed as offline. When I reproduce this, I open Command Prompt on Windows, run ipconfig, find the IPv4 Address under the Ethernet or Wi-Fi adapter that is actually in use, and enter that in Moonlight. The address Windows is showing right then is the one that counts.

3. I install Sunshine on Windows first#

  1. On Windows I open the official Sunshine stable release page, and in Assets I download the Windows .msi. On most Intel or AMD PCs I take Sunshine-Windows-AMD64-installer.msi. If Settings → System → About shows ARM64, I pick the ARM64 build instead. Sunshine's Windows install notes
  2. I run the installer, accept the default path and components, then confirm Sunshine has started. If the installer asks for a reboot, I save my work, restart as prompted, and check again that Sunshine is running. Right after a fresh Windows install, I also confirm that I am signed in, the GPU driver is installed, and the desktop looks normal on the machine itself.
  3. Still on the Windows PC, I open the admin page from Sunshine's tray menu, or type https://localhost:47990 in a browser. The first time, I set the Sunshine admin username and password myself. That account is for managing Sunshine. The four-digit PIN that later appears on the Mac is what authorizes this client. The browser may warn that Sunshine is using a local self-signed certificate; I first check that the address really is localhost:47990 on this Windows machine. Sunshine admin page and first-time setup

4. Back on the Mac, I pair the two machines again#

  1. If the Mac does not have a client yet, I install the macOS build from the Moonlight website. After opening it, I click 「电脑 +」 in the top-right corner to add a host manually, and enter the new Windows IP, which this time was 192.168.1.248. After a reinstall, the host card name may change to Windows' new computer name.
  2. I click the new host and leave the pairing window open on the Mac. On the Windows PC, I open the Sunshine admin page, go to PIN, and enter the four digits the Mac is showing at that moment. If the page asks for a device name, I enter 我的 Mac, then submit. The pairing code is whatever the current popup shows. Sunshine pairing steps
  3. After Sunshine shows success, I go back to the Mac. The pairing popup should close on its own. Clicking the new host should reveal the app list. I choose Desktop, wait for the Windows screen to appear, then move the mouse, open Notepad, type a few characters, and try a familiar app or play a short video with sound. I only treat acceptance as complete when I can see the picture, type and move the pointer, and the audio is what I expect. Using Moonlight to stream the entire desktop

Day to day, I open Desktop from the new host card. To return to the Mac, I press Control + Option + Shift + Q in the streaming window to disconnect the session. Programs on Windows can keep running. Moonlight official shortcuts

5. What I check when the host is offline or pairing fails#

The host is offline, or adding it by hand fails. I first go back to Windows to confirm the IP is still right, the Sunshine admin page opens, and both machines are on a network that allows them to reach each other—for example, that neither is on an isolated guest Wi-Fi. Then, in Terminal on the Mac, I can check the default ports with the two commands below, replacing the sample IP with the Windows address at the time:

bash
nc -G 2 -vz 192.168.1.248 47989
nc -G 2 -vz 192.168.1.248 47984

If the ports time out, I check whether Sunshine is running, and whether the Windows Firewall allows Sunshine on the current network profile. A successful port check only means the Mac can reach those services; I still have to open the desktop to accept the setup. This time, after I started Sunshine on Windows, both ports connected. Even though ping still had no reply, Moonlight could discover the host. On a LAN I keep the firewall, prefer the rules the installer created, and do not set up public port forwarding on the router. Moonlight notes on the Windows Firewall

I already entered the PIN, the Mac popup is still open, and retrying returns 409. This is the state I actually hit during this recovery: the host could be found, but a previous pairing session was still occupying the slot. I close the old popup, then on the Windows Sunshine admin page I look for Troubleshooting → Restart Sunshine. That interrupts any current stream. After the service comes back, I start pairing only once on the Mac, immediately enter the new PIN on Windows, and submit. The error sometimes includes the words GeForce Experience; I look at the later hint about an existing pairing session. The notes stop at this error and the recovery steps above. I have not confirmed that desktop streaming already worked after this reinstall. Restart option on the Sunshine admin page

Pairing succeeded, but opening Desktop is a black screen or stutters. I first confirm on the Windows PC itself that I am signed in, that a display or display output is available, and that the GPU driver is healthy. If the picture opens but does not run smoothly, I try Moonlight at 1080p / 60 fps. If it is still unstable, I drop to 30 fps or lower the bitrate. Once it is stable, I raise the resolution or bitrate again, changing only one thing at a time so I can tell what helped. Moonlight performance and network guide

To send a download link from the Mac to Windows, I first press ⌘C on the Mac, then click the address bar of the Windows browser in the stream and press Control + Option + Shift + V. Moonlight types the Mac clipboard's plain text into the remote machine. I glance at the link to check it is complete before pressing Enter. Ordinary paste on the remote side uses Windows' own clipboard. Moonlight official shortcuts · Moonlight maintainer notes on text input

When I move media files often, I use a separately authorized Windows SMB share. On the Mac, I press ⌘K in Finder and connect with smb://192.168.1.248/共享名, then read and write the shared directories directly between the two machines. I only share the folders needed for the work, with read-only or read-write permission as required. To change the IP less often later, I can also add a DHCP reservation on a router I manage, for the network adapter Windows is actually using. Apple guide to connecting a Mac to Windows file sharing

Comments

No comments yet — be the first to leave one.

Related articles