Why does this happen when i run this it just starts mqtt, but no container is running? How do i get it in it’s own permanent container so that home-assistant can talk to it?
The -it is redirecting I/O to your terminal. You’re probably not wanting that, so if you leave it out the container will be running in the background. You might want to look at the documentation here because you probably want --restart=always and maybe some other options too.
Or you can detach with commands crtl+p ctrl+q. (Only in docker, not in docker-compose)
Then create a password file inside the container with the mosquitto_passwd command. You can mount that file where you have your config as well. If you want to use password of course.
I got it to run, but now home-assistant is throwing a bunch of errors, i have it in the docker server as home-assistant, do i need to anything in the config?