1Panel-dev / 1Panel-dev/1Panel

[Bug] Incorrect Docker container configuration for Homepage

Open
#13,514 2 comments 0 reactions 1 assignee View on GitHub

@wanghe-fit2cloud is already working on this.

Since Aug 8, 2026.

type: app-store
Dominant language
Go
Stars
37k
Forks
3.4k
Avg merge
9h 16m
Merged PRs (30d)
105

Description

Contact Information

No response

1Panel Version

v2.1.13

Problem Description

當使用預設版homepage compose檔案時, 會因為權限問題讓程序無法調用/var/run/docker.sock
以下為程序log報錯:

[2026-08-08T20:24:06.588Z] error: <service-helpers> Error getting services from Docker server 'docker': Error: connect EACCES /var/run/docker.sock
    at ignore-listed frames {
  errno: -13,
  code: 'EACCES',
  syscall: 'connect',
  address: '/var/run/docker.sock'
}

解決方式為移除compose中puid及pgid欄位, 並且將docker.sock改為唯獨確保宿主機安全性

原版:

networks:
    1panel-network:
        external: true
services:
    homepage:
        container_name: ${CONTAINER_NAME}
        deploy:
            resources:
                limits:
                    cpus: ${CPUS}
                    memory: ${MEMORY_LIMIT}
        environment:
            - PUID=1000
            - PGID=1000
            - HOMEPAGE_ALLOWED_HOSTS=${HOMEPAGE_ALLOWED_HOSTS}
            - TZ=${TIME_ZONE}
        image: ghcr.io/gethomepage/homepage:v1.13.2
        labels:
            createdBy: Apps
        networks:
            - 1panel-network
        ports:
            - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:3000
        restart: always
        volumes:
            - ./config:/app/config
            - /var/run/docker.sock:/var/run/docker.sock

調整過後:

networks:
    1panel-network:
        external: true
services:
    homepage:
        container_name: ${CONTAINER_NAME}
        deploy:
            resources:
                limits:
                    cpus: ${CPUS}
                    memory: ${MEMORY_LIMIT}
        environment:
            - HOMEPAGE_ALLOWED_HOSTS=${HOMEPAGE_ALLOWED_HOSTS}
            - TZ=${TIME_ZONE}
        image: ghcr.io/gethomepage/homepage:v1.13.2
        labels:
            createdBy: Apps
        networks:
            - 1panel-network
        ports:
            - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:3000
        restart: always
        volumes:
            - ./config:/app/config
            - /var/run/docker.sock:/var/run/docker.sock:ro
Steps to Reproduce

docker.yaml裡設定為使用sock連接

docker:
  socket: /var/run/docker.sock

在widget.yaml中使用docker連接顯示容器狀態

- services:
    - nginx-proxy-manager:
        icon: nginx-proxy-manager.png
        href: http://debian.home.local:81
        server: docker
        container: 1Panel-nginx-proxy-manager-CvJA

widget右上角會顯示unknown
Image

The expected correct result

widget右上角會顯示running並且會有docker容器狀態
Image

Related log output

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.