Services.plex.volumes must be a list

Hi, I’m trying to add a plex-container to my docker running on a raspberry pi 4 as described at here

But when it comes to deploying the stack (or manually via docker-compose) the following error is shown:
services.plex.volumes must be a list

Here’s the yml-file:

version: „3“
services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      PUID=1000
      PGID=1000
      TZ=Europe/Berlin
      VERSION=docker
    volumes:
      – /srv/dev-disk-by-uuid-5802bb05-8f91-48c7-9d69-40141b872005/Appdata/plex:/config
      – /srv/dev-disk-by-uuid-483521cf-03df-48cf-9194-98888ffb2214/Media/Video:/Filme:ro
    restart: unless-stopped

I found similar topics, but there were errors in the yml-file like missing spaces etc. - but I cannot find any errors here, the file passes correctly in YAML-Checkers…?

Any help is highly appreciated

Looks like you copied the yaml from a Word document. Even the quotation mark is invalid at the top, but the version is completely unnecessary and unused in modern, supported compose. And a yaml can be valid, but if you define a string instead of a list when Docker Compose expects a list, you will get this error message. The dashes are not correct under the volumes section. It is not what you would type on a keyboard. So it is not a valid list

By the way the environment section is wrong too. You should either use a mapping or a list, not a mix of both which is a string.

Valid

    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - VERSION=docker

Valid

    environment:
      PUID: 1000
      PGID: 1000
      TZ: Europe/Berlin
      VERSION: docker

Thank you for your hints - I changed the environment section. But you mentioned that the dashes are not correct under the volumes section - so what would the correct volume-section look like?
This does not work either:
volumes:
/srv/dev-disk-by-uuid-5802bb05-8f91-48c7-9d69-40141b872005/Appdata/plex:/config
/srv/dev-disk-by-uuid-483521cf-03df-48cf-9194-98888ffb2214/Media/Video:/Filme:ro

Just type it normally in a code editor, not in word and it will work. The environment section example shows the right character too.

I will try when I‘m at home- but I didn‘t use Word, I copied the code from the page mentioned in post #1 and pasted it to BBEdit-Editor on my Mac.

Typed it in the Web Editor Windows of Portainer

services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - VERSION=docker
    volumes:
      – /srv/dev-disk-by-uuid-5802bb05-8f91-48c7-9d69-40141b872005/Appdata/plex:/config
      – /srv/dev-disk-by-uuid-483521cf-03df-48cf-9194-98888ffb2214/Media/Video:/Filme:ro
    restart: unless-stopped

Does not work :frowning:
Could you please show me the correct formatting for the volumes section?


This seems like your dashes are not the correct character, perhaps – instead of -

Copy paste this:

    volumes:
      - /srv/dev-disk-by-uuid-5802bb05-8f91-48c7-9d69-40141b872005/Appdata/plex:/config
      - /srv/dev-disk-by-uuid-483521cf-03df-48cf-9194-98888ffb2214/Media/Video:/Filme:ro
1 Like

Gosh - that’s it - thank you very much! Sometimes one’s blind… :sweat_smile:

Don’t copy from webpages either when there is no code block, or if you do and you see a problem, type everything manually. The blog post shows the code in a terrible way. The blog engine probably automatically formatted it as a normal text changing characters, not as code. That’s why I recommended typing typing manually. The character you used is a special character. It is usually inserted by pressing multiple keys on the keyboard if available.The default is the shorter one.

It was the same kind of list with the same correct character.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.