# First-run on headless server with container using macvlan networking

**URL:** <https://forums.plex.tv/t/first-run-on-headless-server-with-container-using-macvlan-networking/898379>\
**Category:** Plex Media Server\
**Tags:** server-linux, server-docker\
**Created:** [December 9, 2024, 2:01pm UTC](https://forums.plex.tv/t/first-run-on-headless-server-with-container-using-macvlan-networking/898379 "2024-12-09T14:01:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![L1512191](https://avatars.discourse-cdn.com/v4/letter/l/54ee81/32.png) [@L1512191](https://forums.plex.tv/u/L1512191)\
**Post date:** [December 9, 2024, 2:01pm UTC](https://forums.plex.tv/t/first-run-on-headless-server-with-container-using-macvlan-networking/898379/1 "2024-12-09T14:01:04Z")

</div>

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

 ![image](https://global.discourse-cdn.com/plex/original/4X/f/6/f/f6f6fd5faac49d7a2ddf82e2c38a15344f8695c8.png)

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](http://localhost:32400/web) I get `ERR_CONNECTION_RESET` in my browser, and the below message in the SSH terminal running the port forwarding.

```auto
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](http://10.0.0.26:32400/web) from any computer on the network just fine.  
.

Network created with:

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

```

.

Container deployed with:

```auto
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.

---

<div class="post-metadata">

**Author:** ![pl\_5309](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pl\_5309](https://forums.plex.tv/u/pl_5309)\
**Post date:** [December 9, 2024, 3:22pm UTC](https://forums.plex.tv/t/first-run-on-headless-server-with-container-using-macvlan-networking/898379/2 "2024-12-09T15:22:36Z")

</div>

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/](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/)

---

<div class="post-metadata">

**Author:** ![pshanew](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pshanew/32/160555_2.png) [@pshanew](https://forums.plex.tv/u/pshanew)\
**Post date:** [December 9, 2024, 5:29pm UTC](https://forums.plex.tv/t/first-run-on-headless-server-with-container-using-macvlan-networking/898379/3 "2024-12-09T17:29:24Z")

</div>

There’s an example of how to establish the tunnel correctly in this support article:  
[https://support.plex.tv/articles/200288586-installation/#toc-2](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](http://127.0.0.1:8888/web) (on the same system where you ran the above command).

---

<div class="post-metadata">

**Author:** ![L1512191](https://avatars.discourse-cdn.com/v4/letter/l/54ee81/32.png) [@L1512191](https://forums.plex.tv/u/L1512191)\
**Post date:** [December 10, 2024, 12:56pm UTC](https://forums.plex.tv/t/first-run-on-headless-server-with-container-using-macvlan-networking/898379/4 "2024-12-10T12:56:42Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![pl\_5309](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pl\_5309](https://forums.plex.tv/u/pl_5309)\
**Post date:** [December 10, 2024, 4:58pm UTC](https://forums.plex.tv/t/first-run-on-headless-server-with-container-using-macvlan-networking/898379/5 "2024-12-10T16:58:48Z")

</div>

Plex Pass is tied to the account not the server.

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

---

<div class="post-metadata">

**Author:** ![L1512191](https://avatars.discourse-cdn.com/v4/letter/l/54ee81/32.png) [@L1512191](https://forums.plex.tv/u/L1512191)\
**Post date:** [December 11, 2024, 7:46am UTC](https://forums.plex.tv/t/first-run-on-headless-server-with-container-using-macvlan-networking/898379/6 "2024-12-11T07:46:06Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![pl\_5309](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pl\_5309](https://forums.plex.tv/u/pl_5309)\
**Post date:** [December 11, 2024, 11:44am UTC](https://forums.plex.tv/t/first-run-on-headless-server-with-container-using-macvlan-networking/898379/7 "2024-12-11T11:44:51Z")

</div>

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](https://plex.tv/claim) .

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [March 11, 2025, 11:45am UTC](https://forums.plex.tv/t/first-run-on-headless-server-with-container-using-macvlan-networking/898379/8 "2025-03-11T11:45:07Z")

</div>

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