前言

以下是使用docker的方式部署goedge,由于后台设置较多,仅记录基础的安装过程

安装Docker

shell

curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
Shell

部署主程序

1. 创建目录

shell

mkdir -p /opt/goedge cd /opt/goedge
Shell

2. 创建docker-compose.yaml

注意:这里的API通信端口默认是8001

shell

cat > docker-compose.yaml << 'EOF' networks: goedge: external: false services: mysqld: image: mysql:8 container_name: mysqld environment: - MYSQL_ROOT_PASSWORD=root - MYSQL_USER=edges - MYSQL_PASSWORD=edges - MYSQL_DATABASE=edges networks: - goedge volumes: - ./data/db/mysql:/var/lib/mysql:rw restart: always edge-admin: image: icodex/edge-admin:1.3.3 container_name: edge-admin ports: - 7788:7788/tcp - 8001:8001/tcp networks: - goedge volumes: - ./data/edge-admin/configs:/usr/local/goedge/edge-admin/configs - ./data/edge-api/configs:/usr/local/goedge/edge-admin/edge-api/configs restart: always EOF
Shell

3. 执行命令启动

shell

docker compose up -d
Shell

4. 页面安装方法

  • 打开浏览器,输入服务器 ip+7788 端口号,进入安装界面
  • 节点端口:8002
  • MySQL主机地址:mysqld
  • 数据库名称、用户名、连接密码均为:edges
  • 然后一直下一步就好了
notion image
notion image
安装成功后,接着执行以下操作

屏蔽官方域名

shell

docker exec -it edge-admin /bin/sh -c ' echo "127.0.0.1 goedge.cloud" >> /etc/hosts echo "127.0.0.1 goedge.cn" >> /etc/hosts echo "127.0.0.1 dl.goedge.cloud" >> /etc/hosts echo "127.0.0.1 dl.goedge.cn" >> /etc/hosts echo "127.0.0.1 global.dl.goedge.cloud" >> /etc/hosts echo "127.0.0.1 global.dl.goedge.cn" >> /etc/hosts cat /etc/hosts '
Shell
查看

shell

docker exec -it edge-admin cat /etc/hosts
Shell

开心版激活

📢
依次点击「系统设置」,「商业版本」,「激活」,直接粘贴下方提供的旗舰版注册码即可完成离线激活,终身有效

shell

F4BuVYEKSDWV+I13ISd5NUyBcWOlH0af4/ow9obzYBS3XvYC9IsK86k5UDyyBv9vqJWN2/FQTDbPyuAO0zxYlkLDC0c8rrShs+7PAkqM0O8wBIGknzForgidDZahky5Lo/ZWaPZ1dVFUxmV29ykb0I0b4tv7Q3OtnTylOuzf//MYrlvyw6VJQMGnsttmeHzsNL/r0yDONOEXZoGoLZsuBKnkfXt+qt6bZF+kM1ncbh+sY42BrPTWQ12sXqJS3qHlzU0FFl9lTNzLGYYhq5vi/4sJuPVE50/uLCtslTJdb9zOGR915hnM+jHYsR+jUk0QxOqtreaHpsvNuLkexXbkmA==
Shell

部署加速节点

找几台线路好的机子作为加速节点
📢
注意:放行80和443端口

shell

ufw allow 80/tcp ufw allow 443/tcp
Shell

1. 创建目录

shell

mkdir -p /opt/goedge cd /opt/goedge
Shell

2. 创建docker-compose.yaml

GoEdge管理界面 – 边缘节点 – 找到你所在集群 – 集群节点 – 安装升级 – 自动注册,把endpointsclusterIdsecret三个值记录下来。
📢
注意替换环境变量里相应的值

shell

cat > docker-compose.yaml << 'EOF' services: edge-node: image: icodex/edge-node:1.3.3 container_name: edge-node environment: - ENDPOINTS=http://xxx:8002 - CLUSTERID=xxx - SECRET=xxx network_mode: host cap_add: - NET_ADMIN volumes: - ./data/edge-node/cache:/opt/cache - ./data/edge-node/configs:/usr/local/goedge/edge-node/configs restart: always EOF
Shell
notion image

3. 执行命令启动:

shell

docker compose up -d
Shell
然后你就会在CDN面板看到加速节点了

垃圾爬虫

📢
SEO爬虫排除在外,不放心可以把Googlebot移除

shell

adldxbot adsbot-google applebot admantx alexa facebookexternalhit proximic slurp YandexBot yandex DotBot SemrushBot AhrefsBot BLEXBot YaK MJ12bot MauiBot MegaIndex.ru GPTBot meta-externalagent/1.1 Qwantbot ClaudeBot Amazonbot SearchBot DataForSeoBot Barkrowler GoogleOther Googlebot
Shell
notion image

禁止使用ip访问

notion image
至此,基础安装完结
2025年:网友脚本合集NodePass:一套通用TCP/UDP隧道解决方案
Loading...