Giter Site home page Giter Site logo

docker-phlex's Introduction

Usage

docker create \
  --name=FlexTV \
  -v <path to data>:/config \
  -e PGID=<gid> -e PUID=<uid>  \
  -e TZ=<timezone> \
  -p 5666:80 -p 5667:443 \
  digitalhigh/phlex

Parameters

By default, Flex TV is set to listen on ports 5666 and 5667 - these can be modified by editing the file /config/

The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side.

  • -v /config - Where Flex TV should store its files
  • -e TZ for timezone setting (optional), uses Linux Default convention - eg Europe/London
  • -e PGID (optional) System GID to run the container as.
  • -e PUID (optional) System UID to run the container as.

Ports

5666 and 5667 are the default ports for Flex TV, but you can map them to whatever you want. 5666 is for http, 5667 for https. If you wanted to map them to 4333 and 4334 instead, creatiion params would be

-p 4333:80 -p 4334:443 \

Setting up the application

Find the web interface at <your-ip>:5666, set apps you wish to use with Phlex via the webui.

For SSL certs, you can create a certificate for your server and place it in /config/keys, replacing the self-signed cert.crt and cert.key files.

Info

  • Shell access whilst the container is running: docker exec -it FlexTV /bin/bash

  • To monitor the logs of the container in realtime: docker logs -f FlexTV

  • container version number

docker inspect -f '{{ index .Config.Labels "build_version" }}' FlexTV

  • image version number

docker inspect -f '{{ index .Config.Labels "build_version" }}' d8ahazard/FlexTV

Versions

  • 21.05.18: Update for V2.
  • 20.03.17: Initial release date.

docker-phlex's People

Contributors

d8ahazard avatar elmoselyee avatar klutchell avatar kylerw avatar seffyroff avatar teejo75 avatar vamaster avatar zackbcom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-phlex's Issues

Any way to not use port 80/443?

I also tried to get this to work in Unraid but keep getting error in my logs. Not sure why it's using port 80 even though I specified to use a different port. https://forums.lime-technology.com/topic/59285-getting-phlex-to-work/

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)

nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)

nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)

nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

Updated docker image

Hello,

First of all, I would like to thank you for the work you do.

I don't want to sounds like I'm demanding or anything similar but I was wondering if you are planning to release an updated docker image based on your latest phlex code.

I've been running the docker image and I think stopped working around August. For some reason the json generated on phlex has an empty playback and media array. I tried pulling the latest version
I tried using the string I used on my instance in the one you are hosting and it does work.

I'm guessing something changed one of hte latest plex updates but I'm haven't been able to find the problem...

best regards,

Nick

Unable to bind listening socket for address '127.0.0.1:9000': Address in use (98)

I've created and run the docker using the following settings:

sudo docker run
--name=phlex
--restart=always
--detach=true
--net=host
-v /docker/containers/phlex/config:/config
-e PGID=1000 -e PUID=1000
-e TZ="America/Los_Angeles"
-p 5666:5666 -p 5667:5667
digitalhigh/phlex

The docker starts without issue, but loading the web UI results in a 502 Bad Gateway error. Docker logs report a stream of the following:

[06-May-2017 19:53:05] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address in use (98)
[06-May-2017 19:53:05] ERROR: FPM initialization failed

It seems this issue is a known issue, but I'm afraid I'm not quite sure how to address it as stated in this bug report:
abiosoft/caddy-docker#6

panic: standard_init_linux.go

I don't even know how to how to begin debugging this:

$ docker volume create --name phlex_data
$ docker run --privileged --name=Phlex --net=host -v phlex_data:/config digitalhigh/phlex
panic: standard_init_linux.go:175: exec user process caused "exec format error" [recovered]
        panic: standard_init_linux.go:175: exec user process caused "exec format error"

goroutine 1 [running, locked to thread]:
panic(0x3360b0, 0x96ec4ec0)
        /usr/local/go/src/runtime/panic.go:481 +0x330
github.com/urfave/cli.HandleAction.func1(0x96e51960)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x328
panic(0x3360b0, 0x96ec4ec0)
        /usr/local/go/src/runtime/panic.go:443 +0x448
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0x96e515e8, 0x96e308e0, 0x96e51670)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x13c
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0x96e56f00, 0x8648cd00, 0x96ec4ec0)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x498
main.glob.func8(0x96e70460, 0x0, 0x0)
        /go/src/github.com/opencontainers/runc/main_unix.go:26 +0x58
