Trying to run a Mac Mini as a headless server

I have a Mac Mini (Intel based) that I want to use headless. It used to work, but now if I don’t login with a monitor and keyboard attached it shuts down after a couple of minutes. Makes it hard to use as a headless device. Before it shuts down you can’t even connect using SSH. There has to be a display and keyboard attached and you have to login from there.

It’s running Monterey, but I’m not sure if this began with the Monterey install last fall or more recently.

Any ideas?

I never got the hang of remote login, but with an old keyboard (no monitor), I can log in blind then access it remotely.
I turn on, wait about 1 minute, then type.
It does the job.

Hopefully someone else can give a better method!

I also “had” a Mac Mini (old one, probably 2013 or around). I ran VNC server on the Mac Mini and remote log in from other Mac using VNC viewer. However, the VNC server dropped out evey now and then, and I have to plug in monitor, keyboard and mouse to log in and restart the server. I gave up at the end.

If someone can share a more reliable solution, I may start using the old Mac again.

If you have filevault switched on then you can’t do a remote login.
You’d need to restart with: sudo fdesetup authrestart

1 Like

What about dummy displays either via hardware or software ones (Betterdummy). One of their listed uses is:

  • Use headless Macs (servers) with any resolution and HiDPI mode for remote access.
1 Like

My headless setup (working rock-solid for years):

I bought myself a little hardware dongle years ago that emulates a display. The Mac Mini is pleased because a “display” is connected (look for HDMI dummy on Amazon, it did cost me 5 bucks). Everything works fine.

You do not need to attach a keyboard. You can tell the Mac in the System preferences not to look for a keyboard. It is somewhere in the keyboard settings.

Regarding restarting the Mac: like @aardy already has mentioned, FileVault complicates using a Mac Mini headless (it can be done though with FileVault turned on). My solution was not to bother using FileVault on my Mac Mini (I am fine without FileVault on the Mac Mini, it is no laptop, it is sitting at home, yes, it can be stolen, but …).

This is what I do too - I just got a cheapo hardware dongle.

And I set the headless Mini to a slightly smaller resolution than my regular desktop. That way I can Screen Sharing into it, fullscreen the window, and I have a slight black border so the window is easy to differentiate.

3 Likes

I have a 2018 Mini sitting under my desk. I use Jump Desktop to connect to it, set in its own Space. I have neither a keyboard nor display connected. I have a HCMI dummy plug, but found I did not need to use it. I do not have FileVault enabled.

I’ve had no issues booting it up and connecting in this configuration. No issues other than my back complaining when I need to crawl under the desk to press the start button that is!

Do you mean the Accessibility Keyboard, which I found in the Accessibility button here?

  • I also use one of those “dummy HDMI” dongles
  • since I SSH a lot into it: set up SSH keys to skip username/password

Sorry for not being more precise before. It has been some time ago when I did set that up. Google came to the rescue:

It is part of the Bluetooth settings:

https://www.donovanbrown.com/post/Stop-Bluetooth-Setup-Assistant-on-Mac-Mini-with-no-keyboard-or-mouse

1 Like

dummy dongle and displays app (free from app store) and you should be ok

Yeah, I tried Jump too - and then I realized Screen Sharing seemed to work just as well and was free. :slight_smile: Out of curiosity, is there a particular reason you like Jump Desktop?

Mine didn’t work correctly without the HDMI plug - but it was like $8, so no big deal at all.

I forget why I decided to use Jump. A couple of years ago I needed to spend sometime remote (my dad fell and broke his hip, and I spent the better part of three months at my parent’s place). I remember looking at several tools and I selected Jump.

I got the HDMI plug when I first got the Mini, and was using an eGPU. IIRC there were issue starting up with the eGPU as the only monitors. Eventually that issue was resolved and I no longer needed the plug.

Lots of replies here already, but I have a couple new things to add.

I’ve created separate boot/system and data partitions on my internal drive. This way I can encrypt the data drive and still log in remotely.

The automatic shutdown that occurs when you don’t log in seems to be a recent macOS security feature. My Macs that run Monterey do that but my old server runs Sierra and doesn’t do that. While it wrecks physical security you could always have the server auto-login. It would then mean you couldn’t automount the encrypted data drives.

3 Likes

That is a very good idea! :blush:

I’ve only been using my 2018 Mac mini headless for about a month now, but I have not had it shut down. I wonder if Jump Desktop is somehow keeping it up, even though I’ve logged out?

The Mini is running the latest versions of Monterey. No monitor nor keyboard attached. As Mr. Spock would say, “Interesting …”

I’ve only seen the shutdown after a restart if I wait to long to login. I haven’t seen it after logging out. However I typically don’t log out but just let the computer sleep (and lock).

  • SSH (already included, use SSH keys and don’t worry about passwords)
  • Screen Sharing (included)
  • Screens (not included, has some nice features)

OK, I did some research, this has been discussed on Apple’s site like 5 years ago!
https://discussions.apple.com/thread/7875966
The TL;DR answer is that with FileVault enabled on the boot drive partition there is a special pre-boot login screen. And if you wait more than 5 minutes the system shuts down. The regular, post-boot login screen doesn’t time out, so if you simply log out, or if you don’t use FileVault on the boot drive partition, you won’t see the problem.

There is a sorta workaround, but there is no way to remove the timeout.

2 Likes