Closing your MacBook will put it to sleep. All foreground and groundwork apps and services will be temporarily paused until you reopen the lid. If you're playing music, for case, closing your Mac stops the song. Downloading a file or installing an app on your MacBook? macOS will pause (or terminate) the activities when you close the lid.

In this guide, we'll walk you through two methods to keep your Mac awake when the hat is shut.

A Mac with its lid closed

In that location are several reasons why you lot may need to exercise this. Say you want to use your Mac equally a network server with the chapeau closed. Or perhaps, you lot're downloading some files at a coffee shop merely don't want to leave your MacBook open on the table.

You tin start the download, tuck the Mac in your bag, and enjoy your coffee while the download continues in the groundwork. There are other utilise cases, but let's jump to the techniques to prevent your Mac from sleeping when the lid is closed.

The Native Method: Connect Your Mac to an External Brandish

macOS is an intelligent operating system with obvious and trivial-known features. For case, the Os volition go along your Mac up and running when it detects an external monitor or projector. This is called the Airtight-Display Way or Close-Clamshell Manner.

In this fashion, your Mac will stay on, even when the hat is closed. All you demand to do is connect the following devices or peripherals and close your Mac's chapeau:

  1. An external brandish (monitor or projector)
  2. An external keyboard (wired or wireless)
  3. An external mouse or trackpad (wired or wireless)

You most likely would need a USB hub with compatible ports to get this washed, particularly if your Mac has limited ports.

One more thing: Y'all need to plug your Mac into a ability source for this arrangement to work. So, in addition to connecting the above-mentioned peripherals, plug in your Mac'southward power adapter and yous're all set up.

Mac plugged into a power source

When these are in identify, you tin can admission your Mac on the external brandish with the lid closed.

Annotation that some 4K and 5K monitors can power your Mac while acting as an external brandish. If you have this type of monitor (bank check the instruction manual or visit the manufacturer'southward website to confirm), you don't need to connect your Mac to the Air conditioning power adapter.

Apple recommends putting your Mac to sleep before disconnecting the external display. So, open your Mac's lid, click the Apple logo on the card bar, and select Sleep. You could also select Shut Down to plow it off completely; your choice. Just don't unplug the external display while your Mac is in Closed-Display mode.

Method 2: Utilize a Tertiary-Party App

A Mac with its lid closed

The native method of keeping your Mac turned on with the lid closed requires an external display, a mouse, and a keyboard. Just what if you don't have whatsoever of these peripherals? That'due south where 3rd-party applications like Amphetamine come in.

Information technology's a reliable "keep-awake" utility with several functionalities that help manage your Mac'south display. You tin can utilize Amphetamine to prevent your Mac from sleeping with the lid opened or closed. It is totally free and available in the macOS App Store.

From our feel, the app is lightweight (doesn't use excessive system resources), has no in-app purchases or ads, and works perfectly. Open the App Store and search for Amphetamine. If you're reading this article on a Mac, visit the Amphetamine details page on the App Store.

Amphetamine in the app store

Install the app and follow the steps below to learn how to apply it to prevent your Mac from sleeping when the chapeau is closed.

1. Launch Amphetamine from the Launchpad or Applications binder. You should see a pill-shaped icon on your Mac's Condition Menu—the right-side of your Mac's menu bar. Select this icon to access Amphetamine'due south menu options.

Amphetamine icon

Amphetamine doesn't have a front-facing interface, so the menu bar is where you set up up everything.

ii. On the Amphetamine bill of fare, get to Quick Preferences and uncheck Allow system sleep when the display is closed.

Quick Preferences and uncheck Allow system sleep when the display is closed

3. A window displaying the features and furnishings of Amphetamine'due south Closed-Brandish style volition pop up on the screen. Read through to understand how to use the app. Click OK to keep.

Features and effects of Amphetamine's Closed-Display mode and OK button

4. Render to the app'southward menu and cull how long you want to go along your Mac turned on with the lid closed.

  • Indefinitely: It volition go on your Mac on until yous manually stop the Closed-Lid session.
  • Minutes: Y'all can choose a preset period (between five to 55 minutes) within which the app volition foreclose your Mac from sleeping.
  • Hours: Amphetamine comes with preset hours: one-ten hours, 12 hours, or 24 hours. Cull your preferred duration and your Mac will go to sleep when the set time frame ends.
  • Other Time/Until: Click this option if you lot want to set your preferred duration (in minutes or hours).
Menu where you choose length of time to keep your Mac turned on
  • While App is Running: This allows yous to proceed your Mac turned on while a specific app is running in the foreground. When y'all click this selection, Amphetamine will display all apps. Choose an app and click the Select button. Your Mac will stay awake while the selected app is running, even when you shut the lid. If you lot desire your Mac to play songs when you shut the lid, simply add Apple Music to this session configuration.
  • While File is Downloading: macOS interrupts ongoing downloads if your device goes to sleep. Information technology'south annoying when this happens, especially if you take to restart the download from scratch. You tin employ the "While File is Downloading" option to forbid this from happening; Amphetamine will keep your Mac on until the download is consummate.

You lot can apply Amphetamine without having to connect to a power source. Although your Mac's battery might drain faster in this style, yous can configure the app to end a session when your bombardment drops to a certain percentage. Open the app'south menu and select Preferences.

Amphetamine > Preferences

In the System Defaults tab, select the option that reads: End session if accuse (%) is below. Afterward, use the slider to select the battery level beneath which Amphetamine would terminate the Airtight-Display session.

End session if charge (%) is below

To stop a Closed-Brandish session, open your Mac'south lid, select the pill-shaped icon on the bill of fare bar and select the Stop Current Session push button.

End Current Session button

To remove Amphetamine from the carte bar, open up the Activity Monitor and force quit the app.

There are other great apps that can help prevent your Mac from sleeping with the chapeau airtight, but Amphetamine does a really corking job. Plus, it sports interesting automation and customization options.

Important Things to Note

Keeping your Mac awake when the lid is closed comes with some downsides, as well. For one, your device may get abnormally hot. This mostly happens when you're running too many apps or when your Mac is left in Closed-Display mode for likewise long. To mitigate this, keep the airtight Mac in a absurd, well-ventilated room.

Place the Mac in a vertical position when you lot close the chapeau (use a vertical laptop stand up, if you have one) so that heat dissipates from the device more than evenly, particularly from the bottom case. Finally, avoid keeping your Mac in a backpack or other enclosed spaces for too long when it'due south in Closed-Display way. Drib a annotate if you have any questions.