Setup problems¶
This page covers prep-airdrop.sh on the dev Mac, first-boot.sh on the new server, and run-app-setup.sh with the app setup scripts.
The first-boot log is ~/.local/state/<hostname>-setup.log in the admin account. The app setup logs are ~/.local/state/<hostname>-app-setup.log and ~/.local/state/<hostname>-apps.log. See Log files.
prep-airdrop.sh stops because OP_SERVICE_ACCOUNT_TOKEN is set¶
Cause
prep-airdrop.sh needs an interactive 1Password CLI sign-in. A 1Password service account token in the environment limits the CLI to the vaults of that service account, so the script refuses to run.
Check
set means the script stops with ERROR: OP_SERVICE_ACCOUNT_TOKEN is set.
Fix
-
Run the script in a subshell without the token:
prep-airdrop.sh cannot find a 1Password item¶
Cause
- The 1Password CLI is not signed in.
- A vault name or an item title in
config/config.confdoes not match 1Password exactly.
Check
op whoami
op item get "<item title>" --vault "<vault name>" --format json >/dev/null && echo "found"
An error from op whoami means the CLI is not signed in. An error from op item get means the title or the vault name is wrong. The names are case sensitive.
Fix
- Run
op signin. - Correct the
ONEPASSWORD_*values inconfig/config.confso that they match the vault and item titles exactly. - Run
prep-airdrop.shagain.
For the full list of items, see Prerequisites and Configure.
first-boot.sh says it requires a GUI session¶
Cause
You started first-boot.sh over SSH, or from another non-desktop session. The script creates accounts, changes System Settings and shows dialogs, so it needs the local desktop.
Check
Aqua means a desktop session. Background or another value means the script stops with This script requires a GUI session to run properly.
Fix
- Sign in at the Mac mini itself, or through Screen Sharing.
- Open Terminal there and run
first-boot.shagain.
first-boot.sh stops with SAFETY ABORT¶
Cause
- The setup folder was not made by
prep-airdrop.sh, so it has no development machine fingerprint. - You ran
first-boot.shon the dev Mac. The script compares the hardware UUID with the fingerprint fromprep-airdrop.shand stops if they are equal.
Check
Compare the output with the Development fingerprint line in the error. If they are the same, you are on the dev Mac.
Fix
- On the dev Mac, run
prep-airdrop.shagain to build a new package. - Copy the whole package folder to the new server.
- Run
first-boot.shon the new server.
first-boot.sh says required files are missing from the deploy package¶
Cause
The package on the server does not match its deploy manifest. A copy was interrupted, or files were removed from the folder after prep-airdrop.sh made it.
Check
Read the Required file missing from deploy package: lines in the terminal or in the first-boot log:
Each line names one missing file.
Fix
- On the dev Mac, run
prep-airdrop.shagain. - Copy the complete new package to the server.
- Run
first-boot.shagain.
first-boot.sh reports that FileVault is enabled¶
Cause
FileVault was turned on during macOS setup. FileVault prevents automatic login, and the operator account needs automatic login to start its services after a reboot.
Check
FileVault is On confirms the cause.
Fix
- At the script's offer to turn FileVault off, press Control-C to stop the script. Turning FileVault off before you run the script is the tested path. Answering
Ncontinues setup with FileVault on, and automatic login then fails. - Turn FileVault off in System Settings > Privacy & Security > FileVault, or run
sudo fdesetup disable. - Wait until
fdesetup statusprintsFileVault is Off.This can take an hour or more. - Run
first-boot.shagain. See step 5 of the tutorial.
SSH to the server is refused or asks for a password¶
Cause
- Remote Login is off.
- The SSH keys were not in the package, so
authorized_keyswas not installed. - The application firewall blocks
sshd.first-boot.shturns the firewall on and allows/usr/sbin/sshd.
Setup does not turn off SSH password login. A password prompt means that the server did not accept your key.
Check
On the server:
sudo systemsetup -getremotelogin
ls -l ~/.ssh/authorized_keys
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --listapps
Remote Login: Off means SSH is off. No such file or directory means no key was installed for this account. If the firewall list shows /usr/sbin/sshd as blocked, the firewall stops SSH.
Fix
- On the dev Mac, make sure that
~/.ssh/id_ed25519and~/.ssh/id_ed25519.pubexist before you runprep-airdrop.sh. - Build the package again and run
first-boot.shagain. It turns on Remote Login, installs the keys foradminandoperator, and runssetup-firewall.sh, which allows/usr/sbin/sshdthrough the firewall.
Touch ID does not work for operator¶
Cause
This is by design. On macOS, Touch ID and automatic login cannot be used together. The admin account has Touch ID. The operator account has automatic login.
Check
The output is operator when automatic login is set for that account.
Fix
- Use the
operatorpassword, or work asadminand usesudo -iu operator.
Passwords app rejects the operator password after a reboot¶
Cause
This is a known limitation of automatic login. In a session that automatic login started, the Passwords app rejects the correct password. It can also happen when operator has no SecureToken.
Check
The output must say Secure token is ENABLED. first-boot.sh grants the token.
Fix
- If the token is not enabled, run the
sysadminctl -secureTokenOncommand that the first-boot log prints. - Log out of the
operatoraccount. - Log in again and type the password. The Passwords app then unlocks.
brew is not found in a new terminal¶
Cause
The shell started before the Homebrew setup, or the shell profile was not read.
Check
~/.bash_profile is a link that the setup made. If PATH has no /opt/homebrew/bin, the profile was not read.
Fix
- Close the terminal and open a new one, or run
source ~/.bash_profile.
run-app-setup.sh says it must be run from the app-setup directory¶
Cause
run-app-setup.sh checks the current folder and stops when you run it from another folder. It also stops when config/config.conf is not in that folder, which means that first-boot.sh did not finish.
Check
pwd must print the app-setup folder.
Fix
-
Go to the folder and run the script from there:
-
If
config/config.confis missing, runfirst-boot.shagain until it finishes.
run-app-setup.sh stops at the first script¶
Cause
A plain ./run-app-setup.sh runs every *-setup.sh script and stops at the first error. The first script is rclone-setup.sh, which stops when DROPBOX_SYNC_FOLDER is empty. Most other scripts stop when their config keys or credentials are missing.
Check
grep -E "failed with exit code|not found" ~/.local/state/<hostname>-app-setup.log | tail -20
tail -50 ~/.local/state/<hostname>-apps.log
The first file names the script that failed. The second file shows the error from inside that script.
Fix
-
Run only the scripts you need, one at a time:
-
Or run all of them and skip past failures:
-
Before you run a script, read its row in the stack matrix and set the keys it needs.
See Run app setup.