Skip to content

Commit cc24710

Browse files
Create linux-custom-path-installation.md
1 parent 24092cc commit cc24710

File tree

1 file changed

+132
-0
lines changed

1 file changed

+132
-0
lines changed
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
title: Enable deployment of MDE at custom installation path
3+
description: Describes how to deploy Microsoft Defender for Endpoint on Linux to a custom installation path instead of the default location.
4+
ms.service: defender-endpoint
5+
ms.author: ewalsh
6+
author: emmwalshh
7+
ms.reviewer: gopkr
8+
ms.localizationpriority: medium
9+
manager: deniseb
10+
audience: ITPro
11+
ms.collection:
12+
- m365-security
13+
- tier3
14+
- mde-linux
15+
ms.topic: install-set-up-deploy
16+
ms.subservice: linux
17+
search.appverid: met150
18+
ms.date: 08/05/2025
19+
---
20+
21+
# Enable deployment of MDE at custom installation path
22+
23+
[!INCLUDE [Microsoft Defender XDR rebranding](../includes/microsoft-defender.md)]
24+
25+
**Applies to:**
26+
27+
- Microsoft Defender for Endpoint for servers
28+
29+
> Want to experience Defender for Endpoint? [Sign up for a free trial.](https://go.microsoft.com/fwlink/p/?linkid=2225630&clcid=0x409&culture=&country=us)
30+
31+
## Introduction
32+
33+
Microsoft Defender for Endpoint (MDE) on Linux now supports installation to custom paths, allowing organizations to deploy the agent to non-standard locations based on their specific requirements. This feature is particularly useful for environments with:
34+
35+
- Custom directory structures and organizational policies
36+
- Limited space on the root filesystem
37+
- Specific compliance requirements for application placement
38+
- Multi-tenant environments requiring isolation
39+
- Specialized storage configurations
40+
41+
By default, MDE installs to the standard system path (`/opt/microsoft/mdatp`). With custom path installation, you can specify an alternative base directory while maintaining the same relative directory structure and functionality.
42+
43+
## Prerequisites and System Requirements
44+
45+
Before deploying MDE to a custom path, ensure the following requirements are met:
46+
47+
### Prerequisites
48+
49+
- All standard [Prerequisites for Defender for Endpoint on Linux](mde-linux-prerequisites.md) must be satisfied.
50+
- The custom installation directory and its entire tree must have at least `rwxr-xr-x` (755) permissions.
51+
- Ensure adequate disk space in the target location (minimum 2 GB, more for high-performance workloads).
52+
- The target file system must support standard Linux file operations and permissions.
53+
- If SELinux is enabled, the `semanage` tool must be installed to set the correct file context for the custom installation path.
54+
55+
### Supported Distributions and Feature Availability
56+
57+
Custom path installation is supported on all [supported Linux distributions](mde-linux-prerequisites.md#supported-linux-distributions) for both x64 and ARM64 architectures.
58+
59+
> **Note:** The custom installation path feature is available starting from version **101.25062.0003** of Microsoft Defender for Endpoint on Linux.
60+
61+
## Steps for Installing to a Custom Path
62+
63+
This section describes only the extra steps needed for custom path installation:
64+
65+
- **Manual installation**: Perform the following additional setup steps before running the standard manual installation commands described in [linux-install-manually.md](linux-install-manually.md).
66+
- **Installer script**: Add the `--install-path /your/custom/path` parameter. See [installer script deployment guide](linux-installer-script.md).
67+
68+
### Manual Installation: Pre-Installation Setup
69+
70+
If you need to manually install Microsoft Defender for Endpoint (MDE) to a custom (non-default) location, follow these additional steps before starting the standard installation process:
71+
72+
1. **Set your custom path variable**:
73+
74+
> [!NOTE]
75+
> The custom path must be an absolute path (e.g., `/your/custom/path`). Relative paths are not supported.
76+
77+
```bash
78+
export CUSTOM_PATH="/your/custom/path"
79+
```
80+
81+
2. **Create required directories and config file**:
82+
```bash
83+
sudo mkdir -p "${CUSTOM_PATH}"
84+
sudo mkdir -p /etc/opt/microsoft/mdatp
85+
echo '{"install_path": "'${CUSTOM_PATH}'"}' | sudo tee /etc/opt/microsoft/mdatp/mde_path.json
86+
```
87+
88+
3. **Set permissions**:
89+
```bash
90+
sudo chmod 755 "${CUSTOM_PATH}"
91+
sudo chmod 644 /etc/opt/microsoft/mdatp/mde_path.json
92+
```
93+
94+
4. **Create symlink**:
95+
```bash
96+
sudo ln -sf "${CUSTOM_PATH}/opt/microsoft/mdatp" /opt/microsoft/mdatp
97+
```
98+
99+
Then proceed with the standard installation steps for your distribution.
100+
101+
## Upgrade and Maintenance
102+
103+
Upgrades for MDE installed in a custom path work the same as standard installations—the installer automatically preserves your existing path and configuration.
104+
105+
> [!IMPORTANT]
106+
> Changing the installation path during an upgrade is not supported. If you need to change the installation path, you must first uninstall MDE and then reinstall it to the new location.
107+
108+
## Frequently Asked Questions (FAQ)
109+
110+
**Can I install MDE to any directory?**
111+
Yes, as long as it’s an absolute path with at least 755 permissions and enough space (minimum 2 GB).
112+
113+
**Can I change the MDE installation path after installation?**
114+
No, you must uninstall and reinstall to use a different path.
115+
116+
**How do I upgrade MDE in a custom path?**
117+
Run the usual upgrade commands. Installation path stays unchanged.
118+
119+
**Can I change the custom path during upgrade?**
120+
No, installation path changes require a fresh install.
121+
122+
123+
## See Also
124+
125+
- [Prerequisites for Microsoft Defender for Endpoint on Linux](mde-linux-prerequisites.md)
126+
- [Deploy Defender for Endpoint on Linux manually](linux-install-manually.md)
127+
- [Use installer script based deployment to deploy Microsoft Defender for Endpoint on Linux](linux-installer-script.md)
128+
- [Troubleshoot installation issues](linux-resources.md#log-installation-issues)
129+
- [Configure Defender for Endpoint on Linux](linux-preferences.md)
130+
131+
> [!TIP]
132+
> Do you want to learn more? Engage with the Microsoft Security community in our Tech Community: [Microsoft Defender for Endpoint Tech Community](https://techcommunity.microsoft.com/category/microsoft-defender-for-endpoint/discussions/microsoftdefenderatp)

0 commit comments

Comments
 (0)