mosquitto -d
Is used to start the mosquitto daemon from the command line (much like sudo service mosquitto start
) so it sounds like you just need to enable the mosquitto service to start at boot time. Try this command
sudo systemctl enable mosquitto.service