Skip to content
Merged

Docs #52

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Automated setup scripts for configuring an Apple Silicon Mac Mini as a home serv
3. Copy `config/config.conf.template` to `config/config.conf` and set your `SERVER_NAME`
4. Create these 1Password items: "operator", "TimeMachine", "Plex NAS", "Apple", "OpenSubtitles"

**Setup** (15 minutes):
**Setup** (15-30 minutes):

1. **On dev Mac**: `./prep-airdrop.sh` (creates deployment package)
2. **AirDrop** the generated folder to your Mac Mini
Expand Down
8 changes: 4 additions & 4 deletions app-setup/rclone-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# rclone-setup.sh - Dropbox synchronization setup script for Mac Mini server
#
# This script sets up rclone-based Dropbox synchronization natively on macOS with:
# - rclone configuration transfer from airdrop-prep.sh setup
# - rclone configuration transfer from prep-airdrop.sh setup
# - Periodic Dropbox sync to local filesystem
# - Auto-start configuration via LaunchAgent
#
Expand All @@ -12,7 +12,7 @@
# --skip-sync: Skip initial sync test
# --sync-interval: Override sync interval (default from config)
#
# Expected configuration files from airdrop-prep.sh:
# Expected configuration files from prep-airdrop.sh:
# rclone.conf # rclone configuration with OAuth tokens (copied to app-setup dir by first-boot.sh)
# dropbox_sync.conf # Dropbox sync configuration (copied to app-setup dir by first-boot.sh)
#
Expand Down Expand Up @@ -244,7 +244,7 @@ load_dropbox_config() {
source "${dropbox_config}"
else
log "❌ Dropbox configuration file not found: ${dropbox_config}"
log "This file should have been created by airdrop-prep.sh and copied by first-boot.sh"
log "This file should have been created by prep-airdrop.sh and copied by first-boot.sh"
exit 1
fi

Expand Down Expand Up @@ -279,7 +279,7 @@ install_rclone_config() {

if [[ ! -f "${source_config}" ]]; then
log "❌ rclone configuration not found: ${source_config}"
log "This file should have been created by airdrop-prep.sh and copied by first-boot.sh"
log "This file should have been created by prep-airdrop.sh and copied by first-boot.sh"
exit 1
fi

Expand Down
10 changes: 5 additions & 5 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The system uses 1Password for initial credential retrieval during setup preparat

**MONITORING_EMAIL**: Email address for system notifications

- **Default**: "<andrew.rich@gmail.com>" (should be customized)
- **Default**: "<your-email@example.com>" (should be customized)
- **Usage**: Future monitoring system integration
- **Example**: `MONITORING_EMAIL="admin@yourdomain.com"`

Expand Down Expand Up @@ -171,7 +171,7 @@ MONITORING_EMAIL="homelab@yourdomain.local"

### Configuration Validation

Before running `airdrop-prep.sh`, verify your 1Password items exist:
Before running `prep-airdrop.sh`, verify your 1Password items exist:

```bash
# Test 1Password connectivity
Expand Down Expand Up @@ -268,7 +268,7 @@ chmod 600 ~/macmini-setup/config/wifi_network.conf

### Custom Package Lists

Modify the package installation by editing these files before running `airdrop-prep.sh`:
Modify the package installation by editing these files before running `prep-airdrop.sh`:

**config/formulae.txt**: Command-line tools installed via Homebrew
**config/casks.txt**: GUI applications installed via Homebrew
Expand Down Expand Up @@ -303,7 +303,7 @@ ONEPASSWORD_VAULT="Staging Infrastructure"
MONITORING_EMAIL="staging-alerts@company.com"
```

Use with airdrop-prep.sh by copying the appropriate config:
Use with prep-airdrop.sh by copying the appropriate config:

```bash
cp config-production.conf config/config.conf
Expand All @@ -330,7 +330,7 @@ The configuration system supports future extension points:
To migrate configuration to a new Mac Mini:

1. **Update SERVER_NAME** in config.conf if needed
2. **Run airdrop-prep.sh** with updated configuration
2. **Run prep-airdrop.sh** with updated configuration
3. **Transfer setup package** to new Mac Mini
4. **Run first-boot.sh** as normal

Expand Down
24 changes: 14 additions & 10 deletions docs/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Test SSH connectivity from your development Mac:
# Test operator SSH access
ssh operator@macmini.local

# Test admin SSH access
# Test admin SSH access
ssh admin@macmini.local
```

Expand All @@ -70,13 +70,9 @@ The automatic setup adds iTerm to the dock. **Switch from Terminal to iTerm** fo

### Administrative Tasks

The operator account can perform most server management tasks:
The operator account can perform some server management tasks:

```bash
# Package management
brew install <package>
brew update && brew upgrade

# Native application management (after app setup)
launchctl list | grep plex
launchctl stop com.plexapp.plexmediaserver
Expand All @@ -87,6 +83,14 @@ brew services list
ps aux | grep "Plex Media Server"
```

The administrator account must be used for package installation:

```bash
# Package management
brew install <package>
brew update && brew upgrade
```

### Switching to Admin Account

For system-level changes that require the original admin account:
Expand Down Expand Up @@ -241,7 +245,7 @@ launchctl start com.plexapp.plexmediaserver

- **Notifications**: Click "Configure in System Preferences" for system notifications

**Network Tab**:
**Network Tab**:

- **System sleep**: "Prevent computer from sleeping with active transfers" (if desired)

Expand Down Expand Up @@ -276,7 +280,7 @@ ssh admin@macmini.local 'echo SSH working'

- **Setup logs**: `~/.local/state/macmini-setup.log`
- **Application setup logs**: `~/.local/state/macmini-apps.log`
- **Plex logs**: `/tmp/plex-out.log` and `/tmp/plex-error.log`
- **Plex logs**: `/Users/Shared/PlexMediaServer/Plex Media Server/Logs`
- **System logs**: Use Console.app or `log show --predicate 'processImagePath contains "Plex Media Server"'`

### Time Machine Verification
Expand All @@ -302,7 +306,7 @@ cat ~/.ssh/id_ed25519_operator.pub >> ~/.ssh/authorized_keys

### Sudo Access

**TouchID is not available** for sudo commands, because TouchID cannot coexist with automatic login. For remote SSH sessions, you'll need to enter the operator password.
**TouchID is not available** for sudo commands, because TouchID cannot coexist with automatic login.

**Password location**: `op://personal/operator/password` in 1Password

Expand All @@ -320,7 +324,7 @@ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --listapps
### Immediate Tasks

1. **✅ Automatic dock customization** (happens on first login)
2. **✅ Verify SSH access**
2. **✅ Verify SSH access**
3. **Run application setup scripts** as needed (as admin user)
4. **Configure additional services** as needed
5. **Test native applications** after setup (check LaunchAgent status)
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/first-boot.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The `first-boot.sh` script performs complete automated setup of your Mac Mini se
1. **AirDrop the complete macmini-setup folder** from your development Mac

> You can use [airdrop-cli](https://github.com/vldmrkl/airdrop-cli) (requires Xcode) to AirDrop files from the command line!
> Install: (`brew install --HEAD vldmrkl/formulae/airdrop-cli`)
> Install: `brew install --HEAD vldmrkl/formulae/airdrop-cli`

2. The folder appears in `~/Downloads/macmini-setup` on the Mac Mini (default name)

Expand Down
74 changes: 55 additions & 19 deletions docs/setup/prep-airdrop.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,64 @@ The prep script creates a complete setup package:

```plaintext
macmini-setup/
├── ssh_keys/
│ ├── authorized_keys # Admin SSH access
│ └── operator_authorized_keys # Operator SSH access
├── scripts/
│ ├── first-boot.sh # Main setup script
│ ├── operator-first-login.sh # Operator customization (runs automatically)
│ └── app-setup/ # Application installers
├── app-setup/
│ ├── catch-setup.sh
│ ├── config/
│ │ ├── dropbox_sync.conf
│ │ ├── FileBot_License_XXXXXXXX.psm
│ │ ├── plex_nas.conf # Plex NAS hostname configuration
│ │ └── rclone.conf
│ ├── filebot-setup.sh
│ ├── plex-setup.sh
│ ├── rclone-setup.sh
│ ├── run-app-setup.sh
│ ├── templates/
│ │ ├── mount-nas-media.sh
│ │ ├── start-plex.sh
│ │ ├── start-rclone.sh
│ │ └── transmission-done.sh
│ └── transmission-setup.sh
├── bash/ # Bash config (if configured)
├── config/
│ ├── config.conf # Server settings
│ ├── formulae.txt # Homebrew packages
│ ├── apple_id_password.url # One-time Apple ID link
│ ├── casks.txt # Homebrew applications
│ ├── config.conf # Server settings
│ ├── dev_fingerprint.conf # Safety check data
│ ├── formulae.txt # Homebrew packages
│ ├── iterm2.plist # iTerm2 profile/settings (optional)
│ ├── keychain_manifest.conf # Keychain service identifiers
│ ├── mac-server-setup-db # External keychain file
│ ├── timemachine.conf # Backup configuration
│ ├── apple_id_password.url # One-time Apple ID link
│ └── wifi_network.conf # WiFi credentials (only if script-based config)
└── app-setup/
├── config/
│ └── plex_nas.conf # Plex NAS hostname configuration
└── plex-setup.sh # Plex setup script
└── README.md # Setup instructions
│ ├── logrotate.conf
│ ├── mac-server-setup-db # External keychain file
│ ├── Orangebrew.terminal # Terminal.app profile (optional)
│ └── timemachine.conf # Backup configuration
├── DEPLOY_MANIFEST.txt
├── first-boot.sh # Main setup script
├── README.md # Setup instructions
├── scripts/
│ ├── operator-first-login.sh # Operator customization (runs automatically)
│ ├── setup-apple-id.sh
│ ├── setup-application-preparation.sh
│ ├── setup-bash-configuration.sh
│ ├── setup-command-line-tools.sh
│ ├── setup-dock-configuration.sh
│ ├── setup-firewall.sh
│ ├── setup-hostname-volume.sh
│ ├── setup-log-rotation.sh
│ ├── setup-package-installation.sh
│ ├── setup-power-management.sh
│ ├── setup-remote-desktop.sh
│ ├── setup-shell-configuration.sh
│ ├── setup-ssh-access.sh
│ ├── setup-system-preferences.sh
│ ├── setup-terminal-profiles.sh
│ ├── setup-timemachine.sh
│ ├── setup-touchid-sudo.sh
│ └── setup-wifi-network.sh
└── ssh_keys/
├── authorized_keys # Admin SSH access
├── id_ed25519
├── id_ed25519.pub
└── operator_authorized_keys # Operator SSH access
```

## Security Features
Expand All @@ -124,7 +160,7 @@ macmini-setup/
2. **Enable AirDrop:** Press Cmd-Shift-R to open AirDrop, and select "Allow me to be discovered by: Everyone"
3. **AirDrop the entire macmini-setup folder** from your development Mac
> You can use [airdrop-cli](https://github.com/vldmrkl/airdrop-cli) (requires Xcode) to AirDrop files from the command line!
> Install: (`brew install --HEAD vldmrkl/formulae/airdrop-cli`)
> Install: `brew install --HEAD vldmrkl/formulae/airdrop-cli`
4. The folder will appear in `~/Downloads/macmini-setup` on the Mac Mini
5. Proceed with [First Boot Instructions](first-boot.md)

Expand Down
103 changes: 0 additions & 103 deletions docs/transmission-missing-gui-settings.md

This file was deleted.

6 changes: 3 additions & 3 deletions scripts/airdrop/rclone-airdrop-prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# This script handles rclone installation, OAuth authentication, and configuration
# transfer for Dropbox synchronization on the server.
#
# Called by: airdrop-prep.sh
# Called by: prep-airdrop.sh
# Requires: DROPBOX_SYNC_FOLDER, DROPBOX_LOCAL_PATH, OUTPUT_PATH, SERVER_NAME_LOWER
#

Expand All @@ -15,12 +15,12 @@ set -euo pipefail

# Check required variables are set
if [[ -z "${OUTPUT_PATH:-}" ]]; then
echo "Error: OUTPUT_PATH not set - this script must be called from airdrop-prep.sh"
echo "Error: OUTPUT_PATH not set - this script must be called from prep-airdrop.sh"
exit 1
fi

if [[ -z "${SERVER_NAME_LOWER:-}" ]]; then
echo "Error: SERVER_NAME_LOWER not set - this script must be called from airdrop-prep.sh"
echo "Error: SERVER_NAME_LOWER not set - this script must be called from prep-airdrop.sh"
exit 1
fi

Expand Down
Loading