Debian Agent for Artica Meta - Administrator Installation Guide
This guide covers installing the debian-agent on a server and obtaining enrollment tokens for client registration.
This guide covers installing the debian-agent on a server and obtaining enrollment tokens for client registration.
Prerequisites
- Debian 10+ or Ubuntu 20.04+ amd64
- Root access
- Network connectivity on port 28811 (default)
Install from .deb Package
- Download or copy the package to the server
- https://github.com/dtouzeau/Artica-v4.50/releases/tag/debian_agent
scp debian-agent_1.0.28_amd64.deb root@your-server:/tmp/ - Install the package
dpkg -i /tmp/debian-agent_1.0.28_amd64.deb
The package automatically:
- Installs the binary to
/usr/local/bin/debian-agent - Creates the systemd service
- Generates PKI certificates (CA + server cert)
- Creates a random enrollment token
- Starts and enables the service
Post-Installation
- Verify Service Status
systemctl status debian-agent
Expected output:
● debian-agent.service - Debian Agent - Secure System Administration API
Loaded: loaded (/etc/systemd/system/debian-agent.service; enabled)
Active: active (running)
- Check Agent Version
debian-agent version
Getting Enrollment Tokens
Enrollment tokens are required for clients to register and obtain mTLS certificates.
- List Existing Tokens
debian-agent token list
Output:
HASH PREFIX CREATED EXPIRES USED USED BY
ABC-123-XYZ 2024-01-15 10:30 2024-01-15 11:30 no
XY9-456-ZVF 2024-01-15 09:00 2024-01-15 10:00 yes client-01 - Create a New Token
Add a token (format: XXX-000-XXX)
debian-agent token add ABC-123-XYZ
Token expires based on config (default: 1 hour) - To create a random token:
Generate random token
TOKEN=$(cat /dev/urandom | tr -dc 'A-Z0-9' | fold -w 3 | head -3 | paste -sd'-')
debian-agent token add $TOKEN
echo "Enrollment token: $TOKEN" - Token Expiration
Default TTL is 3600 seconds (1 hour).
To change:
Edit/etc/debian-agent/config.json:
{
"enrollment":
{
"token_ttl_seconds": 86400
}
}
Then restart:
systemctl restart debian-agent - Revoke a Token
debian-agent token revoke ABC-123-XYZ
Client Enrollment Process
Once you have a token, provide these details to the client administrator:
| Parameter | Value |
|---|---|
| Server URL | https://<server-ip>:28811 |
| Enrollment Endpoint | POST /register |
| Token | ABC-123-XYZ |
Client Enrollment Example
The client generates a key pair and sends the public key:
On client: Generate ECDSA key pair:
openssl ecparam -name secp384r1 -genkey -noout -out client.key openssl ec -in client.key -pubout -out client.pub
Register with the server
curl -k https://192.168.1.100:28811/register -H "Content-Type: application/json" -d '{"token": "ABC-123-XYZ", "cn": "client-hostname","public_key_pem":"'"$(cat client.pub)"'"}'
Response contains the signed client certificate and CA certificate for mTLS.
Configuration
Configuration file: /etc/debian-agent/config.json
Key Settings
| Setting | Default | Description |
|---|---|---|
listen_addr |
0.0.0.0 |
Bind address |
listen_port |
28811 |
HTTPS port |
listen_interface |
`` | Bind to specific interface (e.g., eth0) |
tls.require_mtls_on_api |
true |
Require client certs for API |
enrollment.token_ttl_seconds |
3600 |
Token expiration (seconds) |
scheduler.interval_hours |
6 |
Background refresh interval |
Example: Bind to Specific Interface
{
"listen_interface": "eth1",
"listen_port": 28811
}
Example: Disable IP Whitelist
{
"security": {
"enable_ip_whitelist": false
}
}
Firewall Configuration
Allow incoming connections on the agent port:
ufw allow 28811/tcp
iptables iptables -A INPUT -p tcp --dport 28811 -j ACCEPT
Logs and Troubleshooting
View Logs
journal journalctl -u debian-agent -f
tail -f /var/log/debian-agent/agent.log
Common Issues
| Issue | Solution |
|---|---|
| Service won't start | Check logs: journalctl -u debian-agent -e |
| Token rejected | Verify token format (XXX-000-XXX) and expiration |
| Connection refused | Check firewall and listen_addr setting |
| Certificate errors | Regenerate PKI: rm -rf /var/lib/debian-agent/pki /var/lib/debian-agent/tls && systemctl restart debian-agent |
Test API Access
From the server (uses Unix socket, no auth needed)
curl --unix-socket /run/debian-agent/admin.sock http://localhost/healthz
Remote with mTLS
curl --cert client.crt --key client.key --cacert ca.crt https://server:28811/api/v3/status
File Locations
| Path | Purpose |
|---|---|
/etc/debian-agent/config.json |
Configuration |
/var/lib/debian-agent/pki/ |
CA certificate and key |
/var/lib/debian-agent/tls/ |
Server certificate |
/var/lib/debian-agent/agent.db |
Database (tokens, certs) |
/var/log/debian-agent/agent.log |
Log file |
/run/debian-agent/admin.sock |
Local admin socket |