reflect.Value.call(0x2eb600, 0x3f2948, 0x13, 0x3648b8, 0x4, 0x96e51920, 0x1, 0x1, 0x0, 0x0, ...)
        /usr/local/go/src/reflect/value.go:435 +0xeb4
reflect.Value.Call(0x2eb600, 0x3f2948, 0x13, 0x96e51920, 0x1, 0x1, 0x0, 0x0, 0x0)
        /usr/local/go/src/reflect/value.go:303 +0x84
github.com/urfave/cli.HandleAction(0x2eb600, 0x3f2948, 0x96e70460, 0x0, 0x0)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x230
github.com/urfave/cli.Command.Run(0x366cd8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3d0d50, 0x51, 0x0, ...)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xcd0
github.com/urfave/cli.(*App).Run(0x96e7e240, 0x96e22070, 0x2, 0x2, 0x0, 0x0)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0x84c
main.main()
        /go/src/github.com/opencontainers/runc/main.go:137 +0xbb4

Nginx Server API Token Reset

Hi,

I'm currently working on integrating this docker container into the Hass.io platform as an add-on, and storing the Phlex folder in persistent storage. After logging in and setting up Phlex, when the docker container is reset, I'm greeted by a fresh log in screen and when I do that, the Phlex API token is changed (causing me to loose voice control) and the Sonarr and Radarr API tokens are not present any longer. Other settings such as public address, etc are saved. Is this desired behaviour or a bug? This also happens in non dockerized form when restarting nginx in Arch Linux.

I should note that running Phlex in Xampp under windows, restarting the server does not result in a fresh log in screen as it does under nginx.

Base URL

I can configure external URL of "example.com/Phlex" in the settings, but it does not respond on that base url of /Phlex, only on example.com/

Any way to correct this?

"Cannot create logs folder"

I started the container (including the pivileged flag). When accessing the web server on port 5666, I get the following message

Cannot create logs folder

Here is the container's log output:

app_1  | Brought to you by linuxserver.io
app_1  | We gratefully accept donations at:
app_1  | https://www.linuxserver.io/donations/
app_1  | -------------------------------------
app_1  | GID/UID
app_1  | -------------------------------------
app_1  | User uid:    911
app_1  | User gid:    911
app_1  | -------------------------------------
app_1  |
app_1  | [cont-init.d] 10-adduser: exited 0.
app_1  | [cont-init.d] 20-config: executing...
app_1  | [cont-init.d] 20-config: exited 0.
app_1  | [cont-init.d] 30-keygen: executing...
app_1  | generating self-signed keys in /config/keys, you can replace these with your own keys if required
app_1  | Generating a 2048 bit RSA private key
app_1  | ............................................................................................................................................................+++
app_1  | .............................................................+++
app_1  | writing new private key to '/config/keys/cert.key'
app_1  | -----
app_1  | Subject Attribute /C has no known NID, skipped
app_1  | [cont-init.d] 30-keygen: exited 0.
app_1  | [cont-init.d] 40-install: executing...
app_1  | Running in privileged mode, setting multicast variables.
app_1  | net.ipv4.conf.eth0.rp_filter = 0
app_1  | ip: either "to" is duplicate, or "224.0.0.0" is garbage
app_1  | No repo found, pulling.
app_1  | Cloning into '/config/www/Phlex'...
app_1  | Updating Phlex.
app_1  | Already up-to-date.
app_1  | [cont-init.d] 40-install: exited 0.
app_1  | [cont-init.d] done.
app_1  | [services.d] starting services
app_1  | [services.d] done.

Would be glad someone could give me a hint what might be wrong. Thanks!

Nas Synology

Hello, this docker image do not works on my synology nas.

it possible to help me ?
thanks

Privileged required

Why is the privileged flag required for the operation of Phlex? Can we address this potential security issue?

Plex+Docker+Overlay network: Wrong URL

When Plex is running under docker with an overlay network, the server URI used to connect is the one for the overlay network, so running Phlex from a container not connected to this network causes the connection to Plex to fail.

From the Plex API, it's getting

<Connection protocol="https" address="192.168.86.45" port="32400" uri="https://192-168-86-45.XXXXXXXXXX.plex.direct:32400" local="1"/>
<Connection protocol="https" address="172.17.0.1" port="32400" uri="https://172-17-0-1.XXXXXXXXXX.plex.direct:32400" local="1"/>
<Connection protocol="https" address="10.42.0.1" port="32400" uri="https://10-42-0-1.XXXXXXXXXX.plex.direct:32400" local="1"/>
<Connection protocol="https" address="XXX.XX.XXX.XXX" port="32400" uri="https://XXX-XX-XXX-XXX.XXXXXXXXXX.plex.direct:32400" local="0"/>

