Octopus Linux Service

Hi,

I’ve just started using Octopus. I’m trying to use the Linux Tentacle as a service but start it as a service user instead of root. I’ve modified the directories the Tentacle creates to allow the service user to connect and modified the systemd service file to reflect the new user. However unless I use root the service refuses to start. If I try and modify it using;

./Tentacle service --reconfigure --user=myserviceuser

It starts the service as root :frowning:

I’ve done the same for services such as bitbucket/teamcity without any problem in the past.

Any help would be great!

Hi @Chris2!

You’ll want to make an edit to your /etc/systemd/system/tentacle.service file to change the user that it runs as for now. It looks like you’re all over it, but please be sure that the account that the service runs under has access to both the config and the applications directories that you configured!

Please let us know if you have any further questions!

Thanks @Justin_Walsh,

I’ve already done the service file (but perhaps I’ve made a mistake?);

[root@ewoksagldevap36 system]# cat sid-tentacle-01.service
[Unit]
Description=Octopus Deploy: Tentacle deployment agent
After=network.target

[Service]
Type=simple
User=svc_ansible
ExecStart=/opt/octopus/tentacle/Tentacle run --instance=sid-tentacle-01 --noninteractive
Restart=always

[Install]
WantedBy=multi-user.target

I’ve also give the /data and /opt/octopus directories permissions.

Service runs as;

[root@ewoksagldevap36 system]# ps aux | grep sid
root 43534 0.7 0.4 3575164 65380 ? SLsl 14:01 0:08 /opt/octopus/tentacle/Tentacle run --instance=sid-tentacle-01 --noninteractive

1 Like

Hi @chris2,

Sorry for the slow response here, I missed your reply coming in. I would say the culprit here is that you haven’t reloaded the systemd daemon, so it still has the original file cached. Doing a systemctl daemon-reload to get the latest updates to the service file should get you over the line.

Best!