Hello,
I’m currently struggling on getting influxdb (v2) running as a systemd service…
Where do I need to put the config file? What is my working directory if I start it with systemd?
I tried to use the WorkingDirectory option in the systemd unit file and put the config file into /var/lib/influxdb but it isn’t working…
My systemd unit file looks like this:
# If you modify this, please also make sure to edit init.sh
[Unit]
Description=InfluxDB is an open-source, distributed, time series database
Documentation=https://docs.influxdata.com/influxdb/
After=network-online.target
[Service]
User=influxdb
Group=influxdb
LimitNOFILE=65536
EnvironmentFile=-/etc/default/influxdb2
ExecStart=/usr/lib/influxdb/scripts/influxd-systemd-start.sh
KillMode=control-group
Restart=on-failure
Type=forking
PIDFile=/var/lib/influxdb/influxd.pid
StateDirectory=influxdb
StateDirectoryMode=0750
LogsDirectory=influxdb
LogsDirectoryMode=0750
UMask=0027
WorkingDirectory=/var/lib/influxdb
[Install]
WantedBy=multi-user.target
Alias=influxd.service
Really not easy to get started with influxdb2