LXC->DOCKER->SAMBA=no access to share folder

jowens09

New Member
Aug 19, 2025
5
1
3
Hello all,

I'll give a quick detailed run down and post the link to the video I followed. For a little bit of extra context this method has worked for me for a while. But after having to redeploy containers after a cataclysmic failure I now have no access to my network shared folder.

So this video by Novaspirit Tech goes over setting up a network shared folder by using an LXC container with docker running inside then further setting up samba share within that docker container. The inception here is a little crazy but it was working for quite some time. Now past me was trying to help future me by copying the entire command to create the share in case something went wrong and I had to re-deploy.

Here's the command:
docker run -it --restart unless-stopped --name samba -p 139:139 -p 445:445 -p 137-138:137-138/udp -v /root/share:/share -v /mnt/media:/mnt/media -d dperson/samba -u "username;password" -s "public;/share;yes;no;yes" -s "media;/mnt/media;yes;no;yes"

After re-deploying the samba share and going to my start menu "windows 11" and typing \\IP.IP.IP.IP I'm unable to access the folder. I get this:

Windows cannot access \\IP.IP.IP.IP

Check the spelling of the name. Otherwise, there might be a problem with your network. To try to identify and resolve network problems, click Diagnose.



In past experiences the issue resides within docker/samba share. If anyone has any insight and can provide assistance I'd appreciate the help to get my shared folder working again.
 
Use a vm, docker inside lxc is not recommended:
If you want to run application containers, for example, Docker images, it is recommended that you run them inside a Proxmox QEMU VM. This will give you all the advantages of application containerization, while also providing the benefits that VMs offer, such as strong isolation from the host and the ability to live-migrate, which otherwise isn’t possible with containers.
. Or setup the samba directly in the lxc with the distribution samba packages https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_technology_overview

In fact docker inside lxc tends to break from time to time ( especially after major upgrades).

Another Option is to setup Samba inside a lxc e.g. with turnkeylinux Fileserver template or the zamba-lxc-toolbox. What are you trying to achieve, what's your usecase?
 
  • Like
Reactions: UdoB
Use a vm, docker inside lxc is not recommended:


In fact docker inside lxc tends to break from time to time ( especially after major upgrades).

Another Option is to setup Samba inside a lxc e.g. with turnkeylinux Fileserver template or the zamba-lxc-toolbox. What are you trying to achieve, what's your usecase?
The usecase is using samba to create a network shared folder where all of my vzdumps, movies, shows, pictures etc go on my NAS. I'm absolutely up to suggestions as again I did this process purely based off of a video series when I first setup the server months ago. My exposure to proxmox and LXC's is still pretty small.
 
Now I'm confused, do you have a NAS in the network and want to have one of it's shares inside an lxc or is the idea to use the lxc as as NAS?
 
I can understand the confusion. I have NAS storage. The LXC i guess is just a middle man. The path to the NAS folder is mounted to the LXC and the LXC hosts the samba share that I can access from my networked devices. The NAS storage is hosted on the same proxmox machine.
 
Wow, just wow. I watched that video (rest in peace Don) but that approach is just nutty to me.

First, if you are backing up to something (whether it is a VM, LXC, or docker image in an LXC) that resides on the same Proxmox host you want to back up, then that arrangement is only useful if you have added disks that Proxmox is not currently using for any other purpose. Otherwise, you are just wasting your time, and you will have no protection whatsoever.

Second, as noted, running docker in an LXC is not adviseable

Third, there's no reason to run docker. In fact I would argue it wastes resources, which is the entire reason for running an LXC in the first place, to save on memory, etc. You could just as easily used the Turnkey Linux file server LXC template to get a samba server set up ( https://www.turnkeylinux.org/fileserver ) Personally I would just install a lightweight distro template that you are familiar with and just install samba. Really, doing this by using a docker image just seems really insane to me.

Personlly, what I would do is install Openmediavault in a VM. It doesn't use that many resources, and you won't have to do anything from the command line if you don't want to. Alternatively, I would install a Debian LXC template and install samba on that, since I don't mind the command line.

But again, if you haven't installed disks that are dedicated to this samba server, you are wasting your time.
 
  • Like
Reactions: Johannes S and UdoB
Yeah I was sad to hear that he passed since he helped me with my first ever setup back in April. I have a fully functioning media server because of him. As I said this is my first exposure to linux, promox, and lxc's. I'm no stranger to virtualization and VM's though. All of my experience has been cisco and vmware, so this is all learn as I go. I'll look into both options that you put there for me. Thanks for helping a newbie out :D.
 
  • Like
Reactions: louie1961
I also didn't mention that I have a separate machine that will act as my NAS to get away from my media server running the storage and the media things. My current problem is I'm waiting for 1 more hard drive to come in to I can setup the new pool and copy everything over, adjust mount points etc. etc. I'll be using TrueNAS on that machine to manage the new MUCH larger pool.
 
Having a separate NAS will make your life so much easier. Assuming that your media server is a collection of docker containers (jellyfin, plex, emby, -ARR suite, whatever), then you can use the docker NFS driver to mount shares from your NAS directly to the container. I prefer NFS to Samba for this use case, but I believe there is a SAMBA driver as well. I just have never used it. To give you an idea, here is one of my docker compose files with an NFS share directly mounted to the container...no bind mounting or anything else.


YAML:
services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: always
    environment:
      DOMAIN: "https://vaultwarden.mydomain.com"
      SIGNUPS_ALLOWED: "true" # Deactivate this with "false" after you have created your account so that no strangers can register
      ADMIN_TOKEN: 123456....
    volumes:
      - type: volume
        source: vaultwarden
        target: /data
        volume:
          nocopy: true
    ports:
      - 9081:80

volumes:
  vaultwarden:
    driver_opts:
      type: "nfs"
      o: "vers=4,addr=10.10.10.3,nolock,soft,rw"
      device: ":/volume1/vaultwarden"
 
  • Like
Reactions: Johannes S