init
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# xboard-node — Docker Compose
|
||||
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
git clone -b compose --depth 1 https://github.com/cedar2025/xboard-node.git
|
||||
cd xboard-node
|
||||
# Edit config/config.yml: panel.url, panel.token, panel.node_id
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## Update / logs / stop
|
||||
|
||||
```bash
|
||||
cd compose
|
||||
docker compose pull && docker compose up -d
|
||||
docker compose logs -f
|
||||
docker compose down
|
||||
```
|
||||
|
||||
## Layout
|
||||
|
||||
| Path | Purpose |
|
||||
|------|---------|
|
||||
| `compose.yml` | Service definition |
|
||||
| `config/config.yml.example` | Template (safe to commit) |
|
||||
| `config/config.yml` | Your secrets (**do not commit**; add to `.gitignore` upstream) |
|
||||
| `.env.example` | Optional env overrides |
|
||||
|
||||
## Host network
|
||||
|
||||
`network_mode: host` is set so the node uses the host network stack (same as `docker run --network host`). Free the ports your protocols need.
|
||||
|
||||
## Image
|
||||
|
||||
Default: `ghcr.io/cedar2025/xboard-node:latest`.
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# XrayR-style: ./config on the host is mounted to /etc/xboard-node in the container.
|
||||
# Run all commands from this directory: cd compose && docker compose up -d
|
||||
# See README.md in this folder.
|
||||
|
||||
services:
|
||||
xboard-node:
|
||||
image: ghcr.io/cedar2025/xboard-node:latest
|
||||
container_name: xboard-node
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./config:/etc/xboard-node
|
||||
command: ["-c", "/etc/xboard-node/config.yml"]
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
# Optional: override panel settings without editing config.yml (still need a valid config file to load).
|
||||
# environment:
|
||||
# API_HOST: https://panel.example.com
|
||||
# API_KEY: your-server-token
|
||||
# NODE_ID: "1"
|
||||
# KERNEL_TYPE: singbox
|
||||
@@ -0,0 +1,82 @@
|
||||
# Xboard Node Configuration
|
||||
# Copy this file to config.yml and modify as needed
|
||||
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# MINIMAL CONFIGURATION (Recommended)
|
||||
# Most settings (Node ID, Kernel, TLS, Rules) can be managed via the Panel.
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
|
||||
# Panel connection settings
|
||||
panel:
|
||||
# Xboard panel URL (required)
|
||||
url: "https://panel.example.com"
|
||||
# Server communication token (required, must match panel settings)
|
||||
token: "your-server-token"
|
||||
# Node ID as configured in the panel
|
||||
node_id: 1
|
||||
|
||||
# Kernel settings (optional defaults)
|
||||
kernel:
|
||||
# Kernel type: "singbox" (default) or "xray"
|
||||
type: "singbox"
|
||||
# Directory to store generated configs (default: /etc/xboard-node)
|
||||
config_dir: "/etc/xboard-node"
|
||||
# Kernel log level: debug/info/warn/error (default: warn, can be overridden by panel)
|
||||
log_level: "warn"
|
||||
|
||||
# TLS certificate settings (optional, can be managed by panel)
|
||||
# cert_mode: "http" | "dns" | "self" | "file" | "none"
|
||||
# http - ACME HTTP-01 challenge (requires port 80 open to internet)
|
||||
# dns - ACME DNS-01 challenge (supports wildcard certs, requires dns_provider)
|
||||
# self - self-signed certificate (valid 10 years, no external dependency)
|
||||
# file - manually specify cert_file / key_file
|
||||
# none - no TLS (default)
|
||||
cert:
|
||||
cert_mode: "none"
|
||||
# Domain for ACME or self-signed cert
|
||||
# domain: "node.example.com"
|
||||
# Email for ACME registration
|
||||
# email: "admin@example.com"
|
||||
|
||||
# ── HTTP-01 mode ──
|
||||
# http_port: 80 # local port for ACME challenge (default: 80)
|
||||
|
||||
# ── DNS-01 mode ──
|
||||
# dns_provider: "cloudflare" # supported: cloudflare, alidns
|
||||
# dns_env: # provider-specific credentials
|
||||
# CF_API_TOKEN: "your-cloudflare-api-token"
|
||||
|
||||
# ── File mode ──
|
||||
# cert_file: "/etc/ssl/certs/cert.pem"
|
||||
# key_file: "/etc/ssl/private/key.pem"
|
||||
|
||||
# Storage directory for auto certs (default: {config_dir}/certs)
|
||||
# cert_dir: "/etc/xboard-node/certs"
|
||||
|
||||
# Logging settings
|
||||
log:
|
||||
# Node log level: debug/info/warn/error (default: info)
|
||||
level: "info"
|
||||
# Log output: stdout/stderr or file path (default: stdout)
|
||||
output: "stdout"
|
||||
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# ADVANCED / MULTI-NODE MODE
|
||||
# Run multiple nodes with one configuration file.
|
||||
# Each node gets its own isolated working directory.
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# When `nodes:` is present, the top-level `panel.node_id` is ignored.
|
||||
#
|
||||
# nodes:
|
||||
# - node_id: 1
|
||||
#
|
||||
# - node_id: 2
|
||||
# # Optional overrides per node
|
||||
# kernel_type: "xray"
|
||||
# cert:
|
||||
# auto_tls: true
|
||||
# domain: "node2.example.com"
|
||||
#
|
||||
# - node_id: 3
|
||||
# kernel:
|
||||
# config_dir: "/etc/xboard-node/custom-node-3"
|
||||
Reference in New Issue
Block a user