# Plex Docker Setup Errors

**URL:** https://forums.plex.tv/t/plex-docker-setup-errors/776303
**Category:** Plex Media Server
**Tags:** server-linux, server-docker
**Created:** [February 14, 2022, 5:22am UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303 "2022-02-14T05:22:59Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![tuckjohn37](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tuckjohn37](https://forums.plex.tv/u/tuckjohn37)
#### Post date: [February 14, 2022, 5:22am UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303/1 "2022-02-14T05:22:59Z")

</div>

Hi! Happy long-time plex user here.

I’m trying to transfer my plex installation from running on ubuntu to docker, but I am having trouble getting it to work. (I’m new to docker).

The command to run the docker container:

```auto
sudo docker run \
-d \
--name plex \
--network=host \
-e PUID=1000 \
-e PGID=100 \
-e TZ="US" \
-e VERSION=docker \
-e PLEX_CLAIM="claim-e2Uvctv6yKTcMZSe8Yhs" \
-h BlendedBronze2 \
-v /mnt/FA4606344605F265/plexConfig:/config \
-v /mnt/FA4606344605F265/plexTranscode:/transcode \
-v /mnt/FA4606344605F265/plexMedia:/data \
--restart unless-stopped \
plexinc/pms-docker

```

Running

```auto
sudo docker logs -f plex

```

outputs this repeatedly.

```auto
Starting Plex Media Server.
Error: Unable to set up server: listen: Address in use (N5boost10wrapexceptINS_6system12system_errorEEE)
Stopping Plex Media Server.

```

Other (possibly) relevant info:

- Plex was installed on ubuntu from the application store. I have since uninstalled it using apt-get
- I update the claim code each time via www.plex.tv/claim/
- My media is stored on a separate 4TB hard drive from the ubuntu installation
- I am connecting/controlling my server over SSH/PuTTY

What is the problem, and how can I fix it?

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [February 14, 2022, 7:58am UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303/2 "2022-02-14T07:58:39Z")

</div>

You can only run 1 server instance on the host with `network=host` because both are going to use the same port `32400`.

---

<div class="post-metadata">

### Author: ![tuckjohn37](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tuckjohn37](https://forums.plex.tv/u/tuckjohn37)
#### Post date: [February 14, 2022, 8:01am UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303/3 "2022-02-14T08:01:06Z")

</div>

So, could the non-docker install still be running, even though I uninstalled it(?)  
How could I check for this? I’m still relatively new to Linux.

---

<div class="post-metadata">

### Author: ![tuckjohn37](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tuckjohn37](https://forums.plex.tv/u/tuckjohn37)
#### Post date: [February 14, 2022, 8:54am UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303/4 "2022-02-14T08:54:20Z")

</div>

Running some commands of google, it looks likes there’s still plex running on ubuntu. Could these be the issue?

```auto

tuckjohn@blended-bronze:~$ ps -ax | grep plex
    864 ? Ss 0:00 /bin/bash /snap/plexmediaserver/257/wrapper.sh
   1028 ? S 0:00 /bin/bash /snap/plexmediaserver/257/wrapper.sh
   1164 ? SNl 0:03 Plex Plug-in [com.plexapp.system] /snap/plexmediaserver/257/Resources/Plug-ins-12f6b8c83/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.5.5492-12f6b8c83 /snap/plexmediaserver/257/Resources/Plug-ins-12f6b8c83/System.bundle
   1372 ? Sl 0:00 /snap/plexmediaserver/257/Plex Tuner Service /snap/plexmediaserver/257/Resources/Tuner/Private /snap/plexmediaserver/257/Resources/Tuner/Shared 1.25.5.5492-12f6b8c83 32600
   1431 ? Sl 0:02 Plex Plug-in [com.plexapp.agents.imdb] /snap/plexmediaserver/257/Resources/Plug-ins-12f6b8c83/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.5.5492-12f6b8c83 /snap/plexmediaserver/257/Resources/Plug-ins-12f6b8c83/PlexMovie.bundle
   1920 ? S 0:00 s6-supervise plex
   6533 pts/0 S+ 0:00 grep --color=auto plex

```

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [February 14, 2022, 5:09pm UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303/5 "2022-02-14T17:09:12Z")

</div>

Yes, those would block it.

You need to stop that snap and the apparently hung s6-supervise (docker)

Stop the snap  
Hard kill the processes

---

<div class="post-metadata">

### Author: ![tuckjohn37](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tuckjohn37](https://forums.plex.tv/u/tuckjohn37)
#### Post date: [February 14, 2022, 11:11pm UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303/6 "2022-02-14T23:11:39Z")

</div>

It’s working now! Thanks for your help.

This solved the issue:

```auto
snap list
sudo snap remove plexmediaserver
ps -ax | grep plex
sudo kill -9 [process ids]

```

then

```auto
sudo docker run ...

```

I am getting this in the log now, is this an issue/concern? What does this mean?

```auto
...
Starting Plex Media Server.
Critical: libusb_init failed

```

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [February 14, 2022, 11:22pm UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303/7 "2022-02-14T23:22:58Z")

</div>

ignore lib\_usb unless you have USB tuners you need to access.

---

<div class="post-metadata">

### Author: ![mikedodge04](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedodge04/32/219082_2.png) [@mikedodge04](https://forums.plex.tv/u/mikedodge04)
#### Post date: [February 23, 2022, 9:51pm UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303/8 "2022-02-23T21:51:07Z")

</div>

@ChuckPa I do have a tuner, and im getting the same issue. Do you have any suggestions? I haven’t been able to use my tuner for a few months now and I believe this is the issue.

---

<div class="post-metadata">

### Author: ![sixxnet](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@sixxnet](https://forums.plex.tv/u/sixxnet)
#### Post date: [February 23, 2022, 10:01pm UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303/9 "2022-02-23T22:01:24Z")

</div>

Pass the device to the container when setting up.

eg: --device=/dev/dvb \

---

<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: [May 24, 2022, 10:01pm UTC](https://forums.plex.tv/t/plex-docker-setup-errors/776303/10 "2022-05-24T22:01:27Z")

</div>

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