First-run on headless server with container using macvlan networking

Is there any way to do this using macvlan instead of host networking?

I’m setting up a headless server using a physical machine running Debian 12 with the minimum amout of packages (base system + SSH server).

I’ve installed Docker, set up the macvlan network and deployed the plex container successfully.

I’ve also opened up a new ssh connection using ssh username@10.0.0.25 -L 32400:10.0.0.25:32400 -N

But when I try to open http://localhost:32400/web I get ERR_CONNECTION_RESET in my browser, and the below message in the SSH terminal running the port forwarding.

channel 2: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused

Is there anything I have missed or is it simply not possible?

Some more info:

  • I can ping the container on IP 10.0.0.26 from any computer on the network just fine.
  • I can browse to http://10.0.0.26:32400/web from any computer on the network just fine.
    .

Network created with:

docker network create -d macvlan \
  --subnet=10.0.0.0/24 \
  --gateway=10.0.0.1 \
  -o parent=eth0 macvlan-net

.

Container deployed with:

docker run \
 -d \
 --name plex \
 --network=macvlan-net \
 --ip=10.0.0.26 \
 -e TZ="Where I am" \
 -h PLEXdocker \
 -v /etc/plex/config:/config \
 -v /etc/plex/transcode:/transcode \
 -v /etc/plex/data:/data \
 plexinc/pms-docker

.

I have also tried to add -p 8080:32400 to the deploy configuration and adjused to ssh username@10.0.0.25 -L 8080:10.0.0.25:8080 -N (and the URL) just to see if I can work around it, but to no use.

You tunnel a local port from your pc to the server, not the server to itself.

Be easier to add this to your docker cli file:
-e PLEX_CLAIM= \

https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

1 Like

There’s an example of how to establish the tunnel correctly in this support article:
https://support.plex.tv/articles/200288586-installation/#toc-2

In short, run:
ssh -L 8888:127.0.0.1:32400 ip.address.of.server

And then access the server’s web app by browsing to http://127.0.0.1:8888/web (on the same system where you ran the above command).

@pl_5309 This is my first try at Plex, so I’m not a subscriber yet. I just want it to be future-proof so I can add it later without having to redo the whole setup. That is why I can’t add the Claim Token at this time.

@pshanew This yields the same result as my previous attempts, and I’ve tried with SSH in Windows Terminal and in Putty but it makes no difference.

Plex Pass is tied to the account not the server.

If this is a Hetzner server you can stop trying, it won’t work.

@pl_5309 I have no idea of what a Hetzner server is, so I doubt it… This is just a regular desktop computer where I have installed Debian as the base OS and Docker to deploy a Plex container.

I get that Plex Pass is tied to the account. But I have not purchased Plex Pass yet, as I have never used Plex before, so I will need to test it first and see if I like ut enough to spend the money. And with no active Plex Pass, I assume there is no Claim Token to retrive either.

To use the forum you created an account. Servers and if you choose later a Plex Pass get associated to this account. To get the claim token to your account whether you have a Plex Pass or not, use the browser that is logged into Plex forums and on a new tab enter https://plex.tv/claim .

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