Skip to content

PlexPy on Ubuntu 16.04 LTS

Here’s a no-nonsese install guide for installing PlexPy on Ubuntu 16.04 LTS. I’m assuming you’re root (sudo up!)

# Install git
apt-get install git-core

# Change directory to /opt/ the default location for plexpy
cd /opt/

# Clone PlexPy to /opt/plexpy
git clone

# Create a service account for plexpy
adduser --system --no-create-home plexpy

# Change permissions on the folder for the new service account
chown plexpy:nogroup -R /opt/plexpy

# Create an empty config file (otherwise you see warning messages)
# Updated with suggestions from Doodles2000
mkdir /etc/plexpy
touch /etc/plexpy/config.ini
chown -R plexpy:nogroup /etc/plexpy
touch /etc/default/plexpy
chown plexpy:nogroup /etc/default/plexpy

# Set permissions on the PlexPy service file
chmod +x /opt/plexpy/init-scripts/init.ubuntu

# Link the PlexPy service file to the init (startup/services) folder
ln -s /opt/plexpy/init-scripts/init.ubuntu /etc/init.d/plexpy

# Update the startup/services
update-rc.d plexpy defaults

# Start PlexPy
service plexpy start

Now PlexPy should be running in the background and will start at bootup. Just head over to http://localhost:8181 and configure it to your liking.

Published inTech


  1. Doodles2000 Doodles2000

    Thank you, nice clean and simple instructions.

    Had one small issue – plexpy (v1.4.25) threw the error:

    CP Server Thread-5 : PlexPy Config :: Error writing configuration file: [Errno 2] No such file or directory: ‘/etc/plexpy/config.ini’

    Result – each time plexpy restarts – it reverts back to default settings (the welcome screen)

    For those with similar issue – Answer:
    mkdir /etc/plexpy
    touch /etc/plexpy/config.ini
    chown -R plexpy:nogroup /etc/plexpy

    • Thanks for the report, I added your suggested fix into the script 🙂

  2. Thapipo Thapipo


  3. Red Boll Red Boll

    Thank you for this tutorial!

  4. tont tont

    Thank you

    U R DA MAN!!!!!!

  5. Justin Lucarelli Justin Lucarelli

    Amazing!!! Thank you so much! Great work 😉

    Thank you,

  6. Steph Steph

    PlexPy is already nice. Best would be if you could include PlexRequests(.net) as you will complete your Plex server. Any chance you’ll do that?

  7. Hugo Hugo

    hi. so i tried this and got to the very last statement but i got the following error. Any thoughts?

    root@hostname:/opt# systemctl status plexpy.service
    ● plexpy.service – PlexPy
    Loaded: loaded (/lib/systemd/system/plexpy.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Mon 2016-03-07 14:10:52 EST; 1min 29s ago
    Process: 4150 ExecStart=/opt/plexpy/ –quiet –daemon –nolaunch –config /opt/plex
    py/config.ini –datadir /opt/plexpy (code=exited, status=1/FAILURE)

    Mar 07 14:10:50 hostname systemd[1]: Starting PlexPy…
    Mar 07 14:10:52 hostname[4150]: Cannot write to the data directory: /opt/…..
    Mar 07 14:10:52 hostname systemd[1]: plexpy.service: Control process exited, code=…s=1
    Mar 07 14:10:52 hostname systemd[1]: Failed to start PlexPy.
    Mar 07 14:10:52 hostname systemd[1]: plexpy.service: Unit entered failed state.
    Mar 07 14:10:52 hostname systemd[1]: plexpy.service: Failed with result ‘exit-code’.
    Hint: Some lines were ellipsized, use -l to show in full.

    • Arsur Arsur

      sounds like you messed something up with the folder permissions.

      try chown plexpy:nogroup -R /opt/plexpy

      i used an other username

Leave a Reply

Your email address will not be published. Required fields are marked *