Feature Request: Add built-in daemon mode to keep GreptimeDB running independently of shell sessions
#7,314 opened on Nov 29, 2025
Repository metrics
- Stars
- (6,332 stars)
- PR merge metrics
- (PR metrics pending)
Description
What type of enhancement is this?
API improvement
What does the enhancement do?
Description
When running GreptimeDB in standalone mode on environments like ARM64 boards or edge devices, the process currently depends on the shell session that started it. If the user disconnects (e.g., network cable removed or SSH session closed), the GreptimeDB process exits.
To improve resilience and usability in embedded or self-hosted setups, it would be helpful to have an optional built-in daemon mode, allowing GreptimeDB to continue running in the background independently of the user session — similar to the daemonize yes option in Redis.
The idea comes from #7295
Motivation
Users often deploy GreptimeDB on ARM-based or edge environments where systemd may not be used. Running via nohup or systemd works but adds operational complexity. A native --daemon or configuration flag would make standalone and test deployments more robust and user-friendly. Proposed Solution Add a configuration option or CLI flag such as:
greptimedb standalone --daemon
or -d for short.
This would run the server as a background process detached from the shell, handling its own stdout/stderr redirection and PID management.
Alternatives Considered
- Using nohup or creating a custom systemd service file works, but it’s less convenient for quick setups and embedded use cases.
- Relying on containerization helps, but is not always practical on lightweight ARM systems.
Environment Example
- Platform: ARM64 development board (Linux)
- Mode: Standalone
Use case: Local testing and edge data collection
Benefits
- More stable background execution
- Better user experience for standalone and edge deployments
- Consistent behavior regardless of interactive shell sessions
Implementation challenges
No response