Trying to install plex in bridge/macvlan mode

Server Version#:1.32.6.7468
Player Version#:1.32.6.7468-07e0d4a7e

Hi,
I have managed to install plex server in docker on ubuntu server 22.04.3 in hosts mode, it works well, but for more practical management with my router i would like to install it in bridge mode. I follow the template in github but it didn’t work.
I want to use 192.168.1.100 (unused) but it always use the IP address of the pc and not the one i want.
the only line that changes the IP in the .yml file is: “environment: ADVERTISE_IP=http://192.168.1.100:32400/”?

You want macvlan not bridge.

https://hub.docker.com/r/plexinc/pms-docker/

I’m lost…
I created a plex_network with :

 sudo docker network create --driver=macvlan --ip-range=192.168.1.100/32 --subnet=192.168.1.0/24 --gateway=192.168.1.1 plex_network

Then make the yml file :

version: '2'
services:
  plex:
    hostname: plex-u-m
    networks:
      plex_network:
        ipv4_address: 192.168.1.100
    container_name: plex-u-m
    image: plexinc/pms-docker
    restart: unless-stopped
    environment:
      - TZ=Europe/Paris  # Remplacez par votre fuseau horaire
    volumes:
      - /home/plex/config:/config
      - /home/plex/temps:/transcode
      - ...
networks:
  plex_network:
    external: true

and the result is a container well created, but inaccessible at 192.168.1.100:32400

What do you think is wrong?

edit :
the command :

docker inspect \
  -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' plex-u-m

give me 192.168.1.100

So it should be good no?

Ok now it kinda works.
I delete all unused network :

docker network prune

Delete local-kv.db from /var/lib/docker/network/files/
Reboot the server.
Create a new macvlan network :

sudo docker network create -d macvlan \
  --subnet=192.168.1.0/24 \
  --ip-range=192.168.1.100/32 \
  --gateway=192.168.1.1 \
  -o parent=enp2s0 plex_macvlan_network

And make a new docker-compose.yml file like this :

version: "3.0"

services:
  plex:
    image: plexinc/pms-docker:latest
    container_name: plex-u-m
    mac_address: 02:42:B1:71:D2:7F
    hostname: plex-u-m
    environment:
      - TZ=Europe/Paris
    volumes:
      - /home/plex/config:/config
      - /home/plex/temps:/transcode
      - etc..
    restart: unless-stopped
    networks:
      plex_macvlan:
        ipv4_address: 192.168.1.100
networks:
  plex_macvlan:
    external: true

And now i have access to the address 192.168.1.100:32400/web, but a problem remain, It use another MAC address, 02:42:C0:A8:01:64 insted of 02:42:B1:71:D2:7F and i don’t know why?

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