Skip to Content
New to Genbox? Check out our Getting Started guide
Commandsrestart

gb restart

Restart services in a Genbox environment.

Synopsis

gb restart [name] [options]

Description

Restarts application services without restarting the entire server. Useful after code changes or to recover from stuck processes.

Arguments

ArgumentDescription
nameOptional. Environment name.

Options

OptionDescription
--app <name>Restart specific app only
--infraAlso restart infrastructure (MongoDB, Redis)
-w, --watchWatch restart progress

Examples

Restart All Apps

gb restart feature-auth

Restart Specific App

# Restart only the API gb restart feature-auth --app api # Restart only admin gb restart feature-auth --app admin

Include Infrastructure

# Restart everything including MongoDB and Redis gb restart feature-auth --infra

What Gets Restarted

By default:

  • All PM2-managed application processes

With --infra:

  • MongoDB
  • Redis
  • RabbitMQ
  • Other infrastructure services

Use Cases

  • After code changes: Restart to pick up changes
  • Memory issues: Clear memory by restarting
  • Stuck processes: Recover from hangs
  • Config changes: Apply new environment variables

Notes

  • Faster than gb rebuild (no reinstallation)
  • Database data is preserved
  • Brief downtime during restart
  • Use --app for zero-downtime partial restarts

See Also

Last updated on