Change Service account from local to Custom Domain Account

Hi, I am trying to change my current Octopus instance to use a Custom Domain Account and not the Local System Account, can you please give help me and point me out how to do this.

Thanks,
-Diego Estrada

Hi Diego,

Thanks for getting in touch! Depending on which version of Octopus you’re currently running, you can enable Active Directory with one of the following commands on your Octopus server.

If you’re running Octopus 3.5 or later:
Octopus.Server.exe configure --activeDirectoryIsEnabled=true

If you’re running a version prior to 3.5:
Octopus.Server.exe configure --webAuthenticationMode=Domain

You can refer to these commands in our Authentication Providers documentation page, which also includes details on configuring your Active Directory users and groups.

Let me know if you have any further questions :slight_smile:

Kind regards,

Kenny

Hi Kenneth,

I understand how to activate the active directory log, but this does not answer my question, we have made some changes to the server where our Octopus Deploy database is hosted, now it needs to use a service account to log in to access it, and I need to make this configuration change in Octopus to start running under a service account.

Regards,
-Diego

Hi Diego,

Thanks for following up. I’m sorry I was on the wrong page and didn’t answer your question properly the first time. There are two potential ways of changing the Octopus Deploy service to run as a different user.

If you are running Octopus 3.5 or later, you can restart the service as a different user by running the following command (where ‘USERNAME’ is your AD account name, in either user@domain or domain\user format).

Octopus.Server.exe service --stop
Octopus.Server.exe service --username=USERNAME
Octopus.Server.exe service --start

Since that command was introduced in Octopus 3.5, you would need to do this manually for versions before 3.5. You can do that in your Services, under ‘Properties’ and the ‘Log On’ tab. See my attached screenshot showing this option.

A good reference that outlines all of the required permissions in order to run the Octopus Windows service can be found in our docs: https://octopus.com/docs/installation/installing-octopus/permissions-required-for-the-octopus-windows-service

I hope that helps! Please don’t hesitate to reach out if you have any further questions or concerns.

Kenny