Pre-configure environment URLs for Windows / Firefox

I would like to have our base URL pre-populated in Firefox on our devices so that users don’t have to enter it themselves.
We already have the addon installed on the clients via a GPO.

Unfortunately, the instructions for Firefox do not work for us.

The URL is not taken over in the addon. (After restarts :smiley: )
Unfortunately, I have not been able to find any further help on this.

grafik

Thanks for the info, can you try removing the comma on the following line:

"base": "https://myadress.com"

Additionally, the Firefox 2022.9.0 browser extension is still rolling out to all (may not be available yet).

Hey dwbit,

sure, I saw that, but it didn’t work without comma.

Firefox expects registry values to be placed to configure extensions. Here’s a working sample config.reg file you can use to configure the extension that should work, even if using a Group Policy to configure things:

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox\3rdparty\Extensions{446900e4-71c2-419f-a6a7-df9c091e268b}\environment] “base”=“https://my.bitwarden.server.com” “webVault”=“https://my.bitwarden.server.com” “api”=“https://my.bitwarden.server.com” “identity”=“https://my.bitwarden.server.com” “icons”=“https://my.bitwarden.server.com” “notifications”=“https://my.bitwarden.server.com” “events”=“https://my.bitwarden.server.com

You can modify names, save it as a .reg file, test, and deploy it in the GP environment.

The team is also working on updating our documentation.

Hey dwbit.

Thank you!

I have copied your script.
It also creates the path, but unfortunately no value. Possibly because in the script is not defined which key should be created?

I manually created a string value called “base” and set the URL as value. Unfortunately this did not work either.

Could you help me again please?

And the 2022.8.0 Version is installed.

The .reg file syntax is very specific about the requirement for blank lines before each registry path. Thus, your config.reg file should look as follows (with customization of URLs as required):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox\3rdparty\Extensions\{446900e4-71c2-419f-a6a7-df9c091e268b}\environment]
"base"="https://my.bitwarden.server.com"
"webVault"="https://my.bitwarden.server.com"
"api"="https://my.bitwarden.server.com"
"identity"="https://my.bitwarden.server.com"
"icons"="https://my.bitwarden.server.com"
"notifications"="https://my.bitwarden.server.com"
"events"="https://my.bitwarden.server.com"

Notice the blank line before the [HKLM] path, and that each name/value pair starts on a new line.

 


Edit: Added a missing `\`, found by @accolon.
1 Like

Hey grb.

Thank you very much. That worked. These values are in my registry.

Unfortunately, when I use the addon (2022.8.0), the address is not shown to me.

grafik

(I also cleaned up Firefox one more time. Only cleaned not uninstalled. That did not help either.)

Is there another tip for this?

Thanks in advance.

I’m not using Windows anymore, but is the Registry path really correct?

To me it looks like it’s missing a backslash right after “Extensions”, i.e.:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox\3rdparty\Extensions\{446900e4-71c2-419f-a6a7-df9c091e268b}\environment

2 Likes

I think you’re right. I had copied the path from @bw-admin’s original response, and it it possible the backslash originally disappeared because it was interpreted an escape character. I have edited my post above.

I think that bit of info got overlooked, but this feature will be available as of 2002.9 which is currently rolling out.

2 Likes

So with the new version of bitwarden it works in my firefox.

My last question is: Is there a way to force those settings for bitwarden?
Because the user only get the information for a pre-configutation but has to click on it to set it.

We have the same issue with Chrome when a user log in a windows workstation for the first time. As he/she open chrome for the first time, the bitwarden extension get installed and force pinned, and the base server url is pushed in the registry, but we have the same issue where the user have to actually click on it and save to set it.

Hopefully there is someone who can answer this, it would be extremely helpful. I’ve read several articles on the forums that discuss this as a problem but yet no answer has been provided.

We are also having the same issue where the instructions or article, Configure Clients Centrally | Bitwarden Help Center, doesn’t provide adequate information to be used on how to populate that information for each user. There has to be a way to do this automatically and not have to edit the json after each install.

I’ve posted a solution here for the app if you still need it

Anyway just pre-create a %appdata%\Roaming\Bitwarden\data.json with just this settings (the rest will be populated by the app at the first time it will start)

{
	"global": {
		"theme": "system",
		"environmentUrls": {
			"base": "https://my.btw.server.com",
			"api": null,
			"identity": null,
			"icons": null,
			"notifications": null,
			"events": null,
			"webVault": null,
			"keyConnector": null
		},
		"region": "Self-hosted"
	}
}