/etc/systemd/system/ipfs.service
[Unit]
Description=IPFS daemon
After=network.target
[Service]
User=ipfs
Environment="IPFS_PATH=/data/ipfs"
ExecStart=/usr/bin/ipfs daemon
Restart=on-failure
[Install]
WantedBy=multi-user.target
useradd -r -s /usr/bin/nologin ipfs