Summary
WIP setup notes from turning my old mac into a usable server.
prerequisites
- 1x mac, on power adapter
- new email address
basic setup
- Create a new local user on the Mac.
- Create a new iCloud account. This should also enable imessage.
- Make the Mac never sleep.
- In Settings, select the option “prevent automatic sleeping on power adapter when the display is off”
- Ensure “wake for network access” is set to “always”
- Go to Users & Groups → select account as the “automatically login as” account
- First need to disable FileVault for the account
- Set up
caffeinateon startup (thx gemini !)-
- Open Automator: Press
Cmd + Spaceand type “Automator”.
- Open Automator: Press
- Create Application: Select New Document, then choose Application.
- Add Shell Script: Search for “Run Shell Script” in the actions library and drag it to the workflow area.
- Enter Command: Replace
catin the shell script box withcaffeinate -sid - Save App: Go to File > Save, name it “KeepAwake”, and save it to your Applications folder.
- Add to Login Items:
- Go to System Settings > Users & Groups.
- Select your user, click Login Items, and click the
+button. - Select the “KeepAwake” app created in step 5.
-
- Enable SSH access
- Turn on “remote login” in settings
- Select “allow full disk access for remote users”
- Install tailscale
- Ensure “launch tailscale at login” is selected
- Test SSH access via tailscale
ssh user@hostnameshould work on another tailscale-enabled device.- Alternatively,
ssh-keygenthenssh-copy-id user@hostnameto save your public key
- Make terminal nice
- new mac setup for instructions
- Install docker
- Enable “start docker desktop when you sign in”
- Increase ram/disk/cpu limits as fit
- Ensure you can
docker pssuccessfully over SSH
- Ensure server is accessible after a reboot (
sudo rebootthen re-SSH)
applications
- Set up cloudflared: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/do-more-with-tunnels/local-management/as-a-service/macos/
brew install cloudflaredsudo cloudflared service installsudo launchctl start com.cloudflare.cloudflared <TOKEN>(fetch token once the tunnel is created)- Start a local process at
port- Make sure it’s serving on host
0.0.0.0and the subdomain is included inallowedHostsetc. based on framework - Make sure to give it access to the directory!
- Make sure it’s serving on host
- In the console, create a route from
subdomain.domain.tldtohttp://localhost:port- Should be
httpinstead ofhttps…
- Should be
- Set up uptime-kuma:
- Enable cloudflared integration: https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy-with-Cloudflare-Tunnel
- Restore from a previous instance / upgrade from v1 to v2: https://github.com/louislam/uptime-kuma/wiki/Migration-From-v1-To-v2
scp host@ip:/path/to/kuma.db ~/Downloads/kuma.db- Replace the current
kuma.dbwith the backed up version. - Wait for the migration to complete (~10min). Monitor via
/migrate-statusendpoint
redirects
With cloudflared, redirects are created as follows:
- Create an
Arecord in DNS and make it point to192.0.2.1. Make sure it is proxied through cloudflare. - Go to the ‘rules’ page and create a new redirectg rule for that subdomain.


sprout