and is picking the 10.42.0.1 one:

URL is: https://10-42-0-1.XXXXXXXXXX.plex.direct:32400?X-Plex-Token=XXXXXXXXXX

The XXX.XX.XXX.XXX is the public IP address, and the 192.168.86.45 is my home network IP. The other two are both for Docker.

I'm not sure how it decides which connection to use, but the one that matches the public IP seems like it would be more reliable.

For clarification, I'm running Phlex on two separate machines for different people and they aren't connected to each via the Docker overlay network. They both connect to the same Plex machine, one through the overlay network and one through the public IP address. The one that connects via the overlay network works with Phlex, the other one doesn't.

Error 22: The requested URL returned error. 400 bad request.

Im getting the above error, when is ask my Google Home to do anything Phlex related.

If i check my logs, i can see the funtion is fired, but nothing happens on the Phlex side.
I currently have Phlex installed on Docker on my Synology NAS and using port 5666 that i have forwarded outside and can access via my phone on my 4g network. I can also successfully link my account from inside Phlex and i get the glorious Nic Cage picture as confirmation.

This is what i see in my log:

[Tue, 13 Mar 2018 17:27:59 +0100] [DEBUG] [api.php] - INCOMING REQUEST!!
[Tue, 13 Mar 2018 17:27:59 +0100] [DEBUG] [api.php] - Using token from GET

My "phlex_error.log.php" file is empty and the above 2 lines is all i see in the main "phlex.log.php" file.

The last 4 characters in my API Key is: 5c16

Cast Plugin Not Found!

I'm running Plex in a docker container in default network mode and expose port 32400.
I'm running Phlex in network mode host and in privileged mode.
I've extracted the Cast.bundle to my Plex server plugin directory and I can see the plugin in my Plex gui.

When I access the Phlex web gui I get the message: "Cast Plugin Not Found!" and no Chromecast is found in the cast device list.

Can't get it to run in privileged mode

I'm trying to get the Docker image to work but http://127.0.0.1:5666/ doesn't work, I'm guessing due to You need to execute this container in privileged mode at least once!. I'm passing the --privileged flag though.

What am I doing wrong?

C:\>docker run --privileged --name=Phlex --net=host digitalhigh/phlex
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
usermod: no changes

-------------------------------------
          _     _ _
         | |___| (_) ___
         | / __| | |/ _ \
         | \__ \ | | (_) |
         |_|___/ |_|\___/
               |_|

Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donations/
-------------------------------------
GID/UID
-------------------------------------
User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
generating self-signed keys in /config/keys, you can replace these with your own keys if required
Generating a 2048 bit RSA private key
...........................................+++
.........................................................................................................+++
writing new private key to '/config/keys/cert.key'
-----
Subject Attribute /C has no known NID, skipped
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 40-install: executing...
ip: RTNETLINK answers: File exists
You need to execute this container in privileged mode at least once!
No repo found, pulling.
Cloning into '/config/www/Phlex'...
Updating Phlex.
Already up-to-date.
[cont-init.d] 40-install: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

PHP Socket module not enabled

Error:

[22-Mar-2017 12:20:07 America/Chicago] PHP Fatal error: Uncaught Error: Call to undefined function socket_create() in /config/www/Phlex/cast/mdns.php:16
Stack trace:
#0 /config/www/Phlex/cast/Chromecast.php(54): mDNS->__construct()
#1 /config/www/Phlex/api.php(1463): Chromecast::scan()
#2 /config/www/Phlex/api.php(1437): fetchCastDevices()
#3 /config/www/Phlex/api.php(400): fetchDevices('clients')
#4 /config/www/Phlex/api.php(213): setSessionVariables()
#5 {main}
thrown in /config/www/Phlex/cast/mdns.php on line 16

Unable to Recognize Plex Server on same Host

I am attempting to run this in Unraid on the same Unraid server as my Plex server.

Unraid Server 6.4: 10.10.10.210 (this version has support for setting alternate IP Addresses for each container)
Plex docker container: 10.10.10.210
Phlex docker container 10.10.10.211

Symptom: Phlex is unable to see the 10.10.10.210 Plex server.

I was previously using an Ubuntu VM on that same Unraid server to host Phlex, ip of 10.10.10.113, and it worked correctly, but something about the alternative IP in docker is causing this to not work correctly.

Any thoughts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.