This guide outlines the steps to configure Homepage with auto-discovery for a Zotero Docker container. The tecnativa/docker-socket-proxy is utilized to securely access the Docker API, enabling Homepage to detect and display the Zotero container based on its labels.
- Docker and Docker Compose are installed on the system.
- A Zotero instance is operational within a Docker container.
- Familiarity with Docker networks and volumes is assumed.
A dedicated bridge network is established to facilitate communication between Homepage and the docker-socket-proxy.
sudo docker network create homepage-netThe docker-socket-proxy service is set up to provide secure, read-only access to the Docker API.
Docker Compose Configuration for the Proxy
# docker-compose.yaml for docker-socket-proxy
# Purpose: Configures a proxy to securely expose the Docker socket with read-only access
services:
docker-socket-proxy:
image: tecnativa/docker-socket-proxy:latest
container_name: docker-socket-proxy
environment:
- CONTAINERS=1 # Enables read-only access to container info
- POST=0 # Disables POST operations for safety
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 127.0.0.1:<host-port>:2375 # Expose only on localhost; replace <host-port> with desired port
restart: unless-stopped
networks:
- homepage-net
networks:
homepage-net:
external: trueHomepage is configured to leverage the proxy for Docker API access, enabling automatic service discovery of labeled containers.
Docker Compose Configuration for Homepage (docker-composeyaml)
# docker-compose.yaml for homepage
# Purpose: Sets up Homepage to connect to the proxy and display Docker containers
services:
homepage:
image: ghcr.io/gethomepage/homepage:v1.1.1
container_name: homepage
ports:
- <host-port>:3000 # Replace <host-port> with desired external port
volumes:
- <config-path>:/app/config # Replace <config-path> with local config directory
environment:
- LOG_LEVEL=info
- PGID=<group-id> # Replace with desired group ID
- PUID=<user-id> # Replace with desired user ID
- TZ=<timezone> # Replace with desired timezone (e.g., UTC)
- HOMEPAGE_ALLOWED_HOSTS=<allowed-hosts> # Replace with allowed hosts (e.g., localhost:<port>)
restart: unless-stopped
networks:
- homepage-net
networks:
homepage-net:
external: trueHomepage Settings (settings.yaml)
In the Homepage configuration directory (e.g., <config-path>/config/settings.yaml), the following is added:
# settings.yaml for homepage
# Purpose: Configures Homepage to use the Docker proxy for container discovery
providers:
docker:
my-docker:
host: docker-socket-proxy
port: 2375The Zotero container is labeled to allow Homepage to detect and display it automatically.
Docker Compose Configuration for Zotero
# docker-compose.yaml for zotero
# Purpose: Configures the Zotero container with labels for Homepage auto-discovery
services:
zotero:
image: linuxserver/zotero:7.0.15-ls71
container_name: zotero
ports:
- <host-port>:3001 # Replace <host-port> with desired external port
volumes:
- <zotero-config-path>:/config # Replace with local config directory
environment:
- PGID=<group-id> # Replace with desired group ID
- PUID=<user-id> # Replace with desired user ID
- TZ=<timezone> # Replace with desired timezone (e.g., UTC)
- CUSTOM_USER=<username> # Replace with desired username
- PASSWORD=<password> # Replace with desired password
restart: unless-stopped
labels:
- homepage.group=Productivity
- homepage.name=Zotero
- homepage.icon=https://example.com/zotero.png # Replace with desired icon URL
- homepage.href=http://<server-ip>:<port> # Replace with Zotero's external URL
- homepage.description=Zotero is a tool to help collect, organize, annotate, cite, and share research.
networks:
- defaultThe following steps ensure all services are operational and properly configured.
- Start the Services:
- Execute
docker-compose up -dfor thedocker-socket-proxyand Homepage stacks. - Confirm the Zotero container is running.
- Execute
- Verify Network Connectivity:
- Test if Homepage can reach the proxy:
sudo docker exec -it homepage ping -c 3 docker-socket-proxy
- Test if Homepage can reach the proxy:
- Inspect Zotero Labels:
- Verify the labels are correctly applied:
sudo docker inspect zotero | grep homepage
- Verify the labels are correctly applied:
- Restart Homepage:
- Apply any configuration changes:
sudo docker restart homepage
- Apply any configuration changes:
- Check Logs:
- Review logs for errors or confirmation:
sudo docker logs homepage
- Review logs for errors or confirmation:
- Access Homepage:
- Navigate to
http://<server-ip>:<homepage-port>in a browser (replace with actual server IP and port). - Check for Zotero under the "Productivity" group.
- Navigate to
- Zotero Not Appearing:
- Confirm labels are accurate and present using docker inspect zotero.
- Examine Homepage logs for Docker API-related errors.
- Network Issues:
- Verify homepage-net includes both Homepage and the proxy with docker network inspect homepage-net.
- Proxy Warnings:
- Disregard HAProxy warnings unless they affect functionality (see Issue #123 as of April 2025).
This configuration enables Homepage to automatically detect and display the Zotero container using Docker labels. For persistent issues, consult the troubleshooting steps above.