Brian's Cabin

Blog

Showing page 1 of 1

Running Coolify on My Headless M4 Mac Mini Server

Jul 27, 2026 2 min read

About a week ago, I set up Docker and Colima on my M4 Mac Mini to create a headless server for my dev work. If you haven't read that yet, go check it out here! Once I had Docker running cleanly, I figured I wanted something nicer than manually managing my Docker Compose files. It'd also be neat to have automated deployments using Git whenever changes were made to my repositories. The solution I came up with? Self-hosting Coolify - an open-source, self-hostable PaaS alternative which will make deployments and proxy handling so much easier. So today, I'll be attempting to install Coolify on my Mac mini using Colima! Colima Setup & Installing Coolify First, I'll need to make some changes to my previous Colima configuration:In this setup, we're mounting our external volume to /data internally because Coolify uses /data/coolify as its default storage location, allowing us to store our Coolify data on our external drive. Optionally, we could also point Docker's data root at our /data mount by modifying Colima's persistent config. This will cause all of our images, containers, and volumes to be written to our external drive instead of disappearing in the event Colima gets wiped (better safe than sorry)! Then, we can replace the docker definition in the config to the following: Done! Now we can enter the Colima runtime using colima ssh and install Coolify (as per the instructions here): Finally, we can now visit http://[macs-local-ip]:8000 and setup Coolify! When choosing the Server Type, select This Machine and update the default SSH port to 2222, as we configured earlier. It's alive!

I Turned My M4 Mac Mini into a Powerful, Secure Headless Server

Jul 22, 2026 5 min read

When the M4 Mac Mini first released back in late 2024, I was quick to pick one up. I had previously used the older Mac Mini M1, which was a good machine, but it only had 8GB of RAM and its Thunderbolt ports were much slower. So when I noticed that Apple released a Mac Mini with the newest M4 chip, and for an incredibly affordable price, I jumped ship and traded my old mini for the newer one... and it was a great choice! But until now, I've been using it as a home server in the messiest way possible. I had Docker folders scattered across the desktop, scripts in my Downloads folder, and honestly just hoped nothing would break during every reboot... Well that changes today! I've gotten tired of it and I decided to use it properly this time - so this is my attempt of turning my M4 Mac Mini into a powerful, headless server! Clean Install & Preparing macOS The first step was nuking the whole thing and starting fresh. Luckily, macOS makes this pretty easy: System Settings > General > Transfer or Reset > Erase All Content & Settings Before wiping the machine, I didn't forget to make a backup of my docker-compose.yml files scattered across the desktop, since those will come in handy after I finish the setup. I also made sure to backup my data with rsync just in-case, since I've been using an external drive to store my media. About thirty minutes later and we're on a clean desktop! After going through the initial macOS setup, including creating my user account (I used admin as the username), it was ready to go. But before disconnecting my monitor and peripherals, there are a few settings worth configuring first. Enable SSH First, we need to enable SSH for remote access by navigating to: System Settings > General > Sharing Turn on Remote Login, then click the (i) button and make sure Allow full disk access for remote users is enabled. This allows us to access the entire filesystem during SSH sessions. While you're here, make sure Local hostname is set to whatever you'd like, as it'll make your SSH connection much easier later (I'll be using server.local). Optionally, you can also enable Remote Management as well in-case you need access over remote desktop (VNC). You can click the (i) icon and choose Options to enable certain permissions for computer access (like Control). Enable FileVault Now, let's make sure FileVault is enabled by heading to: System Settings > Privacy & Security > FileVault If FileVault isn't already enabled, click Turn On and write down the recovery key displayed! FileVault enables full-disk encryption of your Mac's disk to prevent unauthorized access if the machine is ever lost or stolen. The only disadvantage this comes with is that the drive must be unlocked after every reboot, but thankfully newer versions of macOS make it pretty easy to handle remotely (I'll cover that later)! Configure Energy Settings Finally, we need to adjust a few energy settings by navigating to: System Settings > Energy Here, make sure all of these are enabled: Prevent automatic sleeping when the display is off Start up automatically after a power failure Wake for network access At this point, we can finally shove the Mac Mini into our closet and finish everything remotely via SSH: Installation & Setup Next, we'll need to install some prerequisites. Since this is a headless setup, we'll be using Colima (aka. containers on Lima) instead of Docker Desktop. Install Homebrew if you haven't already: Then install Docker and Colima: Now, we need to create our Colima virtual machine: You can replace these configurations with whatever resource allocations you'd like, but I'm maxing it out since this computer won't be used for anything else. Replace /Volumes/primary with the path to your own drive, or remove it if you're not using an external drive. And that's it! Once the Colima runtime starts, we can start our containers normally: docker-compose up -d Handling Reboots This is where things get a little interesting. If the Mac reboots, FileVault holds the boot process hostage at the login screen, meaning none of your services will start until someone "unlocks" it. Since we don't have a monitor plugged in, we'll need to do it over SSH. Luckily, macOS 26 Tahoe introduced a pre-boot SSH server, which lets you SSH in before the OS fully loads. After rebooting, wait about 30-60 seconds and SSH into the Mac as usual: Upon first connection, the connection will drop immediately and you'll see a message like:This system is locked. To unlock it, use a local account name and password. Once successfully unlocked, you will be able to connect normally. This is completely normal - the Mac is just decrypting the drive and booting up during this process! Wait another minute, SSH back in, and start Colima manually: Storage & External Drives If you're using an external drive for your data (aka. the volume we mounted to Colima earlier), you may experience permission issues. This can occur when the drive's ownership is set to the root user, because Colima runs on the standard user account. To solve this, you'll need to transfer drive ownership to your user account: Additionally, you should force auto-mounting of your external drives on system boot, or else they won't be accessible over SSH and you'll have to login using the OS interface: Handling Encrypted Volumes If you're using an external drive with APFS encryption like myself, you'll need to unlock it after every reboot as well: Enter the passphrase to your drive when prompted, and you'll see "Unlocked and mounted APFS Volume" once it's ready! Conclusion And that's it! With this new and improved setup, I've managed to turn my Mac mini into an organized, compact, fully headless server that I can manage entirely over SSH. Much better compared to the disorganized setup I started with. What's next? I'll be attempting to install Coolify on my new headless setup to make management even easier! Check it out here.

Starting a blog, finally.

Jan 18, 2026 1 min read

Welcome! I'll be posting things I personally find interesting and want to talk about here. But why a blog, you may ask? Well, I think it's a cool way to document my life and I've been wanting to do it for the longest time. I've tried journaling in the past, but I found that pen and paper just isn't always my thing. Don't get me wrong, pen and paper is still much better than its digital counterparts in some cases (like for learning, here's a cool study I found highlighting the differences), but it has some significant disadvantages. One of these disadvantages is that it prevents me from sharing my thoughts with the world. With this blog page, I'll be able to do just that! Hope you stick around! :D