Smart restart with config change detection. Rebuilds and restarts only the services whose configuration or image has changed — everything else keeps running undisturbed.
# Restart only what changed since last start
nself restart
# Restart a specific service
nself restart postgres
# Restart multiple services
nself restart postgres hasura
# Force rebuild + restart all services
nself restart --allnself restart [SERVICES...] [FLAGS]nself restart is smarter than a plain Docker Compose restart. Before restarting anything, it compares the current state of every service against the last known-good state and identifies which services need attention:
docker pull check). Service is pulled and restarted.If you pass one or more service names as positional arguments, only those services are considered regardless of change detection. This is useful for forcing a single service to bounce without touching the rest.
Data volumes are never touched by nself restart. To wipe data, use nself reset.
| Argument | Description |
|---|---|
SERVICES... | Optional list of service names to target. Valid names: postgres, hasura, auth, nginx,minio, redis, functions, mail,search, and any custom service names defined in your config. |
| Flag | Type | Default | Description |
|---|---|---|---|
--all | bool | false | Rebuild and restart every service, bypassing change detection |
--fresh | bool | false | Remove the named service's data volume before restarting (destructive per-service) |
--pull | bool | false | Force a docker pull check before deciding whether to restart |
--timeout | int | 60 | Seconds to wait for each service to become healthy after restart |
--no-wait | bool | false | Return immediately after sending restart signals without waiting for health checks |
# Edit .env.dev or .env.secrets, then:
nself restart
# Only services whose env changed will rebuildnself restart hasuranself build # regenerates nginx/sites/
nself restart nginxnself restart --pull# WARNING: --fresh removes that service's data volume
nself restart postgres --freshnself restart --all0 — all targeted services restarted and healthy1 — one or more services failed to start or did not pass health checks2 — invalid service name or flag combination