<commit_before>[![logo](https://raw.githubusercontent.com/dperson/plex/master/logo.png)](https://plex.tv/)

# Plex

Plex docker container

# What is Plex?

The free Plex Media Server simplifies your life by organizing all of your
personal media, making it beautiful and streaming it to all of your devices.

# How to use this image

This Plex container will initialize the config directory and exit on first run.
When it has completed, edit
`your_config_location/Library/Application Support/Plex Media Server/Preferences.xml`
to add your network to the allowed list (IE
`allowedNetworks="192.168.1.0/255.255.255.0"` with your network range).

Restart the docker instance once more and proceed to setup plex at
`http://*ipaddress*:32400/web`.

For more detailed instructions please see the
[plex site](https://support.plex.tv/hc/en-us/articles/200264746-Quick-Start-Step-by-Step).

## Hosting a Plex instance

    sudo docker run -it --name plex -p 32400:32400 -d dperson/plex

OR use local storage:

    sudo docker run -it --name plex -p 32400:32400 \
                -v /path/to/directory:/config \
                -v /path/to/media:/data \
                -d dperson/plex

## Configuration

    sudo docker run -it --rm dperson/plex -h

    Usage: plex.sh [-opt] [command]
    Options (fields in '[]' are optional, '<>' are required):
        -h          This help
        -t ""       Configure timezone
                    possible arg: "[timezone]" - zoneinfo timezone for container

    The 'command' (if provided and valid) will be run instead of plex

ENVIRONMENT VARIABLES (only available with `docker run`)

 * `TZ` - As above, configure the zoneinfo timezone, IE `EST5EDT`
 * `USERID` - Set the UID for the app user
 * `GROUPID` - Set the GID for the app user

## Examples

Any of the commands can be run at creation with `docker run` or later with
`docker exec -it plex.sh` (as of version 1.3 of docker).

### Setting the Timezone

    sudo docker run -it --name plex -p 32400:32400 -d dperson/plex -t EST5EDT

OR using `environment variables`

    sudo docker run -it --name plex -e TZ=EST5EDT -p 32400:32400 -d dperson/plex

Will get you the same settings as

    sudo docker run -it --name plex -p 32400:32400 -d dperson/plex
    sudo docker exec -it plex plex.sh -t EST5EDT ls -AlF /etc/localtime
    sudo docker restart plex

# User Feedback

## Issues

If you have any problems with or questions about this image, please contact me
through a [GitHub issue](https://github.com/dperson/plex/issues).<commit_msg>README.md change recommended startup so that permissions on /run will work<commit_after>[![logo](https://raw.githubusercontent.com/dperson/plex/master/logo.png)](https://plex.tv/)

# Plex

Plex docker container

# What is Plex?

The free Plex Media Server simplifies your life by organizing all of your
personal media, making it beautiful and streaming it to all of your devices.

# How to use this image

This Plex container will initialize the config directory and exit on first run.
When it has completed, edit
`your_config_location/Library/Application Support/Plex Media Server/Preferences.xml`
to add your network to the allowed list (IE
`allowedNetworks="192.168.1.0/255.255.255.0"` with your network range).

Restart the docker instance once more and proceed to setup plex at
`http://*ipaddress*:32400/web`.

For more detailed instructions please see the
[plex site](https://support.plex.tv/hc/en-us/articles/200264746-Quick-Start-Step-by-Step).

## Hosting a Plex instance

    sudo docker run -it --name plex -p 32400:32400 --tmp /run -d dperson/plex

OR use local storage:

    sudo docker run -it --name plex -p 32400:32400 --tmp /run \
                -v /path/to/directory:/config \
                -v /path/to/media:/data \
                -d dperson/plex

## Configuration

    sudo docker run -it --rm dperson/plex -h

    Usage: plex.sh [-opt] [command]
    Options (fields in '[]' are optional, '<>' are required):
        -h          This help
        -t ""       Configure timezone
                    possible arg: "[timezone]" - zoneinfo timezone for container

    The 'command' (if provided and valid) will be run instead of plex

ENVIRONMENT VARIABLES (only available with `docker run`)

 * `TZ` - As above, configure the zoneinfo timezone, IE `EST5EDT`
 * `USERID` - Set the UID for the app user
 * `GROUPID` - Set the GID for the app user

## Examples

Any of the commands can be run at creation with `docker run` or later with
`docker exec -it plex.sh` (as of version 1.3 of docker).

### Setting the Timezone

    sudo docker run -it --name plex -p 32400:32400 --tmp /run -d dperson/plex \
                -t EST5EDT

OR using `environment variables`

    sudo docker run -it --name plex -e TZ=EST5EDT -p 32400:32400 --tmp /run -d \
                dperson/plex

Will get you the same settings as

    sudo docker run -it --name plex -p 32400:32400 --tmp /run -d dperson/plex
    sudo docker exec -it plex plex.sh -t EST5EDT ls -AlF /etc/localtime
    sudo docker restart plex

# User Feedback

## Issues

If you have any problems with or questions about this image, please contact me
through a [GitHub issue](https://github.com/dperson/plex/issues).
{'fraction_non_alphanumeric': 0.09661928543987706, 'fraction_numerical': 0.03380714560122935, 'mean_word_length': 2.885820895522388, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '30827', 'n_tokens_mistral': 1771, 'n_tokens_neox': 1534, 'n_words': 649}