sing-box dashboard web frontend (Next.js)
4.1K
基于 Web 的 sing-box 管理仪表板,提供节点管理、订阅管理、路由规则配置、连接监控和日志查看功能。
预构建镜像,开箱即用。
GitHub 仓库:bonaluo/singbox-dashboard
Docker Hub 可能拉取超时。Docker 启动时添加 --registry-mirror 参数即可:
sudo mkdir -p /etc/docker
echo '{"registry-mirrors":["https://docker.m.daocloud.io","https://docker.1ms.run"]}' \
| sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
或在 docker-compose.yml 中直接使用镜像前缀:
image: docker.m.daocloud.io/bonaluo/singbox-dashboard-backend:latest
也可源码构建:
git clone后运行./build.sh(自带镜像加速)。
| 镜像 | 说明 |
|---|---|
bonaluo/singbox-dashboard-backend | Go 后端 API 服务(端口 9092) |
bonaluo/singbox-dashboard-frontend | Next.js 前端 Web 界面(端口 9000) |
.env 文件DATA_DIR=./data
FRONTEND_PORT=9000
BACKEND_PORT=9092
SINGBOX_MIXED_PORT=2080
SINGBOX_CLASH_PORT=9090
docker-compose.ymlservices:
backend:
image: bonaluo/singbox-dashboard-backend:latest
container_name: singbox-backend
network_mode: bridge
volumes:
- ${DATA_DIR:-./data}:/data
ports:
- "${BACKEND_PORT:-9092}:9092"
- "${SINGBOX_MIXED_PORT:-2080}:2080"
- "${SINGBOX_CLASH_PORT:-9090}:9090"
environment:
- TZ=Asia/Shanghai
- SINGBOX_CONFIG=/data/sing-box-config.json
- CLASH_API=http://127.0.0.1:9090
- DASHBOARD_DATA_DIR=/data
- LISTEN_ADDR=0.0.0.0:${BACKEND_PORT:-9092}
restart: unless-stopped
frontend:
image: bonaluo/singbox-dashboard-frontend:latest
container_name: singbox-frontend
network_mode: bridge
ports:
- "${FRONTEND_PORT:-9000}:9000"
environment:
- HOST=0.0.0.0
- PORT=${FRONTEND_PORT:-9000}
restart: unless-stopped
depends_on:
- backend
docker compose up -d
host 网络模式(仅 Linux/WSL2):创建
docker-compose.host.yml叠加文件,仅写入network_mode: host,然后docker compose -f docker-compose.yml -f docker-compose.host.yml up -d。此时ports映射被忽略(仅 warning),容器端口跟随FRONTEND_PORT/BACKEND_PORT环境变量。
代理端口默认为 socks5://localhost:2080,可在 .env 中修改 SINGBOX_MIXED_PORT。
| 服务 | 地址 |
|---|---|
| 前端仪表板 | http://localhost:9000 |
| 后端 API | http://localhost:9092 |
| sing-box Clash API | http://localhost:9090 |
| 代理端口 | socks5://localhost:2080 |
| 变量 | 默认值 | 说明 |
|---|---|---|
TZ | Asia/Shanghai | 容器时区,Go 日志时间戳以此为准 |
SINGBOX_CONFIG | /data/sing-box-config.json | sing-box 配置文件路径 |
CLASH_API | http://127.0.0.1:9090 | Clash REST API 地址 |
DASHBOARD_DATA_DIR | /data | 数据目录 |
LISTEN_ADDR | 0.0.0.0:9092 | 后端监听地址 |
| 变量 | 默认值 | 说明 |
|---|---|---|
DATA_DIR | ./data | 数据目录 |
FRONTEND_PORT | 9000 | 前端端口 |
BACKEND_PORT | 9092 | 后端 API 端口 |
SINGBOX_MIXED_PORT | 2080 | 代理端口 |
SINGBOX_CLASH_PORT | 9090 | Clash API 端口 |
MIT
Content type
Image
Digest
sha256:9cfed2282…
Size
24.9 MB
Last updated
2 months ago
docker pull bonaluo/singbox-dashboard-frontend