βοΈ Systemd
Running Jibril as a systemd service is the recommended way to deploy Jibril in production when not using a containerized deployment. This method provides automatic startup, process supervision, and integration with system logging.
π Quick Startβ
1οΈβ£ Download Jibrilβ
Download Jibril:
sudo curl -L -o /usr/bin/jibril https://github.com/garnet-org/jibril-releases/releases/download/v2.8/loader
Make it executable:
sudo chmod +x /usr/bin/jibril
Check version:
jibril --version
2οΈβ£ Install Serviceβ
# Install service and configuration files
sudo jibril --systemd install
This command creates the following files:
| File | Description |
|---|---|
/etc/systemd/system/jibril.service | Systemd service unit file |
/etc/jibril/config.yaml | Main configuration file |
/etc/jibril/netpolicy.yaml | Network policy configuration |
/etc/jibril/recipes/*.yaml | Detection recipes (optional) |
3οΈβ£ Configure Jibrilβ
Edit the configuration file to customize Jibril's behavior:
# Edit main configuration
sudo vi /etc/jibril/config.yaml
π See Configuration Guide for detailed configuration options.
β οΈ Important
The default configuration includes pre-configured plugins and detections. Always review and customize for your environment:
- β Enable only the components you need
- β Adjust resource limits and thresholds
- β Configure appropriate output destinations
- β Test thoroughly in a staging environment first
Failing to optimize the configuration may result in unnecessary resource usage or missed detections.
4οΈβ£ Enable and Startβ
# Enable service (auto-start on boot) and start immediately
sudo jibril --systemd enable-now
π Service Managementβ
π Check Statusβ
# View service status
sudo systemctl status jibril
# Check if service is running
sudo systemctl is-active jibril
# Check if service is enabled
sudo systemctl is-enabled jibril
π Control Serviceβ
# Start service
sudo systemctl start jibril
# Stop service
sudo systemctl stop jibril
# Restart service
sudo systemctl restart jibril
# Reload configuration
sudo systemctl reload jibril
βοΈ Enable/Disableβ
# Enable auto-start on boot
sudo systemctl enable jibril
# Disable auto-start
sudo systemctl disable jibril
# Enable and start now
sudo jibril --systemd enable-now
# Disable and stop now
sudo jibril --systemd disable-now
π Viewing Logsβ
Jibril logs to multiple locations when running as a systemd service:
π Systemd Journalβ
Location: journalctl
Jibril's stdout and stderr:
# View all logs
sudo journalctl -u jibril
# Follow logs in real-time
sudo journalctl -u jibril -f
# View last 100 lines
sudo journalctl -u jibril -n 100
# View logs since boot
sudo journalctl -u jibril -b
π Event Log Fileβ
Location: /var/log/jibril.out
Detection events in JSON format:
# View events with jq
sudo cat /var/log/jibril.out | jq
# Follow events in real-time
sudo tail -f /var/log/jibril.out | jq
π§ Advanced Configurationβ
Systemd Service Unitβ
View or customize the service unit file:
# View service unit
sudo systemctl cat jibril
# Edit service unit (creates override)
sudo systemctl edit jibril
Service Customizationβ
π Restart Behaviorβ
# In service override
[Service]
Restart=always
RestartSec=10s
π Resource Limitsβ
# In service override
[Service]
MemoryLimit=2G
CPUQuota=50%
π Custom Log Locationβ
# In service override
[Service]
StandardOutput=append:/var/log/jibril-custom.log
StandardError=append:/var/log/jibril-error.log
π Upgradingβ
# Stop current instance (if running)
sudo systemctl stop jibril
# Uninstall the current systemd service
sudo jibril --systemd uninstall
# Remove the binary
sudo rm /usr/bin/jibril
# Remove the configuration files (optional)
sudo rm -rf /etc/jibril
# Reload systemd
sudo systemctl daemon-reload
# Download new version
sudo curl -L -o /usr/bin/jibril https://github.com/garnet-org/jibril-releases/releases/download/v2.8/loader
# Make executable
sudo chmod +x /usr/bin/jibril
# Verify new version
jibril --version
Systemd installation creates files under
/etc/jibril/directory. Newer versions might need to update those files. Make sure to backup the files before updating.
# Install the new systemd service
sudo jibril --systemd install
# Enable and start the new systemd service
sudo jibril --systemd enable-now
ποΈ Uninstallingβ
To completely remove Jibril from the system:
# Stop current instance (if running)
sudo systemctl stop jibril
# Uninstall the current systemd service
sudo jibril --systemd uninstall
# Remove the binary
sudo rm /usr/bin/jibril
# Remove the configuration files (optional)
sudo rm -rf /etc/jibril
# Reload systemd
sudo systemctl daemon-reload
π Tips & Best Practicesβ
β Best Practicesβ
- π Review and customize config before enabling
- π Use
systemctl reloadfor config changes - π Monitor logs regularly with journalctl
- π Backup
/etc/jibril/before updates - π§ͺ Test config changes on non-prod first
β οΈ Common Issuesβ
- β Service fails to start β Check journalctl logs
- β Permission denied β Verify root privileges
- β Config not applied β Restart service fully
- β High CPU usage β Review cadence settings
- β No events logged β Check printer config