Synology Administration Guide

Synology Administration Guide#

1 Syncthing Deployment#

1.1 Synology DSM Implementation (Docker)#

  1. Inotify Limit:
    echo "fs.inotify.max_user_watches=204800" | sudo tee -a /etc/sysctl.d/90-override.conf
    sudo sysctl -p /etc/sysctl.d/90-override.conf
  2. User IDs: Use Task Scheduler to run id > /volume1/docker/id.txt to find UID/GID (e.g., 1027/100).
  3. Docker Compose Highlights:
    environment:
      - PUID=1027
      - PGID=100
      - TZ=America/New_York
    volumes:
      - ./config:/config
      - /volume2/HP3Storage:/volume2/HP3Storage

1.2 Standard .stignore Patterns#

Create a .stignore file in the root of the sync folder:

(?i)#recycle
@eaDir
.DS_Store
.stfolder
.stignore
$RECYCLE.BIN
Thumbs.db
Desktop.ini
.SynologyWorkingDirectory

2 Storage & Maintenance Commands#

2.1 iPerf3#

sudo -i
synogear install
iperf3 -s -p 11111

2.2 Locked Folder Cleanup#

Remove Synology metadata directories when cleaning up a locked folder:

Linux - Aliases

Linux - Aliases#

Ubuntu Workstation Configuration#

The Ubuntu workstation keeps Linux aliases in the tracked Scripts repository rather than duplicating them directly in .bashrc:

/home/marc/Scripts/Linux/Aliases/Linux-Aliases.bash

The local /home/marc/.bashrc sources this file. After pulling alias changes, reload the shell with:

source ~/.bashrc

The active workstation aliases are:

Alias or function Purpose
pulllab Safely force-aligns /home/marc/Obsidian/Homelab with origin/main.
pushlab Converts and publishes the Homelab vault to the remote Hugo VM, then backs up the vault to GitHub. Use pushlab --sync-only to skip remote publishing and vault backup.
gitstatus Reports Git repository status under /home/marc.
speed Runs the Linux disk benchmark against $HOME, or another directory selected with SPEED_TARGET_DIR.
pushscripts Commits and pushes Linux script and alias changes to GitHub.
pullscripts Pulls the latest Scripts repository changes from GitHub.

The MacOS aliases and scripts are not sourced or modified by this configuration.

Homelab Device Management

🏠 Homelab Device Management#

1. Executive Summary & Architecture#

This document defines the Single Source of Truth (SSOT) Device Management Architecture for the Homelab environment.

To optimize speed, usability, and data integrity:

  1. Google Sheets serves as the Primary User Entry Interface. Adding or editing devices in the spreadsheet is fast, accessible on mobile/desktop, and requires zero complex IPAM UI navigation.
  2. NetBox (v4.2) serves as the Automated IPAM & DCIM System of Record. It is hosted on 10.1.2.202:8082 and reconciled directly from Google Sheets via terminal alias.
flowchart LR
    A["Google Sheets (User Entry)"] -->|Mac Studio Alias: netbox| B["sync_gsheets_to_netbox.py"]
    B -->|Non-Destructive Delta Sync| C["NetBox v4.2 (10.1.2.202:8082)"]
    C -->|API & Interoperability| D["UniFi UDM / Home Assistant / Pi-hole"]

2. Standard Operating Procedure (SOP) for Device Management#

A. Adding or Editing Devices#

  1. Open the Google Sheet inventory (Devices tab).
  2. Add or edit any row (Location, Name, Serial, MAC, IP, Type, Brand).
  3. Open your Mac Studio terminal and type:
    netbox
  4. Outcome: The script fetches your spreadsheet, securely sends the inventory to NetBox on 10.1.2.202:8082, and updates your network records in seconds.

B. Retiring or Deleting a Device#

  • Option 1 (Archive / Keep Record): Change the Location column in Google Sheets to Z-Inactive.
    • Behavior: The sync script automatically skips all Z-Inactive rows during import, removing the device from active NetBox IPAM while preserving historical records in your spreadsheet.
  • Option 2 (Permanent Delete): Delete the row from the Google Sheet and run netbox.

3. Work Completed#

During the system implementation, the following key engineering milestones were achieved:

Mac OS - Aliases Management

Mac OS - Aliases Management#

Keep Mac Studio and MacBook Air in Sync

The Mac Studio is the source of truth for the shared aliases. Edit and publish changes there, then pull them onto the MacBook Air.

On the Mac Studio — edit and publish:

nano ~/Scripts/MacOS/Aliases/MacOS-Aliases.zsh
source ~/.zshrc
pushscripts

pushscripts commits and pushes pending changes in the ~/Scripts repository.

On the MacBook Air — download and apply:

pullscripts
source ~/.zshrc

If an open terminal still shows old aliases, open a new terminal window. The shared aliases are in ~/Scripts/MacOS/Aliases/MacOS-Aliases.zsh; ~/.zshrc is local to each Mac and must source that file.

