Windows 11 OpenSearch Installation Help

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch 2.17.1
Windows Native (no Docker)
Windows 11 Desktop

Describe the issue:
I need to setup a simple no-cert, no-security, search engine.

When executing opensearch-window-install.bat I get the following output:

D:\opensearch\opensearch-2.17.1>opensearch-windows-install.bat
“OPENSEARCH_HOME: D:\opensearch\opensearch-2.17.1”
“OPENSEARCH_PATH_CONF: D:\opensearch\opensearch-2.17.1\config”
“Running Security Plugin Install Demo Configuration”
“OpenSearch 2.12.0 onwards, the OpenSearch Security Plugin a change that requires an initial password for ‘admin’ user.”
“Please define an environment variable ‘OPENSEARCH_INITIAL_ADMIN_PASSWORD’ with a strong password string.”
“If a password is not provided, the setup will quit.”
“For more details, please visit: Windows - OpenSearch Documentation
The system cannot open the device or file specified.

I have set: OPENSEARCH_INITIAL_ADMIN_PASSWORD=Th1sIs@Str0ngP@ssw0rd!123

I have searched the forums/Bing/Google with no luck.

Can I please get some help?

Thank you.

1 Like

How, exactly, did you set the environment variable?

Hi @hagayg,

Do you get any value back if you run the below with Powershell?

$Env:OPENSEARCH_INITIAL_ADMIN_PASSWORD

image

best,
mj

I set the environment variable by opening Windows Start → Type in Env → click on Edit Environment variables (in the control panel) → click on the Environment Variables… button. After the popup appears, click the New button for the User variables, enter OPENSEARCH_INITIAL_ADMIN_PASSWORD for the Variable Name, enter Th1sIs@Str0ngP@ssw0rd!123 for the Variable Value. Click OK, click OK, click OK which closes the popup. Open a new CMD window and run the install.

@JeffBlumenthal, any luck installing? Have you checked if the Environment Variable was set successfully with the:

$Env:OPENSEARCH_INITIAL_ADMIN_PASSWORD

best,
mj

Hi Folks, I could not get it installed on windows 11. So we decided to install it on a Windows 2022 server and it worked perfectly.

Thank you for your help.

1 Like

Thanks for update, I have successfully installed on win 11 in a past (in case someone has similar issue).

Quick guess. You used User Variables. I am guessing your Opensearch instance isn’t running in the same user, try using global variables.

Hi Folks, the issue with initially not being able to get this running on my laptop was actually an IT managed issue since this is my work laptop. The IT team changed some things and I was able to get this working. I don’t have the details on what they changed.

I appreciate the responses.