Installing HA on Docker in Windows desktop

Hi,

Im bussy for several houres now. Im feeling kinda dumb.

i try to use the install command in cmd.exe (runned as admin)

docker run -d
–name homeassistant
–privileged
–restart=unless-stopped
-e TZ=Europe/Amsterdam
-v /c:\Users\XXXX\XXXX - XXX - XXX\Bureaublad\ha\haconfig:/config
–network=host

When i copy paste this in cmd.exe i just got errors :confused:

docker: invalid reference format.
‘–name’ is not recognized as an internal or external command,
‘–privileged’ is not recognized as an internal or external command,

etc etc

What do i do wrong? I try to run it in docker and accces it via the browser. If i manually add HA to Docker i cant acces as well. I cant find proper documentation on this case (or at least didnt found it, googled for houres now)

Thanks

ha on docker on Windows will present more issues, at some point you would actually need to run this on net=host which is not available on Windows

HomeAssistant running on Docker Desktop for Windows but not accessible from browser - Installation - Home Assistant Community (home-assistant.io)

Thanks for reply. Is there any other possibility to run it on localmachine? (windows)

I first had oracle VM downloaded but wasnt compatible with wifi? Is there any other trick to start it on my laptop with wifi?

It will work with docker but without net=host it has limitations so not advised
This is what HA proposes
Windows - Home Assistant (home-assistant.io)

I dont get it. What i need to put where than? Where i can put that code? I cant find anything.

I have no clue where i can put that code in docker :confused:

Not sure what you mean too :slight_smile:
You docker run as in your first post above ends with: --network=host
But that does not work on windows.
If you follow the link I sent then you will see how to get it to work with the proper “docker run - d …etc.”

That is my whole point where do i put that docker run - d etc :confused:
When i put it in cmd.exe i just get errors

ah,so you installed docker on your laptop I guess

yes i installed it on my laptop desktop version

gimme a few mins, redoing it … I thought I had my old laptop ready but …not

1 Like

It was a while ago so these are my steps
install docker desktop
restart
start docker desktop…error as requires latest WSL, follow the link and install WSL
start docker desktop (takes a while depending on laptop…4min with me)
create folder c:/homeassistant
open command line
enter

docker run -d -p 8123:8123 --privileged --volume "C:\homeassistant:/config" --name homeassistant -e "TZ=Europe/Paris" ghcr.io/home-assistant/home-assistant:stable

At the end it will present a container id which means it started
Then it can take up to 15mins before it is ready
In c:/homeassistant you will find the HA specific folders/file
use local-ip:8123 to enter

1 Like

Wow thanks this works o.O dont knwo how but very thanks!

1 Like

one correction…to logon:
localhost:8123
EDIT: and what you will find is that it will not autodetect devices…because it is ‘caught’ behind port 8123
If you please to build this out, then repeating to use a different install , migration might be(come) a pain

1 Like

Im going to put it on my nas synology device when i understand what i can do with it and build some nice things with it :smiley:

Spent a lot of time to set up HA on windows.
That answer worked!
Thanks a lot!