You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for agent install --base-path when using defend / endpoint security is included #81
--base-path
Install Elastic Agent in a location other than the default. Specify the custom base path for the install.
The --base-path option is not currently supported with Elastic Defend.
Requested Feature :
Support for custom installation path when agent is using a policy that includes defend integration
Use case :
User may be on virtualised environment and want to persist the agent folder by specifying a persistent location
This feature is documented as not supported if the agent in question use a policy that include defend integration hence this causes a high number of offline then inactive agents by not being able to specify location of agent installation folder (agents then become inactive/hidden and need to be unenrolled)
On Windows, this one's tricky because it violates certain trust assumptions made Endpoint and its [un]installers, making it harder to defend against some types attacks.
If pursued, perhaps we could limit this feature to Linux. It sounds like Linux is the intended use case anyway.
Assuming this is a Citrix VDI issue, You should be able to achieve this by installing Agent to a VDI-persisted location while keeping Endpoint in its required location. Below is a powershell script that leverages a symbolic link (instead of --base-path) to redirect Agent's install to C:\ProgramData. You can change C:\ProgramData to another path as required in your environment. Agent will automatically install Defend at startup if required.
With this config, you can see Agent is running from C:\ProgramData but Endpoint is running from C:\Program Files.
Note that you may need the C:\Program Files\Elastic\Agent symbolic link to be present in your VDI base image (the mklink line below). If you're a customer with a support plan and want to follow up with more details, please feel free to reach out to your customer support representative.
Activity
gabriellandau commentedon Sep 19, 2024
On Windows, this one's tricky because it violates certain trust assumptions made Endpoint and its [un]installers, making it harder to defend against some types attacks.
If pursued, perhaps we could limit this feature to Linux. It sounds like Linux is the intended use case anyway.
user-987654321 commentedon Sep 19, 2024
Hi. The use case is Windows
gabriellandau commentedon Sep 19, 2024
Assuming this is a Citrix VDI issue, You should be able to achieve this by installing Agent to a VDI-persisted location while keeping Endpoint in its required location. Below is a powershell script that leverages a symbolic link (instead of
--base-path) to redirect Agent's install toC:\ProgramData. You can changeC:\ProgramDatato another path as required in your environment. Agent will automatically install Defend at startup if required.With this config, you can see Agent is running from

C:\ProgramDatabut Endpoint is running fromC:\Program Files.Note that you may need the
C:\Program Files\Elastic\Agentsymbolic link to be present in your VDI base image (themklinkline below). If you're a customer with a support plan and want to follow up with more details, please feel free to reach out to your customer support representative.