Skip to main content

RELOAD CONFIGURATION WITHOUT RESTART

This guide shows you how to reload pulled extensions or refresh the trusted collectives list on a running swamp serve without restarting the process.

Start the server with hot-reload enabled

swamp serve --hot-reload

The server writes a PID file to .swamp/serve.pid on startup.

Pull the updated extension

swamp extension pull @name/extension --force

Use --force to overwrite the existing bundle if the extension is already installed.

Trigger the reload

swamp serve reload

The server reloads all pulled extension bundles and refreshes the trust list. Subsequent requests use the updated code.

Refresh the trusted collectives list

swamp extension trust add @acme
swamp serve reload

The server re-reads .swamp.yaml and picks up the updated trust list. Extensions from newly trusted collectives are available for auto-resolution on subsequent requests.

Reload on a remote server

Pass --server to send the reload request over WebSocket instead of using the local PID file:

swamp serve reload --server wss://swamp.acme.internal:9090

If the server requires authentication, provide a token:

swamp serve reload --server wss://swamp.acme.internal:9090 \
  --token 'paul-token.<secret>'

To avoid repeating --server on every command, set SWAMP_SERVE_URL:

export SWAMP_SERVE_URL=wss://swamp.acme.internal:9090
swamp serve reload

Stored credentials from swamp auth server-login are used automatically.

  • Hot Reload — full reference for the --hot-reload flag and reload behavior
  • Serve Flags — all swamp serve flags