SSyncropel Docs

Linux and macOS notes

Notes for Linux and macOS, covering starting at boot with systemd or launchd, PATH setup, and where logs live.

On Linux and macOS, spl serve runs in the background and keeps running when you close the terminal. That's enough for everyday use. To start it automatically, use systemd (Linux) or launchd (macOS). Both are covered here.

systemd user unit (Linux)

One command sets up a systemd service for your user:

spl setup --daemon

This writes ~/.config/systemd/user/spl-serve.service, which looks like this:

[Unit]
Description=Syncropel instance (user service)
After=network.target

[Service]
Type=simple
ExecStart=%h/.local/bin/spl serve
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=default.target

Enable and start:

systemctl --user enable spl-serve.service
systemctl --user start spl-serve.service

Verify:

systemctl --user status spl-serve.service
spl status

Boot-time start with loginctl enable-linger

By default, user services only run while you are logged in. To start your workspace at boot without logging in, turn on lingering:

# As root
loginctl enable-linger $USER

Your workspace now starts at boot and keeps running after you log out.

Manual start (non-systemd distros)

On Linux systems without systemd (such as Alpine), start the workspace from your shell's rc file or a startup script:

# ~/.bashrc, ~/.zshrc, or equivalent
if ! pgrep -f "spl serve" > /dev/null; then
  spl serve
fi

Or add a cron @reboot entry:

crontab -e
# then add:
@reboot ~/.local/bin/spl serve

launchd (macOS)

macOS uses launchd instead of systemd. A LaunchAgent starts spl serve when you log in and keeps it running:

mkdir -p ~/Library/LaunchAgents
cat > ~/Library/LaunchAgents/com.syncropel.spl-serve.plist <<'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.syncropel.spl-serve</string>
  <key>ProgramArguments</key>
  <array>
    <string>/Users/YOUR_USERNAME/.local/bin/spl</string>
    <string>serve</string>
    <string>--daemon</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>
  <true/>
  <key>StandardOutPath</key>
  <string>/Users/YOUR_USERNAME/.syncro/logs/spl.log</string>
  <key>StandardErrorPath</key>
  <string>/Users/YOUR_USERNAME/.syncro/logs/spl.log</string>
</dict>
</plist>
PLIST

Replace YOUR_USERNAME with your actual username (launchd doesn't expand $USER in plist files).

Load and start:

launchctl load ~/Library/LaunchAgents/com.syncropel.spl-serve.plist
launchctl start com.syncropel.spl-serve

Verify:

launchctl list | grep spl-serve
spl status

Unload (stop + disable):

launchctl unload ~/Library/LaunchAgents/com.syncropel.spl-serve.plist

PATH setup

The Linux install script adds ~/.local/bin to your PATH by appending a line to the shell rc file it detects:

  • bash: ~/.bashrc
  • zsh: ~/.zshrc
  • fish: ~/.config/fish/config.fish

The appended line:

export PATH="$HOME/.local/bin:$PATH"

(Or the fish equivalent fish_add_path "$HOME/.local/bin".)

If ~/.local/bin was already on PATH, the script skips this step. After install, open a new terminal or source your rc file for the change to take effect.

macOS

Same steps. If you use Homebrew, /opt/homebrew/bin often comes first, but the install script puts ~/.local/bin ahead of it so the spl you just installed is the one that runs.

Custom install location

To install somewhere else:

INSTALL_DIR=/usr/local/bin curl -sSf https://get.syncropic.com/spl | sh

/usr/local/bin is commonly already on PATH but requires sudo. The default (~/.local/bin) does not.

Where the logs live

~/.syncro/logs/spl.log

Each line is one JSON entry. To follow the log:

tail -f ~/.syncro/logs/spl.log

Filter for errors:

grep '"level":"ERROR"' ~/.syncro/logs/spl.log

To filter with jq:

tail -f ~/.syncro/logs/spl.log | jq 'select(.level=="ERROR" or .level=="WARN")'

Logs start a new file at 10 MB, and the last 7 old files are kept as ~/.syncro/logs/spl.log.1 through spl.log.7. The total stays under about 80 MB.

Data directory

~/.syncro/
├── config.toml
├── hub.db              Your records
├── keys/               identity keys
├── logs/               workspace logs
├── run/                running-copy file and local socket
├── secrets/            API keys for AI providers
└── token               token for the command line

Automatic backups are written outside this directory, under ~/.local/share/syncropel/backups/instance-<did-tail>/ (named after this workspace's identity). See Operator runbook for how to keep backups.

See also

On this page