Skip to content

Deployment

Kifa runs as a single binary. Start it however the system starts processes.

A hardened systemd service file is included at systemd/kifa.service:

Terminal
# Copy service file
sudo cp systemd/kifa.service /etc/systemd/system/
# Edit configuration
sudo systemctl edit kifa
# Add: Environment=KIFA_TCP=127.0.0.1:5514
# Enable and start
sudo systemctl enable --now kifa
# Check status
sudo systemctl status kifa
journalctl -u kifa -f

The included service file enables:

SettingEffect
DynamicUser=yesRuns as ephemeral user
ProtectSystem=strictRead-only filesystem except data dir
PrivateNetwork=noAllows TCP/UDP listeners
MemoryDenyWriteExecute=yesPrevents code injection
SignalAction
SIGINT (Ctrl+C)Graceful shutdown, flush pending data
SIGTERMSame as SIGINT (for systemd)
SIGUSR1Escalate flush mode (Cautious to Emergency)

Exit codes follow Unix convention:

CodeMeaning
0Clean exit
130Terminated by SIGINT
143Terminated by SIGTERM

Container orchestrators like Docker and Kubernetes use these exit codes to distinguish graceful termination from forced kills.

  • No encryption at rest. Apply filesystem-level encryption (LUKS, dm-crypt) for sensitive data.
  • Restrict data directory permissions. Only the service user should have access.
  • Bind listeners carefully. Use 127.0.0.1 unless remote ingestion is explicitly needed.
  • Review flush mode. Balance durability requirements against performance for the deployment environment.