Rhasspy 2.5.1 virtual environment run as service

I want to run rhasspy 2.5.1 in service at boot
I created the launch file such as:

Blockquote[Unit]
Description=Rhasspy
After=syslog.target network.target

[Service]
Type=simple
WorkingDirectory=/home/pi/rhasspy
ExecStart=/bin/bash -lc ‘rhasspy --profile fr’

RestartSec=1
Restart=on-failure

StandardOutput=syslog
StandardError=syslog

SyslogIdentifier=rhasspy

[Install]
WantedBy=multi-user.target

and i also tried in default.target mode but still got the following error
RuntimeError: Failed to connect to MQTT broker

Help !!!
Thank’s

Do you have a mosquitto running?

When i run with rhasspy -p fr -> it’s OK !!!
but when i run systemctl start rhasspy i have then problem of runtimeError with MQTT broker

Same here.
I think it’s because service have to be launch with privileges.

My command bin/rhasspy-voltron --profile have be to launch with sudo

Running with sudo means you run it with root privileges. If you don‘t set a User in the systemd file, the service is automaticly run as root. So this isn‘t the problem.

I had the same problem last week, the only thing that helped, was Setting up the whole thing again. And start it directly as a service.

what do you mean by: “start all over ??”

I think the problem lies with the launcher -> / usr / bin / rhasspy which itself launches the “supervisord” assistant service

I do not understand.
I always launch the command /home/user/rhaspsy/bin/rhasspy-voltron.

This is only working with sudo