Possible to have samba on Hass.io and on underlying system at the same time?

I have Hass.io running in Docker on an Ubuntu machine (not HassOS, just Docker installed on Ubuntu, and then Hass.io docker image installed there). I’m very much a newbie to Docker, so this may be obvious, but I can’t figure it out.

I have the Hass.io “Samba share” plugin installed. When I tried to also have samba running on the host Ubuntu system, then, from my Windows desktop, I could connect to the Ubuntu shares, but not to the Hass.io shares. As soon as I uninstalled samba from Ubuntu, the Hass.io shares became visible.

Is there any way to have them coexist? As different shares maybe? Or does one just completely mask the relevant port of the other?

Change the port on the Samba add-on to something other than 22 (or any other port in use). I used 222 or 2222 in the past. Works just fine.

The samba add-on doesn’t have a way to set the port that I found, how do you change it?

And will Windows detect a share on a non-standard port?

Are you sure you aren’t thinking of SSH? 22 is the SSH port, Samba is 445 if iirc…

Samba and SSH are different things. :wink:

Let me ask this:

Why do you want samba running on both? Just run it on the host. That’s literally all you need. One samba server, serving the files you want access to.

When I run it on the host, I can’t access the internals of the containers - like the config files, the backup files, etc. Unless there’s a way and I’m missing it?

Sure you can. They are just directories and files on the host, mounted in a volume on docker. Nothing special about them.

Look at where the install script puts the share.

Woops, not sure how I got that mixed up.

1 Like

Based on the hassio install script,

DATA_SHARE=/usr/share/hassio

I guess I need to find where it put the files and set up a share there, I had just shared my ~ directory.

I’m having trouble figuring out where the script put the container elements. Any idea where it puts them by default? I’m not really an expert on bash scripts, and having a hard time finding it.

You should always review random install scripts and understand them before installing them

Hmm, I used the default script, but there’s no /usr/share/hassio

The script does have that line you quoted, but there’s no such directory on my system.

You sure?

If you ran that script, it created that directory. Try with sudo

sudo? I did. Running sudo ls -la /usr/share/hassiogets me “No such file or directory”. Likewise, sudo ls -la /usr/share shows a ton of stuff, but not hassio (or anything close).

Ok, found it. I think the walkthrough I was using had me specify a different path at some point, it ended up in ~/hassiocont/ I know this was a directory I created.

I hadn’t recognized it, because I was expecting to see a config folder, but it’s actually in ~/hassiocont/homeassistant. Odd, but good enough.

Don’t use random walkthroughs. Just use the official documentation.

Your docker container sees it as /config, but on the host it’s in a different path.

Official docs on installing on Ubuntu/Docker are somewhat sparse. I ran into issues, ended up using info from all over the place. It worked in the end, so all good

They are?