Docker and Emby on Ubuntu Server LTS
2025/06/30
Posted Tag: #Linux
Other Tags: #Windows, #Personal, #All
I use Ubuntu Server LTS for data storage, Docker containers and visualization. I have written about the data storage so now Docker containers. I use Emby Server in a Docker container to manage all my videos and music on the servers. Mainly because if one of my servers crashes or for other reason where I need to reinstall Ubuntu Server LTS I can easily restore Emby Server. The following is preformed on the server.
Installing Docker
sudo su
cd /
apt install ca-certificates curl gnupg
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
systemctl enable --now docker.service
systemctl status docker.service - to check it is running
CTRL + C
exit - exit root
We are setting the user server
as a Docker user.
sudo usermod -aG docker ${USER}
sudo su - ${USER}
docker info
Client: Docker Engine - Community
Version: 28.3.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.25.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.37.3
Path: /usr/libexec/docker/cli-plugins/docker-compose
That is a little of what you get but it means docker is available for the current user being server
.
Installing Docker Compose
sudo curl -SL https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose version
Docker Compose version v2.20.3 - This what you get
Emby Server Container
Do this in a notepad type editor on Windows or Linux.
version: "3.8"
services:
emby:
image: emby/embyserver
container_name: emby
environment:
PUID: '1000'
PGID: '1000'
TZ: 'America/New_York'
volumes:
- "/tank/config/emby:/config"
- "/dozer/media/tv:/data/tvshows"
- "/tank/media/movies:/data/movies"
- "/dozer/media/music:/data/music"
ports:
- "8096:8096"
restart: always
The spacing and everything is important and save it as docker-compose.yml.
I do not concern myself with updates because it can be done in the Emby HTML interface. The next thing to do is get the docker-compose.yml
file where I like to put it on the servers.
On the server we need to create some directories.
cd ~
mkdir -p ~/bin/docker/
First open terminal in Windows or a Bash window in Linux in the directory where the docker-compose.yml
is. In Windows or Linux the commands are the same.
scp docker-compose.yml [email protected]:~/bin/docker/
Using your server IP address.
Connect to the server again and type this to start Emby and then it will start whenever the server boots. The -d
starts it in the background.
docker-compose -f ~/bin/docker/docker-compose.yml up -d
Setup Emby at http://192.168.00.00:8096 with your server IP address.
Some information about Emby. Emby is free unless to use Emby Theater or if you have a TV tuner like a HD Homerun on your network and want TV scheduling. Either will cost you $4.95 a month.