Bookmark

Homepage dashboard in Docker: collect HomeLab services on port 8006

Homepage is a fast, static, customizable dashboard for collecting HomeLab services. The i12bretro tutorial uses Docker, stores configuration under ~/homepage, and mounts the Docker socket so Homepage can discover containers through labels.1

Youtube video player

The original video was checked through YouTube oEmbed and is embedded with the site's existing shortcode/player.2

Install Docker

Log in to the Linux Docker host and run:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# install prerequisites
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
# add docker gpg key
curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
# add docker software repository
sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
# install docker
sudo apt install docker-ce docker-compose containerd.io -y
# enable and start docker service
sudo systemctl enable docker && sudo systemctl start docker
# add the current user to the docker group
sudo usermod -aG docker $USER
# reauthenticate for the new group membership to take effect
su - $USER

Run Homepage

The source first checks the UID/GID, creates the configuration directory, and runs the container. I preserve the source's id $user; if the lowercase variable is not defined in the shell, I stop to inspect it rather than silently changing the source command:

1
2
3
4
5
6
7
# list current uid and gid, note these for later
id $user
# make a homepage directory to mount in the container
mkdir ~/homepage -p
# run the homepage docker image
# replace PUID, GUID with the output of the id $user command above
docker run -d --name=homepage -e PUID=1000 -e PGID=1000 -p 8006:3000 -v ~/homepage:/app/config -v /var/run/docker.sock:/var/run/docker.sock --restart unless-stopped ghcr.io/benphelps/homepage

Open http://DNSorIP:8006. Host port 8006 maps to container port 3000, while the configuration persists in ~/homepage.

Docker socket permissions

Mounting /var/run/docker.sock lets Homepage communicate with the Docker daemon, so it is sensitive access. I keep port 8006 on the management network, do not expose it unauthenticated, and back up ~/homepage before editing YAML. If I only need a static dashboard, I consider omitting the socket and configuring services manually.

Sources


  1. https://i12bretro.github.io/tutorials/0859.html — i12bretro tutorial 0859. Independently edited from the numbered HTML page; paths, UID/GID, ports, and the socket mapping are retained. ↩︎

  2. https://www.youtube.com/watch?v=BzjL3tZ-NQs — Running Homepage Application Dashboard Using Docker — i12bretro ↩︎


0 Bình luận

Góp Ý / Bình Luận / Đánh giá