How to wake a Mac remotely (and what to do when you cannot)
You are away from your Mac, it went to sleep, and now you cannot reach it. Waking it from afar is possible in a narrow set of cases. For everything else, the answer is to stop it sleeping before you leave.
Short answer: A sleeping Mac wakes over the network only from a Wake-on-LAN magic packet sent on the same network, or through a Bonjour Sleep Proxy such as an Apple TV or HomePod when Wake for network access is on, so it rarely works over the internet. The reliable fix is to keep the Mac awake while you need it, which MightyMouse can do with its Keep this Mac awake switch while you drive your Mac from your phone, though it cannot wake a Mac that is already asleep.
Here is the short version before the detail. Waking a sleeping Mac from another network is unreliable, and no phone app can promise it. What you can control is whether the Mac goes to sleep in the first place. Most of this page is about that, because it is the part that actually works.
What actually wakes a sleeping Mac over a network
Two things can wake a Mac from sleep without anyone touching it. Both depend on the Mac being on the same local network as whatever sends the signal.
- A magic packet. This is a Wake-on-LAN message addressed to the Mac's hardware (MAC) address. The Mac's own
pmsetmanual describes the setting behind it:wompis "wake on ethernet magic packet" and is the "same as Wake for network access in System Settings". Someone or something on the same network has to send it. - A Sleep Proxy. A device on your network that stays awake, such as an Apple TV or HomePod, can answer for the sleeping Mac. When something asks for a service the Mac advertises, the proxy wakes it. Stuart Cheshire, the Apple engineer who designed the feature, describes how it works and what it needs on his Sleep Proxy page. It is his page, not an Apple support article, so treat the details as his account of the design.
Apple's own support page for this setting is short. It says that when "Wake for network access" is on, your Mac wakes "when a user at another computer accesses the shared resources of your Mac" and "at regular intervals so that your Mac can notify other computers on the network that its resources are available" (Share your Mac resources when it's in sleep, checked October 2026). On a laptop it is a pop-up menu under Battery, then Options. On a desktop it is a switch under Energy. The page is about shared resources, such as printers and music libraries. It does not promise that you can wake your Mac on demand from anywhere.
Why it rarely works from the internet
A magic packet is a local-network message. It is addressed by hardware address, not by the internet address your router shows the world, so a router does not pass it along from outside by default. To send one from away, you need a device that is already awake on your home network to send it for you, or a router setup that forwards something into the network. That is the reason the usual how-to pages tell you to use another computer on the same subnet (one example is this help desk article, which stops partway through its own steps).
Cheshire's page notes that a Sleep Proxy can work for a service you have made reachable from the internet, for example with a forwarded port, because the proxy does the waking from inside the local network. That is real, and it is also setup that most people do not have: a router rule, a service worth exposing, and a proxy device on the same network. Wi-Fi makes it shakier. His page says wake over Wi-Fi depends on the base station and "may be unreliable", and that Ethernet is the dependable route.
There is a second catch that people hit after they get the packet through. One Apple Developer Forums post reports that a Mac woken by a magic packet slept again after 30 to 60 seconds, and that connecting over SSH kept it up. That is a single user's report with no Apple reply, so read it as a warning, not a fact about every Mac (the thread). The practical lesson matches what you will see below: waking is only half the job, because the Mac has to stay up long enough for you to do something.
MacBook with the lid closed versus a Mac mini
Mac mini and other desktops. These are the easy case. Apple's page gives desktops a plain "Wake for network access" switch under Energy, and a Mac mini has no lid to close. If it is on Ethernet and a Sleep Proxy or another always-on device is on the same network, you have the best odds of a network wake. If the real plan is a headless Mac mini that you reach from your phone, running a Mac mini without a monitor covers that setup, and running Claude Code on a Mac mini covers the always-on agent use.
MacBook. This is the hard case. Cheshire says a laptop needs to be on AC power and have a display available for Sleep Proxy to wake it. A display being available means the lid is open or an external display is connected. So a MacBook that is closed, unplugged, and sleeping in a bag is not going to answer. Apple's sleep and wake page does not describe lid-closed wake behavior either, so do not assume your model does something the documentation does not say.
The better answer: do not let it sleep
If you know you will need the Mac, the dependable move is to keep it awake before you leave. You do not need extra software for the basics.
- Use the Energy or Battery settings. In Apple's sleep and wake settings, desktops have "Prevent automatic sleeping when the display is off" under Energy. Laptops have "Prevent automatic sleeping on power adapter when the display is off" under Battery, then Options. Apple warns that delaying or preventing sleep can raise power use.
- Run
caffeinatein Terminal. By its manual page, with no flags it holds an assertion that prevents idle sleep until it exits.-dkeeps the display awake,-iprevents idle sleep,-sprevents sleep but "is valid only when system is running on AC power", and-t 3600stops it after 3600 seconds. For example,caffeinate -dis -t 28800holds the Mac for eight hours. - Set the sleep timer with
pmset. The manual sayspmsetmust run as root and that a minutes value of 0 turns the timer off forsleep,disksleepanddisplaysleep. Sosudo pmset -c sleep 0stops idle sleep on wall power, and-aapplies to all power sources. Undo it by setting the number back.pmset -g assertionslists what is currently holding the Mac awake, which is the quickest way to see whether your change worked. - Schedule a wake. If you know when you will need it,
pmsetcan wake the Mac on a timetable. Apple's page on scheduling showssudo pmset repeat wake M 8:00:00for 8:00 every Monday. It is a clock, not a remote control, but it needs no network at all.
Remote Login helps with one more trick. The pmset manual lists ttyskeepawake, which prevents idle sleep while a terminal session is active, so an open SSH session can hold the Mac up. If SSH from your phone is the plan, connecting to your Mac over SSH from an iPhone walks through it.
What MightyMouse does about sleep
MightyMouse turns your iPhone into a trackpad, keyboard, live screen and mic for your Mac, and part of that is keeping the Mac from going to sleep under you while you use it.
- Keep this Mac awake. A setting in MightyMouse Settings that stops the screen sleeping while the phone remote is on, so the Mac stays reachable. The setting itself says it uses more battery.
- Away Mode ("Protect this screen while you use your phone"). It holds the display awake so macOS never starts its idle password lock, then covers every screen in black once you stop touching the Mac, while your phone keeps showing the live screen. Someone walking past sees black. The cover is not a lock and not a security boundary: it is an opaque window, and if someone sits down and touches the Mac, MightyMouse locks it.
- Works with the lid closed. An opt-in switch under Keep this Mac awake. It asks for your Mac password once and runs
pmset -a disablesleep 1so the Mac stays up after you shut the lid. It turns itself back off when you turn the remote off, quit the app, or relaunch after a crash, and after the phone has been gone for ten minutes. The setting text says to leave it plugged in because a closed Mac gets warm. This flag is machine-wide, and it does not appear in thepmsetmanual on the Mac I checked, so only use it through an app that reverses it, or reverse it yourself withsudo pmset -a disablesleep 0.
Away Mode also needs the Accessibility permission on the Mac. MightyMouse refuses to start it without that, because it relies on noticing a person touching the Mac in order to restore the lock.
What this costs you, and what it cannot do
Be clear about the limits, because the whole page depends on them.
- MightyMouse cannot wake a Mac that is already asleep. It does not send magic packets and it is not a Sleep Proxy. If the Mac is asleep, the phone has nothing to talk to.
- It cannot unlock a Mac that is already locked. Away Mode prevents the idle lock from arming. It cannot get past a lock that is already showing, and a locked screen gives a remote nothing to drive. If you see the password screen, type your password on the Mac.
- Away Mode never locks on its own when the phone goes away. It covers the screen and leaves the Mac unlocked underneath. A Mac left that way stays unlocked until someone touches it, then it locks. If that trade-off bothers you, do not turn Away Mode on in a public place.
- Keeping a Mac awake costs power. On a laptop that means battery, or heat in a bag. On a Mac mini it is a few more hours of idle power.
- The lid-closed option changes a system setting. It is reverted automatically, but you are trusting the app to do that. Check
pmset -gif you are unsure: the lineSleepDisabledshould read 0 when you are done.
Pricing for the phone side: control on your own Wi-Fi is free and unlimited, and away from home it runs over cellular with a free monthly allowance. See controlling your Mac from your iPhone for the full picture of what each option gives you.
When a remote desktop app is the better fit
If you need a sleeping Mac to come back on its own as a standing part of your setup, look at tools built around that. Some remote desktop apps document their own wake features and router requirements, so read the vendor's page rather than a summary: our Jump Desktop page is the place to start. They still rely on the same local network pieces described above, so a wake that works from your couch may not work from another country.
A simple plan to follow
- Decide whether you really need to wake it. If you know you will be away, prevent sleep before you leave.
- On a Mac mini, turn on "Prevent automatic sleeping when the display is off" under Energy and leave it on Ethernet.
- On a MacBook, leave it plugged in and decide on lid-closed behavior first. The lid-closed option in MightyMouse or
caffeinateare the two honest choices. - Run
pmset -g assertionsto confirm something is holding it awake. - Only then, if you still want a network wake as a backup, turn on "Wake for network access" and keep a Sleep Proxy device on the same network.
Keep your Mac awake and reach it from your iPhone.
Free on your own network. No card to try it.
Common questions
Can I wake my Mac remotely?
Sometimes. A Wake-on-LAN magic packet or a Bonjour Sleep Proxy such as an Apple TV or HomePod can wake a Mac from the same local network when "Wake for network access" is on. Waking it from another network is unreliable and needs router setup.
Can I wake my Mac mini remotely?
A Mac mini is the easiest case because it is a desktop with no lid. Turn on Wake for network access under Energy, connect it by Ethernet, and keep a Sleep Proxy device on the same network. Better still, stop it sleeping with the Energy setting that prevents sleep when the display is off.
Can I wake a MacBook with the lid closed?
Usually not reliably. Stuart Cheshire, who designed Sleep Proxy, says a laptop needs AC power and a display available, meaning the lid open or an external display connected. Apple documents no lid-closed network wake.
How do I stop my Mac sleeping so I can reach it later?
Turn on the Energy setting that prevents automatic sleeping when the display is off, run caffeinate in Terminal, or set the sleep timer to 0 with sudo pmset. Use pmset -g assertions to check what is holding the Mac awake.
Can an iPhone app wake my sleeping Mac?
Only if the app sends a Wake-on-LAN packet from your home network or the Mac has a Sleep Proxy nearby. MightyMouse does not wake a sleeping Mac and cannot unlock a locked one. Turn on Keep this Mac awake in its Settings, which is off by default, and it keeps the Mac awake while you use it from your phone.
Does Wake for network access work over Wi-Fi?
It can, but it is less dependable than Ethernet. Cheshire's Sleep Proxy notes say wake over Wi-Fi depends on the base station and may be unreliable, and that Ethernet is the dependable option.
To keep your Mac awake and reach it from your pocket: MightyMouse turns your iPhone into a screen, trackpad, keyboard and mic for your Mac, paired with one QR scan.