Mac hosting guide

Onboard Your Dev Team to a Shared Remote Mac

Give each developer their own macOS account on the shared Mac, with their own SSH key and DerivedData. The runbook below covers dscl, authorized_keys and a weekly disk audit. A Dedicated M4 Pro suits a team of two to four.

Figment editorial teamPublished Updated Facts checked November 10, 2026

Figment Mac plans

US East. Pay before use. Hourly and daily too.

Intel Mac VM4 shared vCPUs, 4GB RAM, 80GB SSD$25per monthApple Silicon Mac VM4 shared vCPUs, 4GB RAM, 65GB SSD$39per monthDedicated M4 Pro12-core CPU, 24GB RAM, 512GB SSD$199per month

Minimum first purchase: $25 of account credit, used for your rental.

For two to four iOS developers on one rented Mac, create one macOS account per developer, give each their own SSH key, and keep DerivedData in each home directory. The runbook below does that with dscl, authorized_keys and a weekly disk audit. You have administrator access to your own rented Mac, so you can run every command yourself.

Why does one shared login break team builds?

Xcode stores intermediate build products in ~/Library/Developer/Xcode/DerivedData. When two developers build the same scheme from the same macOS account at once, Xcode's build record lock and index database conflict. The result is corrupted incremental builds, spurious "failed to generate header" errors, and races that vanish on restart and return the next time two people queue a build together. Build caches also collide, and one person's DerivedData can fill the disk for everyone.

Separate macOS accounts avoid all of this. Each user's home directory (/Users/alice, /Users/bob) holds its own DerivedData, its own Keychain and its own SSH agent socket. No build state is shared unless you configure a shared volume. For the DerivedData defaults and custom location options, see Apple's Xcode help on Change the location of derived data.

How do I create a macOS account for each developer?

Log in with an admin account and run this block for each team member. Check existing UniqueIDs first with dscl . -list /Users UniqueID. IDs at or above 501 are standard for human accounts. Increment UID_NUM for each new user.

#!/usr/bin/env bash
# Run as admin on the remote Mac. Repeat per developer.
set -euo pipefail

NEW_USER=alice
REAL_NAME="Alice Developer"
UID_NUM=502   # must be unique; verify with: dscl . -list /Users UniqueID

sudo dscl . -create /Users/$NEW_USER
sudo dscl . -create /Users/$NEW_USER UserShell /bin/zsh
sudo dscl . -create /Users/$NEW_USER RealName "$REAL_NAME"
sudo dscl . -create /Users/$NEW_USER UniqueID $UID_NUM
sudo dscl . -create /Users/$NEW_USER PrimaryGroupID 20   # 20 = staff
sudo dscl . -create /Users/$NEW_USER NFSHomeDirectory /Users/$NEW_USER

TEMP_PW="$(openssl rand -hex 12)"
sudo dscl . -passwd /Users/$NEW_USER "$TEMP_PW"
sudo createhomedir -c -u "$NEW_USER" >/dev/null

# Hand the password over through your team secret manager, never chat/email.
printf 'Stored temp password for %s in secret manager? Rotate on first login.\n' "$NEW_USER"

The createhomedir call creates the full home-directory skeleton, including ~/Library, that macOS and Xcode expect. Do not print the generated password to a shared terminal or log. Paste it into your secret manager and share it from there. Each developer should change it on first login with passwd.

How do I give each developer SSH access?

Each developer generates a keypair on their own laptop (ssh-keygen -t ed25519 -C alice@team) and sends you the public half. Add it to that user's authorized_keys on the remote Mac:

# Run as admin on the remote Mac
set -euo pipefail
NEW_USER=alice
PUBKEY="ssh-ed25519 AAAAC3Nza...== alice@laptop"   # replace with the actual key

sudo install -d -m 700 -o "$NEW_USER" -g staff /Users/$NEW_USER/.ssh
printf '%s\n' "$PUBKEY" | sudo tee -a /Users/$NEW_USER/.ssh/authorized_keys >/dev/null
sudo chmod 600 /Users/$NEW_USER/.ssh/authorized_keys
sudo chown "$NEW_USER":staff /Users/$NEW_USER/.ssh/authorized_keys

