[GH-ISSUE #2171] Pass management-url to msi installer. #4489

Closed
opened 2026-08-05 00:57:58 -04:00 by saavagebueno · 6 comments
Owner

Originally created by @svardie on GitHub (Jun 20, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2171

Is your feature request related to a problem? Please describe.
We struggling to autodeploy MSI installer to our Windows users with custom management-url.

Describe the solution you'd like
An option to provide management-url address to MSI packet during installation.

Originally created by @svardie on GitHub (Jun 20, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2171 **Is your feature request related to a problem? Please describe.** We struggling to autodeploy MSI installer to our Windows users with custom management-url. **Describe the solution you'd like** An option to provide management-url address to MSI packet during installation.
saavagebueno added the feature-request label 2026-08-05 00:57:58 -04:00
Author
Owner

@lixmal commented on GitHub (Jun 21, 2024):

You can populate the values in %PROGRAMDATA%/Netbird/config.json as an alternative, would that help?

<!-- gh-comment-id:2182594962 --> @lixmal commented on GitHub (Jun 21, 2024): You can populate the values in `%PROGRAMDATA%/Netbird/config.json` as an alternative, would that help?
Author
Owner

@svardie commented on GitHub (Jun 24, 2024):

We managed to create custom msi installer with powershell script that populate needed value in config.json after installation.

<!-- gh-comment-id:2186500233 --> @svardie commented on GitHub (Jun 24, 2024): We managed to create custom msi installer with powershell script that populate needed value in config.json after installation.
Author
Owner

@nicjohnston commented on GitHub (Oct 15, 2024):

@svardie Would you by any chance be able to share details on creating the custom installer to do this?
(I'm a linux guy that has been dropped in the deep end with windows admin and using Intune)

<!-- gh-comment-id:2415156577 --> @nicjohnston commented on GitHub (Oct 15, 2024): @svardie Would you by any chance be able to share details on creating the custom installer to do this? (I'm a linux guy that has been dropped in the deep end with windows admin and using Intune)
Author
Owner

@svardie commented on GitHub (Oct 15, 2024):

@nicjohnston Sure. Here it is.

((Get-Content -path "C:\ProgramData\Netbird\config.json" -Raw) -replace 'api.netbird.io:443','your_custom_url') | Set-Content -Path "C:\ProgramData\Netbird\config.json"

We modified official Netbird msi installer with Advanced Installer software and stick this powershell script in it.

If you are using Microsoft Intune, then possible scenario can be to deploy official msi-packet without changing it, and then run PS script on clients via Intune. Maybe i am wrong, not worked with Intune.

Hope this will help.

<!-- gh-comment-id:2415498868 --> @svardie commented on GitHub (Oct 15, 2024): @nicjohnston Sure. Here it is. `((Get-Content -path "C:\ProgramData\Netbird\config.json" -Raw) -replace 'api.netbird.io:443','your_custom_url') | Set-Content -Path "C:\ProgramData\Netbird\config.json"` We modified official Netbird msi installer with [Advanced Installer ](https://www.advancedinstaller.com/) software and stick this powershell script in it. If you are using Microsoft Intune, then possible scenario can be to deploy official msi-packet without changing it, and then run PS script on clients via Intune. Maybe i am wrong, not worked with Intune. Hope this will help.
Author
Owner

@itmunky commented on GitHub (Nov 15, 2024):

I used the below instead to acheive basically the same thing. It also changes the admin url too.

'# Define the path to the config file
$configFilePath = "C:\ProgramData\Netbird\config.json"

Check if the config file exists

if (Test-Path -Path $configFilePath) {
# Read the content of the config file
$configContent = Get-Content -Path $configFilePath -Raw | ConvertFrom-Json

# Check if the Host values are correct
$isUpdated = $false
if ($configContent.ManagementURL.Host -ne "<self-hosted-url>:33073") {
    $configContent.ManagementURL.Host = "<self-hosted-url>:33073"
    $isUpdated = $true
}
if ($configContent.AdminURL.Host -ne "<self-hosted-url>:443") {
    $configContent.AdminURL.Host = "<self-hosted-url>:443"
    $isUpdated = $true
}

# If updates were made, convert the updated content back to JSON format and write it back to the file
if ($isUpdated) {
    $updatedConfigContent = $configContent | ConvertTo-Json -Depth 10
    Set-Content -Path $configFilePath -Value $updatedConfigContent
    Write-Output "Config file updated successfully."
} else {
    Write-Output "Config file is already up to date."
}

} else {
Write-Output "Config file does not exist. No changes made."
}'

<!-- gh-comment-id:2478206585 --> @itmunky commented on GitHub (Nov 15, 2024): I used the below instead to acheive basically the same thing. It also changes the admin url too. '# Define the path to the config file $configFilePath = "C:\ProgramData\Netbird\config.json" # Check if the config file exists if (Test-Path -Path $configFilePath) { # Read the content of the config file $configContent = Get-Content -Path $configFilePath -Raw | ConvertFrom-Json # Check if the Host values are correct $isUpdated = $false if ($configContent.ManagementURL.Host -ne "<self-hosted-url>:33073") { $configContent.ManagementURL.Host = "<self-hosted-url>:33073" $isUpdated = $true } if ($configContent.AdminURL.Host -ne "<self-hosted-url>:443") { $configContent.AdminURL.Host = "<self-hosted-url>:443" $isUpdated = $true } # If updates were made, convert the updated content back to JSON format and write it back to the file if ($isUpdated) { $updatedConfigContent = $configContent | ConvertTo-Json -Depth 10 Set-Content -Path $configFilePath -Value $updatedConfigContent Write-Output "Config file updated successfully." } else { Write-Output "Config file is already up to date." } } else { Write-Output "Config file does not exist. No changes made." }'
Author
Owner

@PizzaLovingNerd commented on GitHub (May 27, 2026):

Hello, this is a stale issue and has multiple work arounds including running netbird up --setup-key ... --management-url ... after install, populating %PROGRAMDATA%\Netbird\config.json after install (which is the easiest to automate), or the custom installer workaround pointed out by another user. If you would still like this to be implemented, please open a GitHub Discussion.

Thanks!

<!-- gh-comment-id:4560170588 --> @PizzaLovingNerd commented on GitHub (May 27, 2026): Hello, this is a stale issue and has multiple work arounds including running `netbird up --setup-key ... --management-url ...` after install, populating `%PROGRAMDATA%\Netbird\config.json` after install (which is the easiest to automate), or the custom installer workaround pointed out by another user. If you would still like this to be implemented, please open a [GitHub Discussion](https://github.com/netbirdio/netbird/discussions). Thanks!
Sign in to join this conversation.
No Label feature-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#4489