### Set up config and run daemon Source: https://gophertrunk.org/install-macos.html Creates the config directory, copies the example config, opens it in an editor, and starts the daemon. The daemon loads the first config found in the search path, printing `config: loaded ` on startup. ```bash mkdir -p ~/Library/Application\ Support/GopherTrunk cp config.example.yaml ~/Library/Application\ Support/GopherTrunk/config.yaml ${EDITOR:-nano} ~/Library/Application\ Support/GopherTrunk/config.yaml gophertrunk run ``` -------------------------------- ### Run GopherTrunk as a systemd service Source: https://gophertrunk.org/install-linux.html Installs the example systemd unit (docs/gophertrunk.service) with DynamicUser=true and a tight sandbox profile, configures it, enables and starts it, then tails its logs. The unit file's install header walks through every hardening knob; read it before deploying to a shared host. ```shell sudo install -d -m 0755 /etc/gophertrunk sudo install -m 0640 config.example.yaml /etc/gophertrunk/config.yaml sudo ${EDITOR:-nano} /etc/gophertrunk/config.yaml # edit serials, frequencies sudo curl -L -o /etc/systemd/system/gophertrunk.service \ https://raw.githubusercontent.com/MattCheramie/GopherTrunk/main/docs/gophertrunk.service sudo systemctl daemon-reload sudo systemctl enable --now gophertrunk journalctl -u gophertrunk -f ``` -------------------------------- ### Create module and initialize Go module Source: https://gophertrunk.org/learn/testing/your-first-go-test Commands to create a directory and initialize a Go module named `example/freqfmt`. Run these in a terminal before writing the code. ```bash mkdir freqfmt && cd freqfmt go mod init example/freqfmt ``` -------------------------------- ### Install and control gophertrunk with systemctl Source: https://gophertrunk.org/learn/deployment/services-and-systemd Installs the unit file and binary, reloads systemd, enables and starts the service, and verifies it is running. The `enable --now` flag both starts the service immediately and configures it to start on boot. ```bash sudo install -m 0644 docs/gophertrunk.service /etc/systemd/system/gophertrunk.service sudo install -m 0755 bin/gophertrunk /usr/local/bin/gophertrunk sudo systemctl daemon-reload sudo systemctl enable --now gophertrunk # start now AND on every boot sudo systemctl status gophertrunk # check it's running ``` -------------------------------- ### Install Delve and start a debug session Source: https://gophertrunk.org/learn/testing/using-a-debugger Install the Delve debugger and start a debugging session. `dlv debug` builds and runs the program under the debugger, while `dlv test` is used to debug a test. ```bash go install github.com/go-delve/delve/cmd/dlv@latest dlv debug ./cmd/scan # build + run under the debugger dlv test ./decoder/ # debug a TEST — see below ``` -------------------------------- ### Using actions/checkout and actions/setup-node with with: Source: https://gophertrunk.org/learn/git/github-actions Shows the two most common action steps: actions/checkout clones the repository onto the runner, and actions/setup-node configures Node.js via the with: block. Pin actions to a version (e.g., @v4) to avoid silent breakage from future changes. ```yaml - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" # configure an action with `with:` ``` -------------------------------- ### Upgrade GopherTrunk with NSSM service stop/start Source: https://gophertrunk.org/user-guide-windows.html Stop the NSSM service before running the installer, then start it again after upgrade. The installer overwrites the executable and refreshes Start Menu entries while preserving config, recordings, and call-log DB. ```powershell nssm stop GopherTrunk .\gophertrunk--windows-amd64-setup.exe nssm start GopherTrunk ``` -------------------------------- ### Configure and start the GopherTrunk daemon Source: https://gophertrunk.org/install-linux.html Creates the default config directory, copies config.example.yaml, edits it with the default editor, and starts the daemon. The daemon walks $GOPHERTRUNK_CONFIG → ~/.config/gophertrunk/config.yaml → ~/Documents/GopherTrunk/config.yaml → ./config.yaml and loads the first it finds. On startup it prints 'config: loaded ' to confirm the file used. If multiple configs exist in that directory, 'gophertrunk run' prints a numbered menu; non-interactive launches auto-pick the first with a stderr warning. ```shell mkdir -p ~/.config/gophertrunk cp config.example.yaml ~/.config/gophertrunk/config.yaml ${EDITOR:-nano} ~/.config/gophertrunk/config.yaml gophertrunk run ``` -------------------------------- ### Install and start GopherTrunk service Source: https://gophertrunk.org/learn/embedded/services-with-systemd Commands to install and start the GopherTrunk service after creating the service user with 'sudo adduser --system --group gophertrunk'. The output shows the service is active (running). ```bash $ sudo systemctl daemon-reload # re-read unit files $ sudo systemctl enable --now gophertrunk # boot-start + start now $ systemctl status gophertrunk ● gophertrunk.service - GopherTrunk trunking scanner daemon Active: active (running) since Tue 2026-08-18 09:14:02 GMT; 2min ago ```