uc service start.
Usage
Arguments
Names or IDs of services to stop. Can specify multiple services.
Flags
Signal to send to each container’s main process. Can be a signal name (SIGTERM, SIGINT, SIGHUP, etc.) or a number.Default: SIGTERM
Seconds to wait for each container to stop gracefully before forcibly killing it with SIGKILL. Use
-1 to wait indefinitely.Examples
Stop a service
Stop multiple services
Stop with custom timeout
Wait 30 seconds before force-killing:Stop with custom signal
Stop and wait indefinitely
Never force-kill, wait forever for graceful shutdown:How It Works
- Send Signal - Sends the specified signal (default SIGTERM) to each container’s main process
- Wait - Waits for the timeout period for the container to exit
- Force Kill - If still running after timeout, sends SIGKILL to force termination
Output
Graceful Shutdown
Most applications handle SIGTERM by:- Finishing current requests
- Closing database connections
- Saving state
- Cleaning up resources
Custom Signals
Different signals trigger different behaviors:- SIGTERM (default) - Request graceful shutdown
- SIGINT - Interrupt (like Ctrl+C)
- SIGHUP - Hangup (often triggers reload)
- SIGKILL - Force kill (not graceful, used automatically after timeout)
State Persistence
Stopping a service does NOT remove:- Service configuration
- Container configuration
- Volumes
- Network configuration
uc start.
Difference from Remove
uc stop- Stops containers, keeps everything elseuc service rm- Stops AND removes containers and service configuration
uc stop when you want to temporarily stop a service:
uc service rm when you want to completely remove a service:
Use Cases
Temporary Maintenance
Stop a service during maintenance:Resource Conservation
Stop unused services to free resources:Database Maintenance
Stop application before database operations:Testing
Stop a service to test failure handling:Related Commands
uc service start- Start stopped servicesuc service rm- Remove services completelyuc service ls- List servicesuc ps- View container status
