Last active
September 19, 2025 01:59
-
-
Save kj-sh604/96e48afe6f4a6cdf29e29026a02ebd87 to your computer and use it in GitHub Desktop.
grafana systemd stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GRAFANA_USER=grafana | |
| GRAFANA_GROUP=grafana | |
| GRAFANA_HOME=/usr/share/grafana | |
| LOG_DIR=/var/log/grafana | |
| DATA_DIR=/var/lib/grafana | |
| MAX_OPEN_FILES=10000 | |
| CONF_DIR=/etc/grafana | |
| CONF_FILE=/etc/grafana/grafana.ini | |
| RESTART_ON_UPGRADE=true | |
| PLUGINS_DIR=/var/lib/grafana/plugins | |
| PROVISIONING_CFG_DIR=/etc/grafana/provisioning | |
| # Only used on systemd systems | |
| PID_FILE_DIR=/run/grafana |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Grafana instance | |
| Documentation=http://docs.grafana.org | |
| Wants=network-online.target | |
| After=network-online.target | |
| After=postgresql.service mariadb.service mysql.service influxdb.service | |
| [Service] | |
| EnvironmentFile=/etc/default/grafana-server | |
| User=grafana | |
| Group=grafana | |
| Type=simple | |
| Restart=on-failure | |
| WorkingDirectory=/usr/share/grafana | |
| RuntimeDirectory=grafana | |
| RuntimeDirectoryMode=0750 | |
| ExecStart=/usr/share/grafana/bin/grafana server \ | |
| --config=${CONF_FILE} \ | |
| --pidfile=${PID_FILE_DIR}/grafana-server.pid \ | |
| --packaging=deb \ | |
| cfg:default.paths.logs=${LOG_DIR} \ | |
| cfg:default.paths.data=${DATA_DIR} \ | |
| cfg:default.paths.plugins=${PLUGINS_DIR} \ | |
| cfg:default.paths.provisioning=${PROVISIONING_CFG_DIR} | |
| LimitNOFILE=10000 | |
| TimeoutStopSec=20 | |
| CapabilityBoundingSet= | |
| DeviceAllow= | |
| LockPersonality=true | |
| MemoryDenyWriteExecute=false | |
| NoNewPrivileges=true | |
| PrivateDevices=true | |
| PrivateTmp=true | |
| ProtectClock=true | |
| ProtectControlGroups=true | |
| ProtectHome=true | |
| ProtectHostname=true | |
| ProtectKernelLogs=true | |
| ProtectKernelModules=true | |
| ProtectKernelTunables=true | |
| ProtectProc=invisible | |
| ProtectSystem=full | |
| RemoveIPC=true | |
| RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX | |
| RestrictNamespaces=true | |
| RestrictRealtime=true | |
| RestrictSUIDSGID=true | |
| SystemCallArchitectures=native | |
| UMask=0027 | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment