this post was submitted on 19 Nov 2025
38 points (100.0% liked)

Selfhosted

53070 readers
638 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I'm new to Docker, but I'm trying to deploy some containers that will need to read and write to a network shared volume. I'm hoping to run things like Navidrome, Immich, and an Arr Stack. The containers are on Ubuntu and my network volume is on a qnap machine. It is discoverable from Ubuntu without issue.

Do I need to mount the shared volume in Ubuntu or can I just refer to it in the Docker Compose file?

I know I need to mention the location of the volume in the Docker Compose file, but I'm not sure how to write that. How do I include the un/pw information for the NAS?

I read about bind mounts in Docker's documentation. Is that what I want to use? Again, how do I include the un/pw information? I'm not sure how to use the commands.

The volume path for the navidrome folder is //tiger-nas/music/music for example.

I appreciate any help.

you are viewing a single comment's thread
view the rest of the comments
[–] irmadlad@lemmy.world 1 points 2 days ago

It's been a while so I am relying on some janky notes:

Prep:

spoiler

Create a Mount Point: sudo mkdir /mnt/myhdd

Mount the HDD: sudo mount /dev/sdb1 /mnt/myhdd

Verify the Mount: df -h

Install Samba (if not already installed):

sudo apt update
sudo apt install samba

Configure Samba: sudo nano /etc/samba/smb.conf

Add the following at the end of the file:

[MyHDD]
path = /mnt/myhdd
available = yes
valid users = yourusername
read only = no
browsable = yes
public = yes
writable = yes

Set Samba Password: sudo smbpasswd -a yourusername

Restart Samba: sudo systemctl restart smbd

To make the HDD mount automatically at boot, add the following line to /etc/fstab: /dev/sdb1 /mnt/myhdd ext4 defaults 0 2

make you replace /dev/sdb1 and /mnt/myhdd with your actual device and mount point.

Compose File:

spoiler

services:
  navidrome:
    image: deluan/navidrome:latest
    user: 0:0  # should be owner of volumes
    ports:
      - "14533:4533"
    restart: always
    environment: {}  # Empty mapping - valid and fixes the error
      # Optional: put your config options here. Examples:
      # ND_LOGLEVEL: debug
      # ND_SCANSCHEDULE: "@every 5m"
    volumes:
      - "/docker-data/navidrome/:/data"
      - "/mnt/myhdd/your/path/goes/here:/music:ro"  # Use forward slashes

Adjust as necessary or applicable. Maybe this will get you headed in the right direction. It'd be helpful if someone double checked my notes. I get nervous when giving instructions. LOL Also it should go without saying that you should do your due diligence verifying any code copied off the internet. Not responsible for ingrown toenails, loose stool, or blurred vision.