master
md 59 lines 2.13 KB
Rendered Raw
1 # Install Netdata on Synology
2
3 > This community-maintained guide may not reflect the latest changes.
4 > Please verify the installation steps before proceeding.
5 >
6 > Help improve this guide by submitting a PR with your suggestions.
7 > Thank you!
8
9 The [one-line installation script](/packaging/installer/methods/kickstart.md) works on Synology NAS devices with amd64 architecture. The script installs Netdata to `/opt/netdata/`.
10
11 On current Synology systems (DSM 7.2.2+), the kickstart script automates the entire installation process but doesn't create the necessary `netdata` user and group. As a result, Netdata operates with root privileges instead. Once installed, it can be controlled using standard systemd commands.
12
13 ### Run as netdata user
14
15 By default, Netdata runs as `root`. To run it as the `netdata` user instead:
16
17 1. Create a `netdata` group through the Synology control panel (no special access needed)
18 2. Create a `netdata` user through the Synology control panel:
19 - Assign it to the netdata group
20 - Set a random password
21 - Grant no access permission
22
23 or alternatively from the CLI:
24 ```sh
25 sudo synouser --add netdata <SomeGoodPassword> "netdata agent" 0 "" 0
26 sudo synogroup --add netdata netdata
27 ```
28 3. Set correct ownership permissions:
29 ```bash
30 chown -R root:netdata /opt/netdata/usr/share/netdata
31 chown -R netdata:netdata /opt/netdata/var/lib/netdata /opt/netdata/var/cache/netdata
32 chown -R netdata:root /opt/netdata/var/log/netdata
33 ````
34 4. Restart Netdata
35 ```sh
36 /etc/rc.netdata restart
37 ```
38
39 ## Older systems
40
41 <details>
42 <summary>For DSM versions older than 7.2.2, additional configuration is required.</summary>
43
44 ### Create a Startup Script
45
46 Older DSM versions aren't automatically recognized during installation, so you'll need to create a startup script manually:
47
48 1. Create `/etc/rc.netdata` with [this script](https://gist.github.com/oskapt/055d474d7bfef32c49469c1b53e8225f).
49 2. Make it executable:
50 ```sh
51 chmod 0755 /etc/rc.netdata
52 ```
53 3. Enable auto-start by adding to `/etc/rc.local`:
54 ```sh
55 # Netdata startup
56 [ -x /etc/rc.netdata ] && /etc/rc.netdata start
57 ```
58
59 </details>