Manage Astra Service
Learn how to control Astra services on your server: start, stop, restart, check logs, and run multiple instances for better performance and stability.
Launch additional services
Section titled “Launch additional services”When you first launch Astra service with astra init command, default service name is astra and web interface port is 8000.
You can launch multiple Astra services on your server. Each service runs as a separate process with its own configuration and port. Common reasons to use multiple services:
- Load distribution: Split channels across separate processes to balance resource usage
- Improved stability: Isolate problematic channels that might affect other channels if they run in the same process
To create an additional service:
astra init 8002 astra2Service name will be astra2 with the web interface port 8002.
Service management
Section titled “Service management”In this example service name is default: astra2
| Command | Description |
|---|---|
systemctl restart astra2 | Restart service |
systemctl start astra2 | Start service |
systemctl stop astra2 | Stop service |
systemctl status astra2 | Service status |
systemctl enable astra2 | Launch service on system startup |
systemctl disable astra2 | Disable autorun |
journalctl -fu astra2 | Service logs |
Remove service
Section titled “Remove service”Before removing service, stop it and turn off autorun:
systemctl stop astra2systemctl disable astra2Then, remove service from systemd:
astra remove astra2This command remove service and log files, while keeping configuration and binary files.