Mac OS - Brewfile

Mac OS - Brewfile#

Daily Sync Shortcuts (Keep Computers Mirrored):

  • Run pushbrew on the machine where you just installed/removed software to scan your system, update the Brewfile, and push it to GitHub.
  • Run pullbrew on your other workstations to pull the update and automatically install/clean up your packages to match.

Quick Restore & Sync (Workstation Rebuild):

  • To Restore (New Computer):
    1. Install Homebrew (if missing): /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    2. Clone scripts: git clone git@github.com:marcoue/Scripts.git ~/Scripts
    3. Reinstall all software: brew bundle --file=~/Scripts/MacOS/Brew/Brewfile
  • To Sync Updates (Ongoing):
    • Pull latest and clean up local packages: pullbrew

Related Recovery Guides: Master Checklist: Mac OS - Recovery | Shortcut Configuration: Mac OS - Aliases Management | Repository Standard: Scripts Mangement.

Mac OS - Recovery

Mac OS - Recovery#


Intel iMac profile: The 2014 iMac is a managed macOS workstation for Scripts, Obsidian, and MCP administration. Its Homebrew prefix is /usr/local, and Intel Homebrew may compile large packages from source. Use the standalone uv installer plus uv-managed Python 3.12 for MCP Python environments when Homebrew builds are impractical. Xcode is optional for this workstation; the shared xcode-tools definition may remain configured but can stay offline.

Proxmox - HP3 Wake-on-LAN (WOL) Monitoring & Sniffer

Proxmox - Wake-on-LAN (WOL) Monitoring & Sniffer#

This guide outlines a persistent, lightweight background service for monitoring and logging Wake-on-LAN (WOL) Magic Packets on the Proxmox network. The payload is retained so the target MAC can be identified even when a server has multiple NICs or alternate MAC addresses.

2026-08-03 Antigravity chat: agy –conversation=3b2d07f7-d649-4fed-9976-8f0deadf60f9


1. Overview & Purpose#

  • Primary Target: HP3 (10.1.1.13), documented MAC ec:b1:d7:7c:a9:48
  • Additional Targets: Any WOL target visible on the monitored segment, including HP2 (94:57:a5:65:7e:88)
  • Capture Host: MMProxmox / MacMini (10.1.1.10)
  • Capture Interface: bond0 (active-backup bond; nic1 currently active)
  • Objective: Capture the source IP, source Ethernet MAC, timestamp, VLAN, and WOL payload target MAC.
  • Resource Overhead: Near zero (~1 MB RAM, 0% CPU overhead).

2. Systemd Service Specification#

The sniffer uses tcpdump running as a background systemd daemon. It listens on the physical uplink (bond0) for UDP port 9/7 and raw Ethernet WOL traffic, retaining the complete packet payload in /var/log/wol_sniffer.log.

Unifi UNAS-Pro Usage Inventory Plan

Master Plan: UNAS Pro SMB Usage Inventory#

This document outlines the proposed step-by-step strategy to perform a comprehensive audit and inventory of all workloads, computers, virtual machines, Docker stacks, and scripts utilizing SMB shares from the UNAS Pro (10.1.2.2) NAS.

HP6_UNAS_Pull_Backup.sh is the current backup script for HP6TrueNAS (10.1.1.16). HP1Cloud is the current name for VM 217 at 10.1.2.219. HP8_UNAS_Pull_Backup.sh is retained as the legacy filename for the active HP7TrueNAS pull job.

UniFi UNAS-Pro Pool Migration Strategy

UniFi UNAS-Pro Pool Migration Strategy: Pool 1 (SSD) to Pool 2 (HDD)#

This document defines the operational plan, safety protocols, database update queries, and verification steps to migrate all shared folders from Storage Pool 1 (SSD - Degraded RAID5) to Storage Pool 2 (HDD - Healthy RAID5) on the master UniFi UNAS-Pro NAS (10.1.2.2) while preserving all access rights, Samba configurations, and TrueNAS backup operations.

The checked commands in this historical migration record now use the current identity HP6TrueNAS at 10.1.1.16; the node was formerly HP7TrueNAS at 10.1.1.17.

Scripts Management Process

📜 Scripts Management#

Workstation Sync Shortcut: To automatically backup all your scripts and custom terminal aliases configuration (staging and pushing your entire ~/Scripts/ repository):

pushscripts

This will stage all modified files in ~/Scripts/, commit, and push updates directly to GitHub and your NAS (without running Homebrew operations).

MCP Configuration Sync: MCP configuration is maintained in a separate repository, ~/.mcp-config, linked to git@github.com:marcoue/MCP-Config-MacOS.git. Use:

pushmcp   # Commit selected MCP master files, compile through the post-commit hook, and push to GitHub
pullmcp   # Pull MCP changes; the post-merge hook recompiles client configurations

These commands do not operate on ~/Scripts and do not replace pushscripts or pullscripts.