To keep your Mac mini awake while its display is off, open System Settings > Energy and enable Prevent automatic sleeping when the display is off. Set when the display turns off separately in System Settings > Lock Screen.
That setting prevents automatic computer sleep; it does not guarantee that YouTube playback, a browser tab, your internet connection or a live broadcast will continue uninterrupted. Treat the Mac’s sleep state and the stream’s reliability as separate things to configure and test.
What the sleep setting does and does not do
A Mac mini can keep running after its display goes dark. The display timing and automatic computer sleep are separate controls: one governs the screen, while the other governs whether the Mac enters sleep. On a desktop Mac, the Energy setting named Prevent automatic sleeping when the display is off is the relevant control for keeping the computer awake in that situation. Apple notes that available settings can vary by Mac and macOS version, so use the option that appears on your machine.
Keeping the Mac awake gives local software the opportunity to continue running. It does not force a browser to keep a tab active, prevent an application from closing, preserve a Wi-Fi connection, or keep YouTube receiving a live feed. A router can restart, an internet provider can have an outage, a browser can crash and the stream itself can encounter a problem. The sleep setting does not control these things.
This distinction matters when you are checking a sleep stream in the morning. If you find the display dark, that alone does not tell you whether the Mac slept or whether YouTube stopped. Check the Mac’s state, the playback or streaming application, and YouTube’s live status separately. A screen turning off can be normal even while playback continues; a stream ending despite a running Mac points to a different fault.
Apple’s desktop Energy settings guide describes the sleep-related controls and cautions that delaying, preventing or allowing disruption of sleep may increase power consumption. Keeping the computer awake overnight is a choice with a power-use trade-off, not a free substitute for checking reliability.
Find Energy settings on your Mac mini
On recent macOS versions, open the Apple menu, choose System Settings, then select Energy in the sidebar. Look for Prevent automatic sleeping when the display is off. If you do not see the same layout or wording, search System Settings for “sleep” or consult Apple’s guide to Mac sleep and wake settings; menus differ between versions and some options depend on the Mac model.
Switching this setting on is appropriate when you want the Mac mini to continue operating with the display off. It is not a setting for making the display stay lit, and it is not a YouTube control. If you have a display connected only for setup, you can configure its timeout separately and then let it switch off during normal use.
Before changing several settings at once, note what the Mac currently does. Does playback stop at the same time that the display goes dark? Does the Mac require a key press before it responds? Does the YouTube player show a stopped or disconnected state? Those observations help you distinguish computer sleep from a browser or connection issue instead of treating every interruption as a power-setting problem.
If the setting is unavailable, do not assume that another setting with “network” in its name has the same effect. Apple describes Wake for network access as waking a sleeping Mac to provide shared resources. It is not a keep-awake switch for a YouTube stream. Check the available controls for your desktop Mac and its macOS version rather than relying on a similarly named option.
Prevent automatic sleep when the display is off
In System Settings > Energy, turn on Prevent automatic sleeping when the display is off. Leave the Mac mini powered on and connected to its usual display while you confirm the change. This configures macOS not to enter automatic sleep just because the display is off. It does not prevent you from putting the Mac to sleep manually, shutting it down, or losing power.
If you use the Mac for other purposes, consider whether a persistent setting suits your routine. It remains enabled until you change it, which is convenient for a recurring unattended stream but easy to forget when the Mac is no longer being used that way. Apple warns that preventing or delaying sleep may increase power consumption. If energy use matters, measure your own Mac’s consumption with an appropriate meter under your normal workload rather than relying on a generic wattage or cost estimate.
For a one-off listening or viewing session, macOS also includes the Terminal command caffeinate. Open Terminal and run caffeinate; leave that Terminal window and command running for the session, then press Control-C in that window to end it. With no flags, the command prevents idle sleep while it is running, according to the macOS caffeinate manual. If the command exits or the Terminal session ends, its temporary assertion ends too. This is a temporary sleep-prevention method, not a way to keep YouTube or the network online.
| Approach | Best fit | How it ends | Main consideration |
|---|---|---|---|
| Energy setting | Repeated unattended use with the display off | You switch it off in System Settings | Persists until changed; Apple cautions about power use |
caffeinate |
A single session when you want a temporary measure | Press Control-C in the Terminal window running it | Depends on the command remaining active; it does not guarantee stream continuity |
Choose one method you can remember to review. The persistent option is direct for a Mac mini used regularly as a host. The command is more limited in duration, but that limitation can be useful when you want a temporary keep-awake measure without leaving a permanent setting behind.
Set the display timeout separately
Open System Settings > Lock Screen and choose the display-off timing that suits your setup. The exact controls and labels can vary by macOS version and connected display. The aim is to let the display turn off after inactivity without assuming that this timeout also decides whether the Mac sleeps. Apple’s sleep and wake instructions cover the desktop Energy setting and the separate display controls.
A display that stays on all night can use more energy and may be unnecessary if nobody is watching. A display that turns off is often a practical choice for a Mac mini used for audio or a fixed video loop. But the screen going dark only tells you the display has turned off. It is not evidence that a browser remains connected to YouTube or that a live encoder continues sending video.
If you rely on a connected display’s own power button or settings, test that arrangement too. Some monitors have their own sleep behaviour, and turning off a monitor is not necessarily identical to the Mac’s display timeout. Use the Mac setting to control the computer’s automatic sleep behaviour, and use the Lock Screen display timing for the screen. Avoid using a dark monitor as your only test of whether the Mac is still operating.
Test playback or the live stream with the display off
Test during a period when an interruption is acceptable, not for the first time just before leaving the channel unattended overnight. Start the same kind of playback or live stream you plan to run, confirm that it is working, and let the display turn off using the configured timeout. Give it enough time to pass the point at which the display normally goes dark, then interact with the Mac again and check what happened.
For browser playback, verify that the YouTube player is still playing after waking the display. Check that the browser has not shown a pause prompt, error, reload or sign-in interruption. For a live stream sent from an application such as OBS, check the application’s connection state and YouTube Studio’s live status separately. A running Mac does not prove that the sender is connected, and a live status page does not prove that local playback is still audible in the room.
If you are configuring OBS on the same Mac mini, the setup of the stream key and the video loop is another independent part of the chain. The macOS guide to setting a YouTube stream key in OBS covers that configuration. This sleep-setting article does not replace testing the encoder, the key, the source video or YouTube’s live dashboard.
Run a short test more than once if your normal use involves a particular browser, application or display arrangement. Change one setting at a time and note whether the result changes. If playback stops while the Mac remains awake, investigate the browser and playback behaviour; if the whole Mac appears asleep, revisit Energy and Lock Screen settings. If the live feed disconnects while the Mac and application remain responsive, move on to network and streaming checks.
Check network and application reliability separately
A stream depends on more than the host computer’s sleep state. For a live broadcast, the Mac must keep running the sending application, that application must continue encoding and sending, and the connection must remain usable. For browser playback, the browser and YouTube’s player must continue working, and the Mac must have a working route to the internet. The Energy setting only addresses one part of this picture.
If a stream stops, first record what you can observe: whether the Mac responds without a wake delay, whether the application is open, whether its connection indicator changed, whether YouTube Studio reports the broadcast as live, and whether other internet services work. This is more useful than repeatedly toggling sleep settings when the evidence points to a browser, application or connection interruption.
A weak or unstable upload connection can interrupt a live feed even if the Mac never sleeps. For symptoms that point to upload trouble, use the checks in how to keep streaming when your upload speed drops. If you are comparing a computer at home with a remote host, the network and operating trade-offs are different; running FFmpeg on an Indian VPS with limited monthly bandwidth is relevant to that separate arrangement, not a fix for macOS sleep.
On the Mac itself, check whether the browser or streaming application has been closed, paused or interrupted. Test with the same app and source you intend to leave running, and make sure the content does not simply reach its end. For a playlist or loop, confirm the application is set to repeat the content as intended; the Mac can stay awake while a finite video or playlist finishes. You can also consult how to fix a 24/7 YouTube stream that stops when its playlist reaches the end for the distinction between a host staying active and a source continuing to supply media.
If the Mac sleeps unexpectedly despite the intended Energy setting, verify the setting and display timeout first. Apple recommends checking Sharing services, background activity in Activity Monitor, macOS software and connected storage or devices when investigating unexpected sleep or wake behaviour. Its unexpected sleep troubleshooting guide is a sensible next step. Do not interpret Wake for network access as a setting that keeps a stream awake; its purpose is to wake a sleeping Mac for shared resources.
A UPS may be worth considering if power interruptions are a concern in your location, but it addresses a different failure mode. It does not prevent ordinary sleep, make the router reliable or keep a YouTube connection alive during an internet outage. Treat power backup as optional resilience for a setup that needs it, and check Apple’s current guidance and the equipment’s compatibility before choosing one.
Choose a keep-awake approach you can maintain
For a recurring sleep stream, the Energy setting is usually easier to audit because it is visible in System Settings and does not depend on an open Terminal command. Its main drawback is persistence: you need to remember that it remains enabled when your use changes. For an occasional session, caffeinate offers a temporary alternative, but the command has to remain running and must be stopped when you are done.
Neither approach is a substitute for monitoring the actual point of failure. If your priority is continuous live transmission and you do not want your personal Mac to be the host, a cloud-based workflow can remove the need to leave your own computer running. StreamNeo is relevant to that specific burden: it runs an uploaded video as a YouTube live stream without requiring your Mac mini to remain on. It does not remove the need to prepare the file, configure the channel and check the broadcast.
Whichever approach you choose, write down the setting or command, the display timeout, the application in use and how you will confirm the broadcast is still active. A short, repeatable test gives you a clearer picture than assuming a dark display means the computer and stream are behaving as intended. Recheck after a macOS update or after changing browsers, displays, network equipment or streaming software, because those changes can affect the parts of the setup that the sleep setting does not control.
Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.
FAQ
Does the Mac mini keep YouTube running when the display turns off?
The Energy setting can prevent automatic Mac sleep while the display is off, but it does not guarantee that YouTube or a browser will keep playing. Test the actual browser or streaming application you use after the display turns off.
Where is “Prevent automatic sleeping when the display is off”?
On a Mac mini, look in Apple menu > System Settings > Energy. macOS versions and available options can differ, so search System Settings or consult Apple’s current desktop guidance if the label is not visible.
Can I turn off the display without putting the Mac mini to sleep?
Yes. Configure the display’s inactive timeout separately in System Settings > Lock Screen, and enable the Energy option that prevents automatic sleep when the display is off. A dark display confirms only that the display has turned off, not that playback or a live stream remains connected.
Is caffeinate better than changing the Energy setting?
It depends on how long you need the Mac to stay awake. The Energy option suits repeated use but remains enabled until you change it; caffeinate is temporary while its Terminal command runs and ends when you stop it. Neither method controls YouTube, the browser or the network.