While migrating my website that also runs a bitcoin testnet faucet I decided to finally automate the bitcoind startup using supervisord. I had already done that in other locations but had forgotten some important settings. Bitcoind takes some time to start, and supervisord needs to know. I also had to set the HOME environment variable, I don't remember why to be honest.
[program:bitcoind] command=/usr/local/bin/bitcoind directory=/srv/bitcoin environment=HOME="/srv/bitcoin",PATH="/usr/bin:/usr/sbin" user=bitcoin group=bitcoin autostart=true autorestart=true startsecs=60 startretries=3 stopwaitsecs=600 stopsignal=TERM