SSyncropel Docs

Starting your workspace

The three ways to run `spl serve` (development, secure local, and exposed), and how to start, stop, restart, check and read the logs of your workspace.

This page is for people running their own workspace or using the API. If you use a workspace created at syncropel.com, start with Your hosted workspace.

spl serve runs your Syncropel workspace (also called an instance) on your own computer. It keeps your records in ~/.syncro/hub.db, opens a port for the API, and opens a local socket (Linux and macOS) for the command line.

There are three ways to start it. Pick the one that fits.

Dev mode: --insecure-localhost

spl serve --insecure-localhost

Use this the very first time, and any time you're doing local development without paired external devices.

What it does:

  • Makes the workspace listen on 127.0.0.1 only, so no other machine can reach it, whatever --host says.
  • Turns sign-in checks off (auth.required = false) for programs on this machine, such as spl, curl or a script, while this workspace runs.
  • Still asks a web page for a key. A page in your browser, the dashboard included, has to be paired with spl pair first, so no website can use your workspace without you.
  • Writes a WARN line to the log at startup, so you notice if you leave it on by accident.

To be precise about what this flag is: it turns sign-in checks off for a workspace that only listens on your own computer. It has nothing to do with TLS or certificates; local workspaces use plain HTTP either way.

You rarely need it: a fresh secure workspace starts fine with no service accounts (see setup mode below), and the local command line works straight away. Use --insecure-localhost when you want the HTTP API open without tokens: quick local scripts, trying things with curl, throwaway workspaces.

Use it only on your own computer. --insecure-localhost is never for a shared machine or server.

Secure local mode: spl serve

spl serve

This is the default, and the one to use for any workspace you keep running.

What it does:

  • Listens on 127.0.0.1:9100 (and the local socket at ~/.syncro/run/spl.sock on Linux and macOS).
  • Requires sign-in (auth.required = true). Every HTTP request needs a valid token.
  • With no service accounts yet, starts in setup mode: the command line works normally, and the HTTP API answers 503 BOOTSTRAP_REQUIRED (with the exact commands to run) until you create the first service account. A missing account never stops the workspace from starting.
  • Takes a startup backup of hub.db to ~/.local/share/syncropel/backups/instance-<did-tail>/hub.db.bak: in a folder named after this workspace's identity (see Operator runbook for how to keep backups).

Nothing outside your computer can reach it. To make it reachable from elsewhere, see Exposing your workspace securely.

Exposed mode: --host 0.0.0.0

spl serve --host 0.0.0.0

Listens on every network connection on the machine. Use this when the workspace needs to be reached from outside: for example from a phone on the same private network, another workspace, or a reverse proxy.

Being reachable and requiring sign-in are separate choices. --host 0.0.0.0 with sign-in turned off (auth.required = false) is dangerous. Sign-in is on by default. spl doctor warns you if a reachable workspace has sign-in off.

Read Exposing your workspace securely before using this flag. For almost every case there is a safer option (Tailscale or a reverse proxy).

Start, stop and check

Start

spl start          # background (alias for `spl serve --daemon`)
spl serve          # foreground: use this under systemd, Docker or another supervisor

spl start is the command spl init recommends for everyday use; it accepts the same flags as spl serve (--port, --memory, --echo, --store, --insecure-localhost).

A different port

spl serve --port 9200

--port (default 9100) lets a second workspace share a machine, but each one needs its own home folder too; see Running multiple local instances.

Check status

spl status

Reports the version, process ID, how long it has been running, the record count, and whether the workspace responds on /health. If nothing is running it prints Status: not running. If it says not running but something is still using the port, see Troubleshooting → stale PID file.

Stop

spl stop

Asks the workspace to shut down cleanly, saving everything first. If it doesn't respond, spl stop ends it after a short wait.

Restart

spl restart

Stops the workspace, then starts it again with the same options. Use it after you edit the config file.

Tail logs

spl serve --logs

Shows the log as it grows. It is the same as tail -f ~/.syncro/logs/spl.log, but finds the log file on any platform.

To see only errors:

tail -f ~/.syncro/logs/spl.log | grep ERROR

Log locations

PlatformPath
Linux~/.syncro/logs/spl.log
macOS~/.syncro/logs/spl.log
Windows%USERPROFILE%\.syncro\logs\spl.log

Logs start a new file at 10 MB, and the last 7 old files are kept.

What a successful start looks like

$ spl serve
Starting Syncropel instance...
Store:    sqlite:///home/you/.syncro/hub.db
Backup:   ~/.local/share/syncropel/backups/instance-<did-tail>/hub.db.bak (written)
Bind:     127.0.0.1:9100
Socket:   ~/.syncro/run/spl.sock
Auth:     required (service accounts: 0)
PID:      12847

Instance started. Run 'spl status' to verify health.

The workspace starts fine with no service accounts, and the command line works with it straight away. Auth: required (service accounts: 0) is setup mode, not an error. Until you create the first service account, the HTTP API answers every request with 503 BOOTSTRAP_REQUIRED and the commands to run:

{"code":"BOOTSTRAP_REQUIRED","instructions":[
  "spl service-account create --bootstrap --name admin --scopes admin --with-token",
  "..."
]}

See First run and Service accounts.

See also

On this page