Silent Kapsul Agent Installation on Linux
Automated installation guide for the Kapsul agent on Linux distributions
The Kapsul agent can be installed automatically on Linux servers, facilitating large-scale deployment via orchestration tools like Ansible, Puppet, or Chef.
Supported Distributions
- Debian/Ubuntu: DEB package
- RHEL/CentOS/Rocky/Alma: RPM package
- Amazon Linux: RPM package
Installation on Debian/Ubuntu
Package Installation
# Download the package
wget https://app.kabeen.io/download/kapsul.deb
# Install the package
sudo dpkg --install kapsul.deb
# Install missing dependencies if necessary
sudo apt-get install -fAPI Key Configuration
# Configure API key via debconf
sudo debconf-set-selections <<< "kapsul kapsul/api-key string YOUR_API_KEY"
# Or reconfigure the package
sudo dpkg-reconfigure -f noninteractive kapsulStart the Service
sudo systemctl enable kapsul
sudo systemctl start kapsulInstallation on RHEL/CentOS
Package Installation
# Download the package
wget https://app.kabeen.io/download/kapsul.rpm
# Install the package
sudo rpm -ivh kapsul.rpmAPI Key Configuration
Edit the configuration file:
sudo nano /etc/kapsul/application.confAdd or modify the line:
kbine.apiKey = "YOUR_API_KEY"Start the Service
sudo systemctl enable kapsul
sudo systemctl start kapsulAutomated Installation Script
Here's a complete script to automate installation:
#!/bin/bash
API_KEY="${1:-}"
if [ -z "$API_KEY" ]; then
echo "Usage: $0 <API_KEY>"
exit 1
fi
# Distribution detection
if [ -f /etc/debian_version ]; then
wget -q https://app.kabeen.io/download/kapsul.deb -O /tmp/kapsul.deb
dpkg -i /tmp/kapsul.deb || apt-get install -f -y
echo "kbine.apiKey = \"$API_KEY\"" >> /etc/kapsul/application.conf
elif [ -f /etc/redhat-release ]; then
wget -q https://app.kabeen.io/download/kapsul.rpm -O /tmp/kapsul.rpm
rpm -ivh /tmp/kapsul.rpm
echo "kbine.apiKey = \"$API_KEY\"" >> /etc/kapsul/application.conf
else
echo "Unsupported distribution"
exit 1
fi
systemctl enable kapsul
systemctl start kapsul
echo "Installation complete. Checking service..."
systemctl status kapsulVerify Installation
# Check service status
sudo systemctl status kapsul
# Check logs
sudo journalctl -u kapsul -f
# Check connectivity
curl -I https://api.kabeen.io/healthTroubleshooting
Service doesn't start
- Check logs:
journalctl -u kapsul -n 50 - Check configuration:
cat /etc/kapsul/application.conf - Check permissions: service must run as root
Connection error
- Check connectivity:
curl https://api.kabeen.io - Check proxy if applicable
- Check firewall: outbound port 443