百元不到,超低功耗搭建ARM(x86通用) Linux All in Docker服务器

软路由Openwrt,DNS解析Adguardhome,导航页Homepage,智能家居Homeassistant,BT下载Aria2,音乐服务器Navidrome,网页文件管理FileBrowser,Docker管理Portainer,内网网页测速LibreSpeed

机顶盒刷机包:https://github.com/ophub/amlogic-s9xxx-armbian

格式化和挂载USB硬盘
fdisk -l
fdisk /dev/sda
mkdir /mnt/usbdisk
nano /etc/rc.local
mount  /dev/sda1   /mnt/usbdisk
chmod +x /etc/rc.local
图片[1]-百元不到,超低功耗搭建ARM(x86通用) Linux All in Docker服务器-小陈折腾日记
安装docker
apt update
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
systemctl enable docker
安装_Docker管理Portainer
docker run -d -p 9000:9000 -p 9443:9443 --name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /home/docker/portainer_data:/data \
portainer/portainer-ce:latest
安装Openwrt
docker network create -d macvlan --subnet=192.168.3.0/24 --gateway=192.168.3.1 -o parent=eth0 macnet

docker run -d --name=openwrt --network=macnet --privileged=true --restart=always --ulimit nofile=16384:65536 -v /lib/modules/$(uname -r):/lib/modules/$(uname -r) summary/openwrt-aarch64:mini

vi /etc/config/network

vi /etc/config/uhttpd
安装_网页文件管理FileBrowser
docker run \
    -v /mnt/usbdisk:/srv \
    -v /home/docker/filebrowser/database:/database \
    -v /home/docker/filebrowser/config:/config \
    -e PUID=0 \
    -e PGID=0 \
    -p 8080:80 \
    filebrowser/filebrowser:s6
安装_DNS解析Adguardhome
docker run -d --name adguardhome -v /home/docker/adguardhome/data:/opt/adguard/data -v /home/docker/adguardhome/conf:/opt/adguard/conf --net=host adguard/adguardhome:latest

nano /etc/dnsmasq.conf
安装_Bt下载器Aria2

docker run -d --name ariang --log-opt max-size=1m --restart unless-stopped   --net=host p3terx/ariang

 docker run -d --name aria2 --restart unless-stopped --log-opt max-size=1m -e PUID=0 -e PGID=0 -e UMASK_SET=022 -e RPC_SECRET=admin -e RPC_PORT=6800 -e LISTEN_PORT=53359 --net=host -v /home/docker/aria2/config:/config -v /mnt/usbdisk/downloads:/downloads p3terx/aria2-pro
安装_智能家居管理Homeassistant
docker run -d \
  --name homeassistant \
  --restart=unless-stopped \
  -e TZ=Asia/Shanghai \
  -v /home/docker/homeassistant:/config \
  --network=host \
  homeassistant/home-assistant:latest
安装_音乐服务器Navidrome
docker run -d \
   --name navidrome \
   --restart=unless-stopped \
   -v /mnt/usbdisk:/music \
   -v /home/docker/navidrome:/data \
   -p 4533:4533 \
   -e ND_LOGLEVEL=info \
   deluan/navidrome:latest


https://miniwebtool.com/zh-cn/md5-hash-generator/
安装_内网网页测速LibreSpeed
docker run -d --name speedtest -e WEBPORT=5555 --network=host ghcr.io/librespeed/speedtest:latest
安装_导航页Homepage
docker run --name homepage  -e PUID=0 -e PGID=0   -p 80:3000  -v /home/docker/homepage:/app/config   -v /var/run/docker.sock:/var/run/docker.sock:ro  --restart unless-stopped ghcr.io/gethomepage/homepage:latest

- Docker:
    - Openwrt:
        icon: openwrt.png
        href: http://192.168.28.200
    - Librespeed:
        icon: librespeed.png
        href: http://192.168.28.201:5555
    - filebrowser:
        icon: filebrowser.png
        href: http://192.168.28.201:8080
    - AriaNG:
        icon: ariang.png
        href: http://192.168.28.201:6880
    - Portainer:
        icon: portainer.png
        href: http://192.168.28.201:9000
        widget:
          type: portainer
          url: https://192.168.28.201:9443
          env: 2
          key: ptr_yU+dMfG7xfMb7vaZjPYwEbUjgz0m8h6mvft3cn/dmJI=
    - Homeassistant:
        icon: home-assistant-alt.png
        href: http://192.168.28.201:8123
        widget:
          type: homeassistant
          url: http://192.168.28.201:8123
          key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIxODk3N2MzMmIyNmE0MGI3YTc0N2VhNWE4ZTllYmM1ZCIsImlhdCI6MTcyNjg1NDg3OCwiZXhwIjoyMDQyMjE0ODc4fQ.JLmOgGIHXl8ZO_gDU5j94vcTNm3Pzkalgq_f2m2H5d8
    - Adguard Homer:
        icon: adguard-home.png
        href: http://192.168.28.201:3001
        widget:
          type: adguard
          url: http://192.168.28.201:3001
          username: admin
          password: adminadmin
    - Navidrome:
        icon: navidrome.png
        href: http://192.168.28.201:4533
        widget:
          type: navidrome
          url: http://192.168.28.201:4533
          user: xc
          token: fefaf275a5162c97d411c4687a00a38a
          salt: c19b2d
安装SMB
apt install samba

[udisk]
  comment = Media
  public = Yes
  path = /mnt/usbdisk
  browseable = Yes
  read only = No
  guest ok = Yes
  create mask = 0777
  directory mask = 0777
  force user = root

systemctl  status  smbd
systemctl  restart  smbd
docker开机启动报错解决方法
docker ps -a
找到对应容器ID
crontab -e

@reboot sleep 120 && docker restart ID
意思是开机后延迟120秒重启容器
安装qBittorrent
docker run -d \
  --name=qbittorrent \
  -e PUID=0 \
  -e PGID=0 \
  -e TZ=Asia/shanghai \
  -e WEBUI_PORT=8088 \
  --net=host \
  -v /home/docker/qbittorrent/config:/config \
  -v /mnt/usbdisk/downloads:/downloads \
  --restart unless-stopped \
  linuxserver/qbittorrent

Navidrome 除了网页界面,还支持各种第三方客户端:

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容