Linuxserver/sabnzbd: How to use cifs-share on my NAS for Downloads and watch-folder?

I managed to start this container using docker-compose and the suggested yaml-file with some changes mainly regarding the ports.

How can I use a cifs-share with the following details:
-SMB 1.0
-192.168.178.11
-user: username
-password: youdontmind
-Share: /hdd01
-Folder in Share /hdd01
/sabnzbd/downloads
/sabnzbd/incomplete-downloads
/sabnzbd/watch

I’d like to use the folders in the share inside the container in the sabnzbd config, so downloads are written to my nas and the watch-folder is used to throw .nzb files in :wink:

Thanks a lot for your help.

Mount the shares on your host as usual, then use those locations in the docker volume maps

Thanks for your quick reply.
I already have mounted //192.168.178.11/hdd01 to my host in /mnt/nas.

What exactly would the correct syntax for docker-compose have to be to use this mountpoint in the docker container?

Here’s an example of how I do it.

  emby:
    image: linuxserver/emby
    container_name: emby
    environment:
      - PUID=1000
      - PGID=1004 
      - TZ=Europe/London 
      - UMASK_SET=022 #optional 
    volumes: 
      - ./emby:/config
      - cifs_video-series:/data/tvshows 
      - cifs_video-films:/data/movies 
      - ./transcoding:/transcode

  volumes: 
    cifs_video-series: 
      driver: local 
      driver_opts: 
        type: cifs
        o: username=steve,password=yeahright,domain=23wwc.io,file_mode=0777,dir_mode=0777,iocharset=utf8
        device: //192.168.1.13/tv
    cifs_video-films:
      driver: local 
      driver_opts: 
        type: cifs 
        o: username=steve,password=no-pw-here,domain=23wwc.io,file_mode=0777,dir_mode=0777,iocharset=utf8 
        device: //192.168.1.13/movies
1 Like

Using your code I get an error:

ERROR: The Compose file ‘./docker-compose.yaml’ is invalid because:
Unsupported config option for services.volumes: ‘cifs_sabznbd’

Is it possible to use an existing mountpoint in the host in docker-compose?

I already have mounted /mnt/nas to my nas and would like to use this inside my container.
What would the correct syntax in my docker-compose.yaml file be to use /mnt/nas from the host?

sure you can, but you have to to set everything up properly and 99% of users have no clue how to use SMB or NFS. It’s why we don’t support it (also, it’s not supported at all for databases, including sqlite)

the recommendation for mounts is always to use docker to mount things to docker :slight_smile: thats why we have nfs and cifs driver types in compose.

he didnt show anything called cifs_sabnzbd which means you changed something and we can’t help you without seeing what you did wrong. What he showed it the proper docker way to do this.

So here is my complete docker-compose.yaml:

version: "2.1"
services:
  sabnzbd:
    image: lscr.io/linuxserver/sabnzbd
    container_name: sabnzbd
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - sabnzbd_config:/config
      - cifs_sabznbd:/sabznbd
    ports:
      - 8082:8080
      - 9092:9090
    restart: unless-stopped
  volumes: 
    cifs_sabznbd: 
      driver: local 
      driver_opts: 
        type: cifs
        o: username=john,password=johndoespw,file_mode=0777,dir_mode=0777,iocharset=utf8
        device: //192.168.178.11/HDD01

looks fine aside from the lack of line break between the services and volumes section (i think it’s necessary)

i think 2.1 compose doesnt support it either, maybe try flipping that to 3.8

is “john” the username that owns the folder on the windows side?

The username john ist the same like the one I used in the mount an the host-side.

I added a line break but same error.

did you try changing the version as i suggested?

Yes I did. Still the same error

version: "3.8"
services:
  sabnzbd:
    image: lscr.io/linuxserver/sabnzbd
    container_name: sabnzbd
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - sabnzbd_config:/config
      - cifs_sabznbd:/sabznbd
    ports:
      - 8082:8080
      - 9092:9090
    restart: unless-stopped

  volumes: 
    cifs_sabznbd: 
      driver: local 
      driver_opts: 
        type: cifs
        o: username=john,password=johndoespw,file_mode=0777,dir_mode=0777,iocharset=utf8
        device: //192.168.178.11/HDD01

hm im out of ideas, i created a samba share and mounted it and it worked. truthfully this is one of the reasons we dont support it because it’s super quirky.

I’d say hang out and hope for the best, but set your expectations, not many ppl will be willing to dive into remote mount support.

Volume definitions go outside service definitions.

version: "3.8"
services:
  sabnzbd:
    image: lscr.io/linuxserver/sabnzbd
    container_name: sabnzbd
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - sabnzbd_config:/config
      - cifs_sabznbd:/sabznbd
    ports:
      - 8082:8080
      - 9092:9090
    restart: unless-stopped

volumes: 
  cifs_sabznbd: 
    driver: local 
    driver_opts: 
      type: cifs
      o: username=john,password=johndoespw,file_mode=0777,dir_mode=0777,iocharset=utf8
      device: //192.168.178.11/HDD01
1 Like

Error changed to:

ERROR: Named volume “sabnzbd_config:/config:rw” is used in service “sabnzbd” but no declaration was found in the volumes section.

comment out that line for testing or just put like - /tmp/sabnzbdconfig:/config