# Keep the Mac awake

> Turn off computer, disk and display sleep on the gateway Mac, with one button in the app or with pmset in Terminal, and make the Mac come back by itself after a restart.

Source: https://docs.mycrmsim.com/guides/imessage-setup-keep-awake
Updated: 2026-11-20

A Mac that sleeps stops sending and receiving, and the line shows
**Inactive** on the dashboard. The app holds off idle sleep while it runs
(**Keep Alive**), but macOS can still put the disk or the whole Mac to
sleep. Recent macOS versions do this even when System Settings says
*Never*. Turn sleep off at system level once per Mac.

This is meant for a Mac that stays plugged in. Don't do it on a laptop you
carry around.

### The quick way: one button in the app

1. In the app, open **Setup** in the top bar.
2. Find **Stay awake 24/7**. If it says *"Still on: …"*, click **Turn sleep
   off**.
3. Enter the Mac's administrator password when macOS asks.

The row turns green with *"Sleep, disk sleep, display sleep and the screen
saver are off."*

### Or in Terminal

On the app's main window, the **Prevent Disk Sleep** card (*Keep this Mac
always on*) has an **Instructions** button that walks through the same
commands. See the screenshot in
[Install the Mac app](https://docs.mycrmsim.com/guides/imessage-setup-install#check-the-mac-in-the-dashboard). To run them
yourself, open **Terminal** and run:

```bash
sudo pmset -a sleep 0 disksleep 0 displaysleep 0 standby 0 autopoweroff 0 powernap 0 hibernatemode 0
```

Enter the Mac's password when asked. Then check the result:

```bash
pmset -g
```

Look for `sleep 0` and `disksleep 0` in the output. The settings stay after
a restart. Run the commands again if a macOS update turns sleep back on.

You don't need a separate keep-awake app such as Amphetamine.

### Make it come back after a restart

A power cut or a macOS update leaves the Mac at the login screen, and
nothing runs until someone logs in. In the app's **Setup** list, turn on:

- **Log in automatically after a restart**: click **Open Users & Groups**
  and set **Automatically log in as** to this Mac's user. If it's greyed
  out, turn off FileVault in **Privacy & Security** first.
- **Open at login**: the app starts by itself after login.

Also on the Mac:

- Keep it plugged in. A small UPS covers short power cuts.
- In **System Settings › Energy** (on older macOS, **Energy Saver**), turn on
  **Start up automatically after a power failure** and **Wake for network
  access**, where your Mac has them.
- Don't close a laptop's lid. A closed lid sleeps the Mac whatever the
  settings say.

If the Mac still drops off, see
[Mac offline or iMessages stuck](https://docs.mycrmsim.com/guides/mac-offline).
