dronecot -husage: dronecot [-h] [-c CONFIG_FILE] [-p PREF_PACKAGE]
options:
-h, --help show this help message and exit
-c CONFIG_FILE, --CONFIG_FILE CONFIG_FILE
Optional configuration file. Default: config.ini
-p PREF_PACKAGE, --PREF_PACKAGE PREF_PACKAGE
Optional connection preferences package zip file (aka data package).
Configuration parameters are documented in Configuration. See Quick Start for a minimal config.ini.
- Create
/etc/systemd/system/dronecot.service(e.g.sudo nano /etc/systemd/system/dronecot.service). sudo systemctl daemon-reloadsudo systemctl enable dronecotsudo systemctl start dronecot
[Unit]
Description=DroneCOT - Display Drones in TAK
Documentation=https://dronecot.rtfd.io
Wants=network.target
After=network.target
StartLimitIntervalSec=0
[Service]
RuntimeDirectoryMode=0755
ExecStart=/usr/local/bin/dronecot -c /etc/dronecot.ini
EnvironmentFile=-/etc/default/dronecot
SyslogIdentifier=dronecot
Type=simple
Restart=always
RestartSec=30
RestartPreventExitStatus=64
Nice=-5
[Install]
WantedBy=multi-user.target!!! tip
Adjust ExecStart to the full path of your dronecot binary and config file. On Debian packages, the binary is often /usr/bin/dronecot.
Example /etc/default/dronecot:
FEED_URL=mqtt://broker.example.net:1883
MQTT_TOPIC=#
COT_URL=udp+wo://239.2.3.1:6969Use the templated user unit at systemd/user/dronecot@.service to run multiple DroneCOT processes on one host (for example one MQTT feed and one serial feed).
- Install the user unit template:
Or:
mkdir -p ~/.config/systemd/user cp systemd/user/dronecot@.service ~/.config/systemd/user/
make install_user_systemd - Create optional shared defaults:
mkdir -p ~/.config/dronecot nano ~/.config/dronecot/defaults
- Create per-instance env files:
nano ~/.config/dronecot/mqtt.env nano ~/.config/dronecot/serial.env
- Reload and start:
systemctl --user daemon-reload systemctl --user enable --now dronecot@mqtt dronecot@serial - Logs:
journalctl --user -fu dronecot@mqtt journalctl --user -fu dronecot@serial
Environment files are loaded in order (later overrides earlier):
/etc/default/dronecot(optional shared system defaults)/etc/default/dronecot.%i(optional system instance defaults)~/.config/dronecot/defaults(optional shared user defaults)~/.config/dronecot/%i.env(per-instance)
The unit prefers $DRONECOT_WORKDIR/.venv/bin/dronecot when executable, then dronecot on PATH, then /usr/bin/dronecot. Override with DRONECOT_BIN in any env file.
FEED_URL=mqtt://broker.example.net:1883
MQTT_TOPIC=#
COT_URL=udp+wo://239.2.3.1:6969
DEBUG=1FEED_URL=serial:///dev/ttyACM1:115200
COT_URL=udp+wo://239.2.3.1:6969
DEBUG=1FEED_URL=wifi://wlan0
WIFI_CHANNEL=6
WIFI_HOP_CHANNELS=6,149
COT_URL=udp+wo://239.2.3.1:6969For live Wi-Fi capture, the user unit may need:
AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMINFEED_URL=wireless://wlan0
BLE_SERIAL=/dev/ttyUSB0
WIFI_CHANNEL=6
COT_URL=udp+wo://239.2.3.1:6969See Troubleshooting for debug logging and common issues.