Do not reuse one keypair across accounts. If Alice and Bob share a private key, you cannot tell who made which change, and revoking access means rekeying both accounts. Keep each authorized_keys file owned by its user at mode 600, because sshd rejects keys with loose permissions. Once each developer logs in to their own account, GitHub's SSH agent forwarding guide covers the client-side setup, so they can push to GitHub without copying private keys to the remote Mac.

How do I keep DerivedData separate per developer?

With one account per developer, Xcode's default path (~/Library/Developer/Xcode/DerivedData) is already isolated, because it lives inside each user's home directory.

To make the path visible and easy to clean, set it explicitly. In Xcode open Settings > Locations, change Derived Data to Custom, and enter ~/Developer/DerivedData. The shorter path also tidies xcodebuild invocations. The example below is illustrative, not a benchmark. Substitute your own project, scheme and destination:

xcodebuild build \
  -project YourApp.xcodeproj \
  -scheme YourAppScheme \
  -destination 'generic/platform=iOS' \
  -derivedDataPath "$HOME/Developer/DerivedData/YourAppScheme"

Passing -derivedDataPath explicitly in CI scripts prevents a stale path inherited from an earlier session on the same account.

How do I stop the shared disk from filling up?

Four active developers accumulate gigabytes of DerivedData, Archives and simulator runtimes quickly. Run this audit weekly or attach it to launchd:

#!/usr/bin/env bash
# disk-audit.sh – run as admin on the remote Mac
set -euo pipefail

echo "=== DerivedData per user ==="
du -sh /Users/*/Library/Developer/Xcode/DerivedData 2>/dev/null || echo "(none)"

echo
echo "=== Archives per user ==="
du -sh /Users/*/Library/Developer/Xcode/Archives 2>/dev/null || echo "(none)"

echo
echo "=== iOS Simulator runtimes (shared) ==="
du -sh /Library/Developer/CoreSimulator/Profiles/Runtimes/ 2>/dev/null || echo "(none)"

echo
echo "=== Disk free ==="
df -h / | awk 'NR==2 {printf "Free: %s of %s (%s used)\n", $4, $2, $5}'

If a user's DerivedData exceeds 20 GB, ask them to run rm -rf ~/Library/Developer/Xcode/DerivedData and let Xcode rebuild. Archives are worth keeping until the matching App Store Connect build is processed, then safe to remove. macOS has no per-user disk quota setting in the GUI. For strict enforcement on a shared volume you would enable BSD quotas with edquota and quotaon, but most small teams find the weekly audit enough.

What does the onboarding runbook look like at a glance?

StepTool / CommandWho runs it
Create macOS accountdscl block aboveAdmin
Initialise home directorycreatehomedir -c -u aliceAdmin
Hand over temp passwordSecret managerAdmin → Developer
Add developer's SSH public keyauthorized_keys blockAdmin
Developer clones repogit clone git@github.com:…Developer (own account)
Set custom DerivedData pathXcode > Settings > LocationsDeveloper
Weekly disk auditdisk-audit.shAdmin or launchd
Remove stale DerivedDatarm -rf ~/Library/Developer/Xcode/DerivedDataDeveloper

Which Figment Mac plan fits a small team?

The Dedicated M4 Pro 48 GB ($349 a month, or $299 a month on a 12-month term) is the natural fit for a shared team Mac: a whole Mac with an M4 Pro chip, 48GB RAM and a 512GB SSD, and administrator access, so the dscl steps above work as written. A VM such as the Apple Silicon Mac VM ($39 a month) has 4 shared vCPUs and 4GB RAM, which suits one developer or light shared use more than several concurrent builds. Each Figment plan belongs to one customer account, and macOS accounts you create on the Mac are separate from that. If you need several Macs, we quote that on a call. Figment does not back up your Mac, so keep team code in Git. See all Mac hosting plans.


Related: Git and Xcode Source Control on a Remote Mac · Upload dSYMs to App Store Connect from Remote Mac · GitHub Actions Self-Hosted Runner on Mac

Which Figment Mac fits this work?

Intel Mac VM from $25 a month, Apple Silicon Mac VM from $39, or a Dedicated M4 Pro for $199. Hourly and daily plans too. You pay before use, starting with at least $25 of account credit.

Choose a Mac plan