Plex Media Server on Ubuntu 20.04 LTS

This short “guide” starts after a fairly default Ubuntu 20.04 LTS (server/headless) is setup. There are a lot of good guides but all the one’s I looked at missed one step that took me hours to figure out.

Start by adding repo and key for future updates to work with apt.

echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -

Download the latest .deb, check https://plex.tv to get correct url.

wget https://downloads.plex.tv/plex-media-server-new/1.26.1.5772-872b93b91/debian/plexmediaserver_1.26.1.5772-872b93b91_amd64.deb

Install the package.

sudo dpkg -i plexmediaserver_1.26.1.5772-872b93b91_amd64.deb

Start the service.

sudo systemctl start plexmediaserver

Now for the part that I spent hours before figuring out.
You need to access the web-UI from the localhost, which is a problem on a headless server. I didn’t find that in any of the guides I looked at.
The solution is simple, establish an ssh-tunnel to the server from a Linux-desktop.

On the desktop open a terminal-window and setup the tunnel.

ssh ip_of_server -L 8888:localhost:32400

Open a browser and go to http://localhost:8888/web.
Follow the onscreen setup and your of to the races. After setup is done, you can now access the server and content from anywhere.