Skip to main content
Version: 2.8.1

βš™οΈ 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:

FileDescription
/etc/systemd/system/jibril.serviceSystemd service unit file
/etc/jibril/config.yamlMain configuration file
/etc/jibril/netpolicy.yamlNetwork policy configuration
/etc/jibril/recipes/*.yamlDetection 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 reload for 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

πŸš€ Next Steps​