systemd instance name (%i) not working in ExecStart
Solution 1:
The first argument to ExecStart=
must be an absolute path to an executable. Substitutions are not accepted.
If you're just loading a bash script which then starts Node.js, you can do that explicitly:
ExecStart=/bin/bash /path/to/foo/%i/food
Solution 2:
To complement the accepted answer, any file (including binaries) can be executed with substitution using /usr/bin/env
:
ExecStart=/usr/bin/env /path/to/foo/%i/food