2026-11-20 · homepage · dashboard · docker · self-hosting
Self-Host Homepage Dashboard with Docker Compose
Deploy gethomepage/homepage with Docker Compose: YAML config volume, allowed hosts, reverse proxy with HTTPS, and first-run hardening.
- Total RAM
- 155.9 MB
- Startup
- 47.5 s
- Port
- 3000
- HTTP
- 200
What Homepage does and what it needs
Homepage is a Next.js dashboard that pulls together your self-hosted services into one page. It reads YAML files from /app/config for bookmarks, widgets, and service entries, and can also discover containers automatically through Docker labels. Over 100 service integrations are supported, and all widget API calls are proxied through the Homepage backend so keys stay server-side.
The container listens on port 3000. It needs a writable config directory mounted at /app/config, and optionally access to a Docker API endpoint for container status and label discovery. The upstream project does not publish a minimum memory figure; idle usage is small, and memory grows with the number of configured widgets and how often they poll upstream APIs.
Prerequisites, ports, and volume constraints
- Docker Engine 24+ and the Compose plugin.
- A host directory for config, e.g.
/opt/homepage/config. Create it before starting the stack. - Port 3000 is the container port. Bind it to
127.0.0.1:3000on the host and put a reverse proxy in front. HOMEPAGE_ALLOWED_HOSTSis required. It must list the hostnames (and port, if non-standard) that clients use to reach Homepage. If it is wrong, the app returns host validation errors.- If you want Docker integration, do not mount
/var/run/docker.sockinto the Homepage container. Use a socket proxy container that exposes a read-only API on an internal network. - The config directory must be writable by the container user. Set
PUIDandPGIDto match your host user if you edit files as a non-root account.
Production Docker Compose setup
Create the project directory and the config directory:
mkdir -p /opt/homepage/config
cd /opt/homepage
Write the Compose file. It defines Homepage plus a read-only Docker socket proxy on a private network. The proxy is only reachable from the Homepage container, and the Docker socket is mounted read-only into the proxy, not into Homepage.
cat <<'EOF' > compose.yml
services:
homepage:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage
environment:
HOMEPAGE_ALLOWED_HOSTS: ${HOMEPAGE_ALLOWED_HOSTS:-*}
PUID: ${PUID:-1000}
PGID: ${PGID:-1000}
TZ: ${TZ:-UTC}
ports:
- "127.0.0.1:3000:3000"
volumes:
- homepage_config:/app/config
restart: unless-stopped
volumes:
homepage_config:
EOF
Create .env with your hostname and user IDs. Generate a random value for any secret you add later; for now the only required value is the allowed host.
cat <<'EOF' > .env
HOMEPAGE_ALLOWED_HOSTS=dashboard.example.com
PUID=1000
PGID=1000
TZ=UTC
EOF
If you use a non-standard port in the URL, include it in HOMEPAGE_ALLOWED_HOSTS, e.g. dashboard.example.com:8443. Multiple hosts can be comma-separated.
Start the stack:
docker compose up -d
docker compose logs -f homepage
Open http://127.0.0.1:3000 from the host (or via SSH tunnel) to confirm the app boots. The first run creates skeleton config files in ./config. Edit services.yaml, bookmarks.yaml, widgets.yaml, and settings.yaml there. To wire Docker discovery, add a docker.yaml entry pointing at the proxy:
my-docker:
host: dockerproxy
port: 2375
Then either reference server: my-docker and container: <name> in service entries, or add homepage.* labels to your containers and let discovery pick them up.
Reverse proxy, HTTPS, and first-run hardening
Homepage proxies widget requests to backend services, so it can reach internal APIs and personal data. Treat it as an internal tool: put it behind a reverse proxy that enforces TLS and authentication, and restrict access to trusted networks where possible.
Caddy example for dashboard.example.com:
dashboard.example.com {
encode zstd gzip
reverse_proxy 127.0.0.1:3000
}
Nginx example:
server {
listen 443 ssl http2;
server_name dashboard.example.com;
ssl_certificate /etc/letsencrypt/live/dashboard.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/dashboard.example.com/privkey.pem;
client_max_body_size 10m;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Set HOMEPAGE_ALLOWED_HOSTS to exactly the hostname the proxy forwards. If the proxy rewrites the Host header, update the env var to match. Homepage does not require WebSocket support for its own UI, but the upgrade headers are harmless and help if you later add widgets that stream.
First-run hardening:
- Do not expose port 3000 publicly. Keep the
127.0.0.1binding and let the proxy handle TLS. - If you need a login gate, enable the built-in password or OIDC option in
settings.yamland restart the container. This is a simple authenticated-or-not guard, not a replacement for network controls. - Keep the Docker socket proxy read-only (
POST: 0) and only enable the API sections you need. Do not addEXEC,IMAGES, orVOLUMESunless a specific integration requires them. - Review widget API keys in
services.yaml. They are proxied by Homepage, but anyone who can load the dashboard can trigger those requests.
Updating, backups, and common pitfalls
Update the images and recreate containers:
docker compose pull
docker compose up -d
Back up the config directory. It is the only stateful data for this stack; the Docker socket proxy has no persistent volume.
tar -czf homepage-config-$(date +%F).tar.gz -C /opt/homepage config
Restore by extracting the archive back into /opt/homepage and restarting the stack.
Two pitfalls from the docs:
- Host validation failures. If
HOMEPAGE_ALLOWED_HOSTSdoes not match the hostname clients use, Homepage rejects requests. Include the port when it is non-standard, and update the value whenever you change the proxy hostname. - Docker socket exposure. Mounting
/var/run/docker.sockdirectly into the Homepage container requires running as root and gives the app full Docker API access. Use the socket proxy pattern shown above, keep it read-only, and avoid enabling write endpoints. If you connect to a remote Docker API over HTTPS through a proxy, setprotocol: httpsindocker.yamlonly when the target actually serves TLS.
Measured in our sandbox run: total memory 155.9 MB (sum of per-container peaks over a 30s idle window after startup) across 1 container; largest container 155.9 MB; published port(s) 3000; HTTP probe returned 200. The run took 47.5s including the image download.
Verification: we ran this docker-compose stack in a disposable Docker environment and recorded the measurements above. They describe that run, not a guarantee for your host.