├── AppFile ├── .keep ├── FileBrowser.json ├── Jellyfin.json ├── OpenSpeedTest.json ├── PanIndex.json ├── README.md ├── Transmission.json ├── alist.json ├── aliyundrive-webdav.json ├── aria2-pro.json ├── ariang.json ├── clash.json ├── cloudreve.json ├── ddns-go.json ├── fastosdocker.json ├── frpc.json ├── frps.json ├── netdata.json ├── php-nginx.json ├── portainer.json ├── qbittorrent.json ├── qinglong.json ├── ttnode.json └── xrayr.json ├── INSTALL.md ├── Openwrt.md ├── README.md ├── README_skill.md └── script ├── .keep └── casaos.sh /AppFile/.keep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AppFile/FileBrowser.json: -------------------------------------------------------------------------------- 1 | {"host":"","protocol":"http","port_map":"38527","cpu_shares":50,"restart":"always","label":"FileBrowser","position":false,"index":"/","icon":"https://gcore.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/FileBrowser/icon.png","network_model":"bridge","image":"filebrowser/filebrowser:latest","description":"File Browser - Webbased File Browser including sharing functions etc.","origin":"official","ports":[{"container":"80","host":"38527","protocol":"tcp","desc":"","type":0}],"volumes":[{"container":"/srv","host":"/","type":0,"desc":""},{"container":"/db","host":"/DATA/AppData/FileBrowser/db","type":0,"desc":""}],"envs":[{"container":"TZ","host":"Etc/UTC","desc":"","type":0},{"container":"PUID","host":"1000","desc":"","type":0},{"container":"PGID","host":"1000","desc":"","type":0}],"devices":[],"cap_add":[],"cmd":[],"privileged":false,"host_name":"FileBrowser","container_name":"FileBrowser","appstore_id":0,"custom_id":"4b403419-35e3-4e8c-bb87-cd1a4e65105d","enable_upnp":false,"version":"1.0"} -------------------------------------------------------------------------------- /AppFile/Jellyfin.json: -------------------------------------------------------------------------------- 1 | {"host":"","protocol":"http","port_map":"8096","cpu_shares":50,"restart":"always","label":"Jellyfin","position":false,"index":"/","icon":"https://gcore.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Jellyfin/icon.png","network_model":"bridge","image":"linuxserver/jellyfin:latest","description":"Jellyfin enables you to collect, manage, and stream your media. Run the Jellyfin server on your system and gain access to the leading free-software entertainment system, bells and whistles included.","origin":"official","ports":[{"container":"1900","host":"1900","protocol":"tcp","desc":"","type":0},{"container":"7359","host":"7359","protocol":"tcp","desc":"","type":0},{"container":"8096","host":"8096","protocol":"tcp","desc":"","type":0},{"container":"8920","host":"8920","protocol":"tcp","desc":"","type":0}],"volumes":[{"container":"/config","host":"/DATA/AppData/Jellyfin/config","type":0,"desc":""},{"container":"/opt/vc/lib","host":"/opt/vc/lib","type":0,"desc":""},{"container":"/Media","host":"/mnt","type":0,"desc":""}],"envs":[{"container":"TZ","host":"Etc/UTC","desc":"","type":0},{"container":"PUID","host":"1000","desc":"","type":0},{"container":"PGID","host":"1000","desc":"","type":0}],"devices":[],"cap_add":[],"cmd":[],"privileged":false,"host_name":"Jellyfin","container_name":"Jellyfin","appstore_id":0,"custom_id":"2f0f3bf2-aa11-4254-9a36-038edfd91e41","enable_upnp":false,"version":"1.0"} -------------------------------------------------------------------------------- /AppFile/OpenSpeedTest.json: -------------------------------------------------------------------------------- 1 | {"host":"","protocol":"http","port_map":"3000","cpu_shares":50,"restart":"always","label":"OpenSpeedTest","position":false,"index":"/","icon":"https://gcore.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/OpenSpeedTest/icon.png","network_model":"bridge","image":"openspeedtest/latest:latest","description":"An application for launching HTML5 Network Speed Test Server. You can test download & upload speed from any device within your network with a web browser that is IE10 or new.","origin":"official","ports":[{"container":"3000","host":"3000","protocol":"tcp","desc":"","type":0}],"volumes":[],"envs":[],"devices":[],"cap_add":[],"cmd":["/entrypoint.sh"],"privileged":false,"host_name":"OpenSpeedTest","container_name":"OpenSpeedTest","appstore_id":0,"custom_id":"8ad0a11b-afca-4543-b759-3c3ed2a464de","enable_upnp":false,"version":"1.0"} -------------------------------------------------------------------------------- /AppFile/PanIndex.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "5238", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "PanIndex", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://gcore.jsdelivr.net/gh/Cp0204/AppIcon@main/all/panindex.png", 11 | "network_model": "bridge", 12 | "image": "iicm/pan-index:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [ 16 | { 17 | "container": "5238", 18 | "host": "5238", 19 | "protocol": "tcp", 20 | "desc": "", 21 | "type": 0 22 | } 23 | ], 24 | "volumes": [ 25 | { 26 | "container": "/app/data", 27 | "host": "/DATA/AppData/PanIndex", 28 | "type": 0, 29 | "desc": "" 30 | } 31 | ], 32 | "envs": [ 33 | { 34 | "container": "PORT", 35 | "host": "5238", 36 | "desc": "", 37 | "type": 0 38 | } 39 | ], 40 | "devices": [], 41 | "cap_add": [], 42 | "cmd": [ 43 | "/app/PanIndex" 44 | ], 45 | "privileged": false, 46 | "host_name": "PanIndex", 47 | "container_name": "PanIndex", 48 | "custom_id": "6e590033-d119-4563-856e-8be7084ed04f", 49 | "enable_upnp": false, 50 | "version": "1.0" 51 | } -------------------------------------------------------------------------------- /AppFile/README.md: -------------------------------------------------------------------------------- 1 | # CasaOS 一键安装 json 文件 2 | 3 | ### 配置文件规范 4 | 5 | 1. 容器名、大小写遵从镜像官方 Docker CLI 命名。 6 | 2. 程序配置存放在 `/DATA/AppData/APPNAME` 目录。 7 | 3. 重启策略一般为 `unless-stopped` ,按需启用。 8 | 4. 尽可能匹配图标,原则:png透明底、250px以上,推荐使用官网/文档/git主页处logo。 9 | 5. 如有 WebUI 的,配置端口号。 10 | 6. json内容格式化,增强可读性。 11 | 7. 充分结合 CasaOS `/DATA` 目录逻辑:如下载工具类下载目录挂载到 `/DATA/Download` 、媒体目录挂载到 `/DATA/Media` 。 -------------------------------------------------------------------------------- /AppFile/Transmission.json: -------------------------------------------------------------------------------- 1 | {"host":"","protocol":"http","port_map":"9091","cpu_shares":50,"restart":"always","label":"Transmission","position":false,"index":"/","icon":"https://gcore.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Transmission/icon.png","network_model":"bridge","image":"lscr.io/linuxserver/transmission:version-3.00-r5","description":"Transmission is an open source, volunteer-based project. Unlike some BitTorrent clients, Transmission doesn't play games with its users to make money: Transmission doesn't bundle toolbars, pop-up ads, flash ads, twitter tools, or anything else. It doesn't hold some features back for a payware version. Its source code is available for anyone to review. We don't track our users, and our website and forums have no third-party ads or analytics.","origin":"official","ports":[{"container":"51413","host":"51413","protocol":"tcp","desc":"","type":0},{"container":"51413","host":"51413","protocol":"udp","desc":"","type":0},{"container":"9091","host":"9091","protocol":"tcp","desc":"","type":0}],"volumes":[{"container":"/config","host":"/DATA/AppData/Transmission/config","type":0,"desc":""},{"container":"/downloads","host":"/DATA/Downloads","type":0,"desc":""},{"container":"/watch","host":"/DATA/Downloads/watch","type":0,"desc":""}],"envs":[{"container":"PUID","host":"1000","desc":"","type":0},{"container":"PGID","host":"1000","desc":"","type":0},{"container":"TZ","host":"Europe/London","desc":"","type":0},{"container":"TRANSMISSION_WEB_HOME","host":"/transmission-web-control/","desc":"","type":0},{"container":"USER","host":"casaos","desc":"","type":0},{"container":"PASS","host":"casaos","desc":"","type":0},{"container":"PEERPORT","host":"51413","desc":"","type":0}],"devices":[],"cap_add":[],"cmd":[],"privileged":false,"host_name":"Transmission","container_name":"Transmission","appstore_id":0,"custom_id":"70d76154-5972-4730-91a6-4957f30a2bc7","enable_upnp":false,"version":"1.0"} -------------------------------------------------------------------------------- /AppFile/alist.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "5244", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "alist", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://alist.nn.ci/logo.svg", 11 | "network_model": "bridge", 12 | "image": "xhofe/alist:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [ 16 | { 17 | "container": "5244", 18 | "host": "5244", 19 | "protocol": "tcp", 20 | "desc": "", 21 | "type": 0 22 | } 23 | ], 24 | "volumes": [ 25 | { 26 | "container": "/opt/alist/data", 27 | "host": "/DATA/AppData/alist", 28 | "type": 0, 29 | "desc": "" 30 | } 31 | ], 32 | "envs": [], 33 | "devices": [], 34 | "cap_add": [], 35 | "cmd": [ 36 | "./alist", 37 | "server", 38 | "--no-prefix" 39 | ], 40 | "privileged": false, 41 | "host_name": "alist", 42 | "container_name": "alist", 43 | "custom_id": "eded2d76-5e2d-4cd7-b609-9e42ba966886", 44 | "enable_upnp": false, 45 | "version": "1.0" 46 | } -------------------------------------------------------------------------------- /AppFile/aliyundrive-webdav.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "8080", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "aliyundrive-webdav", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://gcore.jsdelivr.net/gh/Cp0204/AppIcon@main/all/aliyundrive-webdav.png", 11 | "network_model": "bridge", 12 | "image": "messense/aliyundrive-webdav:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [ 16 | { 17 | "container": "8080", 18 | "host": "8080", 19 | "protocol": "tcp", 20 | "desc": "", 21 | "type": 0 22 | } 23 | ], 24 | "volumes": [ 25 | { 26 | "container": "/etc/aliyundrive-webdav", 27 | "host": "/DATA/AppData/aliyundrive-webdav", 28 | "type": 0, 29 | "desc": "" 30 | } 31 | ], 32 | "envs": [ 33 | { 34 | "container": "REFRESH_TOKEN", 35 | "host": "yourtoken", 36 | "desc": "", 37 | "type": 0 38 | }, 39 | { 40 | "container": "WEBDAV_AUTH_USER", 41 | "host": "admin", 42 | "desc": "", 43 | "type": 0 44 | }, 45 | { 46 | "container": "WEBDAV_AUTH_PASSWORD", 47 | "host": "admin", 48 | "desc": "", 49 | "type": 0 50 | } 51 | ], 52 | "devices": [], 53 | "cap_add": [], 54 | "cmd": [], 55 | "privileged": false, 56 | "host_name": "aliyundrive-webdav", 57 | "container_name": "aliyundrive-webdav", 58 | "custom_id": "043aea54-5273-4779-83d0-c8ad92fa55e5", 59 | "enable_upnp": false, 60 | "version": "1.0" 61 | } -------------------------------------------------------------------------------- /AppFile/aria2-pro.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "ariang.mayswind.net/latest#", 3 | "protocol": "http", 4 | "port_map": "0", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "aria2-pro", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://gcore.jsdelivr.net/gh/Cp0204/AppIcon@main/all/aria2.png", 11 | "network_model": "host", 12 | "image": "p3terx/aria2-pro:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [], 16 | "volumes": [ 17 | { 18 | "container": "/config", 19 | "host": "/DATA/AppData/aria2-pro/config", 20 | "type": 0, 21 | "desc": "" 22 | }, 23 | { 24 | "container": "/downloads", 25 | "host": "/DATA/Downloads", 26 | "type": 0, 27 | "desc": "" 28 | } 29 | ], 30 | "envs": [ 31 | { 32 | "container": "LISTEN_PORT", 33 | "host": "6888", 34 | "desc": "", 35 | "type": 0 36 | }, 37 | { 38 | "container": "RPC_PORT", 39 | "host": "6800", 40 | "desc": "", 41 | "type": 0 42 | }, 43 | { 44 | "container": "RPC_SECRET", 45 | "host": "12345", 46 | "desc": "", 47 | "type": 0 48 | } 49 | ], 50 | "devices": [], 51 | "cap_add": [], 52 | "cmd": [], 53 | "privileged": false, 54 | "host_name": "aria2-pro", 55 | "container_name": "aria2-pro", 56 | "custom_id": "031b6994-2380-4cea-bbc5-f2a904d0d0ed", 57 | "enable_upnp": false, 58 | "version": "1.0" 59 | } -------------------------------------------------------------------------------- /AppFile/ariang.json: -------------------------------------------------------------------------------- 1 | { 2 | "origin": "custom", 3 | "network_model": "bridge", 4 | "index": "/", 5 | "icon": "https://gcore.jsdelivr.net/gh/IceWhaleTech/AppIcon@main/all/ariang.png", 6 | "image": "p3terx/ariang:latest", 7 | "envs": [], 8 | "ports": [ 9 | { 10 | "container": "6880", 11 | "host": "6880", 12 | "protocol": "tcp", 13 | "desc": "", 14 | "type": 0 15 | } 16 | ], 17 | "volumes": [], 18 | "devices": [], 19 | "port_map": "6880", 20 | "cpu_shares": 10, 21 | "restart": "unless-stopped", 22 | "enable_upnp": false, 23 | "label": "ariang", 24 | "description": "", 25 | "position": true, 26 | "host_name": "", 27 | "privileged": false, 28 | "cap_add": [], 29 | "cmd": [], 30 | "version": "1.0" 31 | } -------------------------------------------------------------------------------- /AppFile/clash.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "clash.razord.top", 3 | "protocol": "http", 4 | "port_map": null, 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "clash", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://gcore.jsdelivr.net/gh/Dreamacro/clash/docs/logo.png", 11 | "network_model": "host", 12 | "image": "dreamacro/clash:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [], 16 | "volumes": [ 17 | { 18 | "container": "/root/.config/clash/config.yaml", 19 | "host": "/DATA/AppData/clash/config.yaml", 20 | "type": 0, 21 | "desc": "" 22 | } 23 | ], 24 | "envs": [], 25 | "devices": [], 26 | "cap_add": [], 27 | "cmd": [], 28 | "privileged": false, 29 | "host_name": "clash", 30 | "container_name": "clash", 31 | "custom_id": "938d99f9-f64b-4980-a14f-590c9e68cfbc", 32 | "enable_upnp": false, 33 | "version": "1.0" 34 | } -------------------------------------------------------------------------------- /AppFile/cloudreve.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "5212", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "cloudreve", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://raw.githubusercontent.com/cloudreve/frontend/master/public/static/img/logo192.png", 11 | "network_model": "bridge", 12 | "image": "cloudreve/cloudreve:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [ 16 | { 17 | "container": "5212", 18 | "host": "5212", 19 | "protocol": "tcp", 20 | "desc": "", 21 | "type": 0 22 | } 23 | ], 24 | "volumes": [ 25 | { 26 | "container": "/cloudreve/cloudreve.db", 27 | "host": "/DATA/AppData/cloudreve/cloudreve.db", 28 | "type": 0, 29 | "desc": "" 30 | }, 31 | { 32 | "container": "/cloudreve/uploads", 33 | "host": "/DATA/AppData/cloudreve/uploads", 34 | "type": 0, 35 | "desc": "" 36 | }, 37 | { 38 | "container": "/data", 39 | "host": "/DATA/AppData/cloudreve/data", 40 | "type": 0, 41 | "desc": "" 42 | }, 43 | { 44 | "container": "/cloudreve/avatar", 45 | "host": "/DATA/AppData/cloudreve/avatar", 46 | "type": 0, 47 | "desc": "" 48 | }, 49 | { 50 | "container": "/cloudreve/conf.ini", 51 | "host": "/DATA/AppData/cloudreve/conf.ini", 52 | "type": 0, 53 | "desc": "" 54 | } 55 | ], 56 | "envs": [], 57 | "devices": [], 58 | "cap_add": [], 59 | "cmd": [], 60 | "privileged": false, 61 | "host_name": "cloudreve", 62 | "container_name": "cloudreve", 63 | "custom_id": "c7010460-23f0-44ef-9ca8-6a02b8083cd9", 64 | "enable_upnp": false, 65 | "version": "1.0" 66 | } -------------------------------------------------------------------------------- /AppFile/ddns-go.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "9876", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "ddns-go", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://gcore.jsdelivr.net/gh/Cp0204/AppIcon@main/all/ddns.png", 11 | "network_model": "host", 12 | "image": "jeessy/ddns-go:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [], 16 | "volumes": [ 17 | { 18 | "container": "/root", 19 | "host": "/DATA/AppData/ddns-go", 20 | "type": 0, 21 | "desc": "" 22 | } 23 | ], 24 | "envs": [], 25 | "devices": [], 26 | "cap_add": [], 27 | "cmd": [ 28 | "-l", 29 | ":9876", 30 | "-f", 31 | "300" 32 | ], 33 | "privileged": false, 34 | "host_name": "ddns-go", 35 | "container_name": "ddns-go", 36 | "custom_id": "593c1aef-8a7b-4c19-a7ed-f5c6fac40acf", 37 | "enable_upnp": false, 38 | "version": "1.0" 39 | } -------------------------------------------------------------------------------- /AppFile/fastosdocker.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "8081", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "fastosdocker", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://gcore.jsdelivr.net/gh/Cp0204/AppIcon@main/all/fastosdocker.png", 11 | "network_model": "bridge", 12 | "image": "wangbinxingkong/fast:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [ 16 | { 17 | "container": "8082", 18 | "host": "8082", 19 | "protocol": "tcp", 20 | "desc": "", 21 | "type": 0 22 | }, 23 | { 24 | "container": "8081", 25 | "host": "8081", 26 | "protocol": "tcp", 27 | "desc": "", 28 | "type": 0 29 | } 30 | ], 31 | "volumes": [ 32 | { 33 | "container": "/etc/docker", 34 | "host": "/etc/docker", 35 | "type": 0, 36 | "desc": "" 37 | }, 38 | { 39 | "container": "/var/run/docker.sock", 40 | "host": "/var/run/docker.sock", 41 | "type": 0, 42 | "desc": "" 43 | } 44 | ], 45 | "envs": [ 46 | { 47 | "container": "TZ", 48 | "host": "Asia/Shanghai", 49 | "desc": "", 50 | "type": 0 51 | } 52 | ], 53 | "devices": [], 54 | "cap_add": [], 55 | "cmd": [ 56 | "/fast/dockercurl" 57 | ], 58 | "privileged": false, 59 | "host_name": "fastosdocker", 60 | "container_name": "fastosdocker", 61 | "custom_id": "82cee80c-ec18-4800-8387-2b1b82e5f3f1", 62 | "enable_upnp": false, 63 | "version": "1.0" 64 | } -------------------------------------------------------------------------------- /AppFile/frpc.json: -------------------------------------------------------------------------------- 1 | {"host":"","protocol":"http","port_map":null,"cpu_shares":90,"restart":"always","label":"frpc","position":false,"index":"","icon":"https://icon.casaos.io/main/all/frpc.png","network_model":"host","image":"snowdreamtech/frpc","description":"","origin":"local","ports":[],"volumes":[{"container":"/etc/frp","host":"/etc/frp","type":0,"desc":""}],"envs":[{"container":"PATH","host":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","desc":"","type":0},{"container":"FRP_VERSION","host":"0.46.1","desc":"","type":0}],"devices":[],"cap_add":[],"cmd":[],"privileged":false,"host_name":"onecloud","container_name":"frpc","appstore_id":0,"custom_id":"a1813244-534a-46de-b87c-17ed6f2a4ec2","enable_upnp":false,"version":"1.0"} -------------------------------------------------------------------------------- /AppFile/frps.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "7500", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "frps", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://gcore.jsdelivr.net/gh/Cp0204/AppIcon@main/all/frps.png", 11 | "network_model": "host", 12 | "image": "snowdreamtech/frps:latest", 13 | "description": "", 14 | "origin": "local", 15 | "ports": [], 16 | "volumes": [ 17 | { 18 | "container": "/etc/frp/frps.ini", 19 | "host": "/DATA/AppData/frp/frps.ini", 20 | "type": 0, 21 | "desc": "" 22 | } 23 | ], 24 | "envs": [], 25 | "devices": [], 26 | "cap_add": [], 27 | "cmd": [], 28 | "privileged": false, 29 | "host_name": "frps", 30 | "container_name": "frps", 31 | "custom_id": "1383b3cd-36c6-4309-80e0-1b6f4b006dc7", 32 | "enable_upnp": false, 33 | "version": "1.0" 34 | } -------------------------------------------------------------------------------- /AppFile/netdata.json: -------------------------------------------------------------------------------- 1 | {"host":"","protocol":"http","port_map":"19999","cpu_shares":90,"restart":"unless-stopped","label":"netdata","position":false,"index":"","icon":"https://icon.casaos.io/main/all/netdata.png","network_model":"bridge","image":"netdata/netdata","description":"","origin":"local","ports":[{"container":"19999","host":"19999","protocol":"tcp","desc":"","type":0}],"volumes":[{"container":"/var/lib/netdata","host":"/var/lib/docker/volumes/netdatalib/_data","type":0,"desc":""},{"container":"/var/cache/netdata","host":"/var/lib/docker/volumes/netdatacache/_data","type":0,"desc":""},{"container":"/host/etc/passwd","host":"/etc/passwd","type":0,"desc":""},{"container":"/host/etc/group","host":"/etc/group","type":0,"desc":""},{"container":"/host/proc","host":"/proc","type":0,"desc":""},{"container":"/host/sys","host":"/sys","type":0,"desc":""},{"container":"/host/etc/os-release","host":"/etc/os-release","type":0,"desc":""},{"container":"/etc/netdata","host":"/var/lib/docker/volumes/netdataconfig/_data","type":0,"desc":""}],"envs":[{"container":"PATH","host":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","desc":"","type":0},{"container":"NETDATA_OFFICIAL_IMAGE","host":"true","desc":"","type":0},{"container":"DOCKER_GRP","host":"netdata","desc":"","type":0},{"container":"DOCKER_USR","host":"netdata","desc":"","type":0},{"container":"NETDATA_LISTENER_PORT","host":"19999","desc":"","type":0}],"devices":[],"cap_add":["SYS_PTRACE"],"cmd":[],"privileged":false,"host_name":"9516cbb43fb8","container_name":"netdata","appstore_id":0,"custom_id":"18652cfc-eaa6-45dc-b0b8-b0d72beccb24","enable_upnp":false,"version":"1.0"} -------------------------------------------------------------------------------- /AppFile/php-nginx.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "8080", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "php-nginx", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://gcore.jsdelivr.net/gh/Cp0204/AppIcon@main/all/nginx.png", 11 | "network_model": "bridge", 12 | "image": "trafex/php-nginx:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [ 16 | { 17 | "container": "8080", 18 | "host": "8080", 19 | "protocol": "tcp", 20 | "desc": "", 21 | "type": 0 22 | } 23 | ], 24 | "volumes": [ 25 | { 26 | "container": "/var/www/html", 27 | "host": "/DATA/AppData/php-nginx", 28 | "type": 0, 29 | "desc": "" 30 | } 31 | ], 32 | "envs": [], 33 | "devices": [], 34 | "cap_add": [], 35 | "cmd": [ 36 | "/usr/bin/supervisord", 37 | "-c", 38 | "/etc/supervisor/conf.d/supervisord.conf" 39 | ], 40 | "privileged": false, 41 | "host_name": "php-nginx", 42 | "container_name": "php-nginx", 43 | "custom_id": "f2ab7b3b-e6af-40a0-ad1d-5769a2bf13f6", 44 | "enable_upnp": false, 45 | "version": "1.0" 46 | } -------------------------------------------------------------------------------- /AppFile/portainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "9000", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "portainer", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://icon.casaos.io/main/all/portainer-ce.png", 11 | "network_model": "bridge", 12 | "image": "portainer/portainer-ce:latest", 13 | "description": "", 14 | "origin": "local", 15 | "ports": [ 16 | { 17 | "container": "8000", 18 | "host": "8000", 19 | "protocol": "tcp", 20 | "desc": "", 21 | "type": 0 22 | }, 23 | { 24 | "container": "9000", 25 | "host": "9000", 26 | "protocol": "tcp", 27 | "desc": "", 28 | "type": 0 29 | }, 30 | { 31 | "container": "9443", 32 | "host": "9443", 33 | "protocol": "tcp", 34 | "desc": "", 35 | "type": 0 36 | } 37 | ], 38 | "volumes": [ 39 | { 40 | "container": "/data", 41 | "host": "/DATA/AppData/portainer", 42 | "type": 0, 43 | "desc": "" 44 | }, 45 | { 46 | "container": "/var/run/docker.sock", 47 | "host": "/var/run/docker.sock", 48 | "type": 0, 49 | "desc": "" 50 | } 51 | ], 52 | "envs": [ 53 | { 54 | "container": "PATH", 55 | "host": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", 56 | "desc": "", 57 | "type": 0 58 | } 59 | ], 60 | "devices": [], 61 | "cap_add": [], 62 | "cmd": [], 63 | "privileged": false, 64 | "host_name": "portainer", 65 | "container_name": "portainer", 66 | "custom_id": "af976e67-62de-4e83-b6dd-e17d609be473", 67 | "enable_upnp": false, 68 | "version": "1.0" 69 | } -------------------------------------------------------------------------------- /AppFile/qbittorrent.json: -------------------------------------------------------------------------------- 1 | {"host":"","protocol":"http","port_map":"8080","cpu_shares":90,"restart":"unless-stopped","label":"qbittorrent","position":false,"index":"","icon":"https://icon.casaos.io/main/all/qbittorrent.png","network_model":"bridge","image":"linuxserver/qbittorrent","description":"","origin":"local","ports":[{"container":"6881","host":"6881","protocol":"tcp","desc":"","type":0},{"container":"6881","host":"6881","protocol":"udp","desc":"","type":0},{"container":"8080","host":"8080","protocol":"tcp","desc":"","type":0}],"volumes":[{"container":"/downloads","host":"/mnt/sdcard/Downloads","type":0,"desc":""},{"container":"/config","host":"/DATA/AppData/qb/config","type":0,"desc":""}],"envs":[{"container":"PUID","host":"1000","desc":"","type":0},{"container":"PGID","host":"1000","desc":"","type":0},{"container":"TZ","host":"Asia/Shanghai","desc":"","type":0},{"container":"WEBUI_PORT","host":"8080","desc":"","type":0},{"container":"PATH","host":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","desc":"","type":0},{"container":"PS1","host":"$(whoami)@$(hostname):$(pwd)\\$ ","desc":"","type":0},{"container":"HOME","host":"/config","desc":"","type":0},{"container":"TERM","host":"xterm","desc":"","type":0},{"container":"S6_CMD_WAIT_FOR_SERVICES_MAXTIME","host":"0","desc":"","type":0},{"container":"S6_VERBOSITY","host":"1","desc":"","type":0},{"container":"S6_STAGE2_HOOK","host":"/docker-mods","desc":"","type":0},{"container":"XDG_CONFIG_HOME","host":"/config","desc":"","type":0},{"container":"XDG_DATA_HOME","host":"/config","desc":"","type":0}],"devices":[],"cap_add":[],"cmd":[],"privileged":false,"host_name":"6bb1db182f83","container_name":"qbittorrent","appstore_id":0,"custom_id":"779d1662-7249-4c5b-89ae-4a7188476c4b","enable_upnp":false,"version":"1.0"} -------------------------------------------------------------------------------- /AppFile/qinglong.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "5700", 5 | "cpu_shares": 50, 6 | "restart": "unless-stopped", 7 | "label": "qinglong", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://icon.casaos.io/main/all/qinglong.png", 11 | "network_model": "bridge", 12 | "image": "whyour/qinglong:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [ 16 | { 17 | "container": "5700", 18 | "host": "5700", 19 | "protocol": "tcp", 20 | "desc": "", 21 | "type": 0 22 | } 23 | ], 24 | "volumes": [ 25 | { 26 | "container": "/ql/data", 27 | "host": "/DATA/AppData/ql", 28 | "type": 0, 29 | "desc": "" 30 | } 31 | ], 32 | "envs": [], 33 | "devices": [], 34 | "cap_add": [], 35 | "cmd": [], 36 | "privileged": false, 37 | "host_name": "qinglong", 38 | "container_name": "qinglong", 39 | "custom_id": "84ec005f-012f-41ed-b7b0-02e94bc827c9", 40 | "enable_upnp": false, 41 | "version": "1.0" 42 | } -------------------------------------------------------------------------------- /AppFile/ttnode.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": "1024", 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "ttnode", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://tiptime.cn/images/home/logo1.png", 11 | "network_model": "host", 12 | "image": "registry.cn-hangzhou.aliyuncs.com/tiptime/ttnode:latest", 13 | "description": "", 14 | "origin": "custom", 15 | "ports": [], 16 | "volumes": [ 17 | { 18 | "container": "/mnt/data/ttnode", 19 | "host": "/media/YourDevice", 20 | "type": 0, 21 | "desc": "" 22 | }, 23 | { 24 | "container": "/var/run/docker.sock", 25 | "host": "/var/run/docker.sock", 26 | "type": 0, 27 | "desc": "" 28 | }, 29 | { 30 | "container": "/host/proc", 31 | "host": "/proc", 32 | "type": 0, 33 | "desc": "" 34 | } 35 | ], 36 | "envs": [], 37 | "devices": [], 38 | "cap_add": [], 39 | "cmd": [], 40 | "privileged": true, 41 | "host_name": "ttnode", 42 | "container_name": "ttnode", 43 | "custom_id": "28387fe6-05c5-448e-8256-289c29ae0e57", 44 | "enable_upnp": false, 45 | "version": "1.0" 46 | } -------------------------------------------------------------------------------- /AppFile/xrayr.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "", 3 | "protocol": "http", 4 | "port_map": null, 5 | "cpu_shares": 10, 6 | "restart": "unless-stopped", 7 | "label": "xrayr", 8 | "position": false, 9 | "index": "", 10 | "icon": "https://gcore.jsdelivr.net/gh/Cp0204/AppIcon@main/all/xrayr.png", 11 | "network_model": "host", 12 | "image": "ghcr.io/xrayr-project/xrayr:latest", 13 | "description": "", 14 | "origin": "local", 15 | "ports": [], 16 | "volumes": [ 17 | { 18 | "container": "/etc/XrayR", 19 | "host": "/DATA/AppData/xrayr", 20 | "type": 0, 21 | "desc": "" 22 | } 23 | ], 24 | "envs": [], 25 | "devices": [], 26 | "cap_add": [], 27 | "cmd": [], 28 | "privileged": false, 29 | "host_name": "xrayr", 30 | "container_name": "xrayr", 31 | "custom_id": "af514245-714e-4472-8b3b-8a73e0057c09", 32 | "enable_upnp": false, 33 | "version": "1.0" 34 | } -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | 基于官方Armbian源码编译。 2 | 感谢hzyitc等开发者为玩客云添加官方源码支持并修复了多项Bug 3 | https://github.com/hzyitc/armbian-onecloud 4 | 5 | 6 | 系统特点:支持HDMI、双USB,默认不安装docker可自行安装只需执行 apt install docker.io 命令即可。 7 | 8 | 刷入方法:解压固件包,电脑连接玩客云靠近hdmi的USB口,短接刷机触点或者按住复位键的同时给玩客云通电,即可使用Aml Burn Tool软件直接烧录固件至玩客云。 9 | 初始账号密码 root 1234 10 | 11 | (特别注意:USB Burning Tool 请使用2.1.6.8版本,其他版本可能出现超时等报错) 12 | 13 | 14 | 刷机包下载地址:https://github.com/hzyitc/armbian-onecloud/releases 注意后缀带Burn的才是直刷包,其他都是USB启动包。 15 | 16 | Ubuntu22.04(jammy) 17 | Debian12(bookworm) 18 | 19 | -------------------------------------------------------------------------------- /Openwrt.md: -------------------------------------------------------------------------------- 1 | 🟦安装 Armbian 后 2 | 3 | 🔵更新软件(非必要) 4 | 5 | apt-get update && apt-get upgrade 6 | 7 | 🔵安装 Docker 8 | 9 | apt install docker.io 10 | 11 | 🔵打开网卡混杂模式 12 | 13 | ip link set eth0 promisc on 14 | 15 | 🔵创建网络 16 | 17 | docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=eth0 macnet 18 | 19 | 🔘[↑自己根据 玩客云 所在网段修改,如:玩客云IP:192.168.2.175,则192.168.1.0/24 改成 192.168.2.0/24,192.168.1.1改成主路由地址] 20 | 21 | 🔵拉取 OpenWRT 镜像 22 | 23 | docker pull xuanaimai/onecloud:21-09-15 24 | 25 | 🔵创建容器 26 | 27 | docker run -itd --name=OneCloud --restart=always --network=macnet --privileged=true xuanaimai/onecloud:21-09-15 /sbin/init 28 | 29 | 🔘--name=OneCloud 其中OneCloud是容器名称,可以更改成你想要的,容器名称注意不要和其他容器一样,会冲突 30 | 31 | 🔵根据主路由 DHCP 分配里找到一个主机名叫 OpenWRT 的,复制它的IPv4 地址粘贴到浏览器就能进入 OpenWRT 了 32 | 33 | 🔘密码是 password 34 | 35 | 🟥卸载 (如有安装 Portainer 请忽略) 36 | 37 | 🔴查看所有容器 38 | 39 | docker ps -a 40 | 41 | 🔘记录下 xuanaimai/openwrt:21-09-15 左边的 CONTAINER ID(容器ID,下面用得到) 42 | 43 | 🔴设置 容器不自启动 、 停止容器 和 删除容器 44 | 45 | docker container update --restart=no [容器ID] 46 | 47 | docker stop [容器ID] 48 | 49 | docker rm [容器ID] 50 | 51 | 🔴查看所有镜像 52 | 53 | docker images 54 | 55 | 🔘记录下 xuanaimai/openwrt 21-09-15 右边的 IMAGE ID(镜像ID,下面用得到) 56 | 57 | 🔴删除镜像 58 | 59 | docker rmi [镜像ID] 60 | 61 | 🔘再次用到此镜像的时候,从 [🔵拉取 OpenWRT 镜像] 这一步开始 62 | 63 | 🟧其他 64 | 65 | 🟠作为 单臂路由 时 66 | 67 | 🔸网络 → 接口 → LAN → 物理设置 → 桥接接口 的 √ 去掉 68 | 69 | 🔸防火墙 → 自定义规则 → [# iptables -t nat -A POSTROUTING -o pppoe-wan -j MASQUERADE] 前的 [# ] 去掉 70 | 71 | 🔘如果没有这条规则,请添加 iptables -t nat -A POSTROUTING -o pppoe-wan -j MASQUERADE 72 | 73 | 🔸如果有使用OpenClash,则 OpenClash → 全局设置 → 基本设置 → 绑定网络接口 选择 pppoe-wan 74 | 75 | 🔸打开 /etc/resolv.conf ,把 127.0.0.11 修改成 127.0.0.1 76 | 77 | 🔘此方法非永久,重启后恢复 127.0.0.11 78 | 79 | 🔘flippy大的方法,在 系统 → 启动项最下方的 本地启动脚本 添加 80 | 81 | cat > /etc/resolv.conf < 始于玩客云(arm/v7),不止于玩客云 8 | 9 | ### 安装Armbian 10 | [INSTALL.md](/INSTALL.md) 11 | 12 | ### 第三方应用 13 | 14 | [AppFile](/AppFile) 文件夹收集一些好用的镜像 JSON 文件,尽可能方便地扩展CasaOS的功能。 15 | 16 | 使用方法:应用中心-自定义安装-右上角导入-AppFile 17 | 18 | 部分镜像你可能需要创建文件夹或者修改一些信息,请根据实际情况修改。 19 | 20 | ### 使用笔记 21 | 22 | 使用笔记&技巧 [README_skill.md](/README_skill.md) 文件记录本人使用玩客云 Armbian+CasaOS 遇到的一些坑和使用技巧。 23 | 24 | 仅 Armbian 中测试,不一定适用其他系统和架构,请自行甄别。 25 | 26 | ## CasaOS 27 | 28 | ### 介绍 29 | 30 | CasaOS项目官方 https://github.com/IceWhaleTech/CasaOS 31 | 32 | 《CasaOS—— 一个简单,易于使用,优雅的开源家庭云系统》 33 | https://mp.weixin.qq.com/s/1oMywRTbmUADLOlSefvd9A 34 | 35 | https://www.bilibili.com/video/BV1X94y1Z7sA 36 | 37 | ### 安装 38 | 39 | 40 | ```sh 41 | wget -qO- https://get.casaos.io | sudo bash 42 | ``` 43 | 44 | or 45 | 46 | ```sh 47 | curl -fsSL https://get.casaos.io | sudo bash 48 | ``` 49 | 50 | ### 卸载 51 | 52 | ```sh 53 | casaos-uninstall 54 | ``` 55 | 56 | ## 其他 57 | 58 | ### Docker介绍 59 | 60 | Docker 是一个开源的应用容器引擎,可以让开发者打包他们的应用以及依赖包到一个轻量级、可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。 61 | 62 | 容器是完全使用沙箱机制,相互之间不会有任何接口(类似 iPhone 的 app),更重要的是容器性能开销极低。 63 | 64 | 如果你希望了解Docker,请点击这里 65 | 66 | https://www.runoob.com/docker/docker-tutorial.html 67 | 68 | ### SMB共享 69 | 70 | CasaOS 目前暂不支持 samba 共享的权限控制,如果需要权限控制,需关闭CasaOS内置共享,并用第三方镜像: 71 | 72 | https://github.com/dperson/samba 73 | 74 | 75 | -------------------------------------------------------------------------------- /README_skill.md: -------------------------------------------------------------------------------- 1 | # README_skill 2 | 3 | 本文件记录本人使用玩客云 Armbian+CasaOS 遇到的一些坑和使用技巧。 4 | 5 | 仅 Armbian 中测试,不一定适用其他系统和架构,请自行甄别。 6 | 7 | ## 使用技巧 8 | 9 | ### 一键换源 10 | 系统源 11 | ```sh 12 | bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) 13 | ``` 14 | Docker源 15 | ```sh 16 | bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) 17 | ``` 18 | 19 | ### 登录SSH输出系统信息 20 | 21 | `/etc/update-motd.d/` 以下文件设为744权限 22 | 23 | - 10-armbian-header 24 | - 30-armbian-sysinfo 25 | 26 | ### 修改 mac 地址 27 | 28 | `/etc/NetworkManager/system-connections/Wired connection 1.nmconnection` 29 | 30 | 修改 `cloned-mac-address=00:00:00:00:00:00` 31 | 32 | ### SD卡自动挂载卸载 33 | 34 | 新建 `/etc/udev/rules.d/11-auto-mount.rules` 内容如下 35 | 36 | ``` 37 | KERNEL!="mmcblk0*", GOTO="media_by_label_auto_mount_end" 38 | ENV{mount_path}="/media" 39 | SUBSYSTEM!="block",GOTO="media_by_label_auto_mount_end" 40 | IMPORT{program}="/sbin/blkid -o udev -p %N" 41 | ENV{ID_FS_TYPE}=="", GOTO="media_by_label_auto_mount_end" 42 | ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}" 43 | ENV{ID_FS_LABEL}=="", ENV{dir_name}="%E{ID_FS_UUID}" 44 | ACTION=="add", ENV{mount_options}="relatime,sync" 45 | ACTION=="add", RUN+="/bin/mkdir -p %E{mount_path}/%E{dir_name}", RUN+="/usr/bin/systemd-mount -o %E{mount_options} --no-block --automount=yes --collect /dev/%k %E{mount_path}/%E{dir_name}" 46 | ACTION=="remove", ENV{dir_name}!="", RUN+="/usr/bin/systemd-mount --umount %E{mount_path}/%E{dir_name}", RUN+="/bin/rmdir %E{mount_path}/%E{dir_name}" 47 | LABEL="media_by_label_auto_mount_end" 48 | ``` 49 | 50 | > 第二行`ENV{mount_path}="/media"`可自定义挂载的目录 51 | > CasaOS已提供自动挂载USB磁盘选项,以服务方式监听更佳,这里不做重复设置;否则还可以修改第一句此处`KERNEL!="sd*|mmcblk0*"`,原理是正则匹配设备名,不符合则跳过挂载。 52 | 53 | ### 系统启动后蓝灯 54 | 55 | 写入 `/etc/rc.local`,稍加修改可自定义颜色。 56 | ``` 57 | # 系统启动后蓝灯 58 | echo 1 > /sys/class/leds/onecloud:blue:alive/brightness 59 | echo 0 > /sys/class/leds/onecloud:green:alive/brightness 60 | echo 0 > /sys/class/leds/onecloud:red:alive/brightness 61 | ``` -------------------------------------------------------------------------------- /script/.keep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /script/casaos.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # 3 | # CasaOS Installer Script 4 | # 5 | # GitHub: https://github.com/IceWhaleTech/CasaOS 6 | # Issues: https://github.com/IceWhaleTech/CasaOS/issues 7 | # Requires: bash, mv, rm, tr, grep, sed, curl/wget, tar, smartmontools, parted, ntfs-3g, net-tools 8 | # 9 | # This script installs CasaOS to your system. 10 | # Usage: 11 | # 12 | # $ curl -fsSL https://get.casaos.io | sudo bash 13 | # or 14 | # $ wget -qO- https://get.casaos.io | sudo bash 15 | # 16 | # In automated environments, you may want to run as root. 17 | # If using curl, we recommend using the -fsSL flags. 18 | # 19 | # This only work on Linux systems. Please 20 | # open an issue if you notice any bugs. 21 | # 22 | clear 23 | echo -e "\e[0m\c" 24 | 25 | # shellcheck disable=SC2016 26 | echo ' 27 | _____ ____ _____ 28 | / ____| / __ \ / ____| 29 | | | __ _ ___ __ _| | | | (___ 30 | | | / _` / __|/ _` | | | |\___ \ 31 | | |___| (_| \__ \ (_| | |__| |____) | 32 | \_____\__,_|___/\__,_|\____/|_____/ 33 | 34 | --- Made by IceWhale with YOU --- 35 | ' 36 | export PATH=/usr/sbin:$PATH 37 | set -e 38 | 39 | ############################################################################### 40 | # GOLBALS # 41 | ############################################################################### 42 | 43 | ((EUID)) && sudo_cmd="sudo" 44 | 45 | # shellcheck source=/dev/null 46 | source /etc/os-release 47 | 48 | readonly TITLE="CasaOS Installer" 49 | 50 | # SYSTEM REQUIREMENTS 51 | readonly MINIMUM_DISK_SIZE_GB="5" 52 | readonly MINIMUM_MEMORY="400" 53 | readonly MINIMUM_DOCER_VERSION="20" 54 | readonly CASA_DEPANDS_PACKAGE=('curl' 'smartmontools' 'parted' 'ntfs-3g' 'net-tools' 'whiptail' 'udevil' 'samba' 'cifs-utils') 55 | readonly CASA_DEPANDS_COMMAND=('curl' 'smartctl' 'parted' 'ntfs-3g' 'netstat' 'whiptail' 'udevil' 'samba' 'mount.cifs') 56 | 57 | # SYSTEM INFO 58 | PHYSICAL_MEMORY=$(LC_ALL=C free -m | awk '/Mem:/ { print $2 }') 59 | readonly PHYSICAL_MEMORY 60 | 61 | FREE_DISK_BYTES=$(LC_ALL=C df -P / | tail -n 1 | awk '{print $4}') 62 | readonly FREE_DISK_BYTES 63 | 64 | readonly FREE_DISK_GB=$((FREE_DISK_BYTES / 1024 / 1024)) 65 | 66 | LSB_DIST=$( ( [ -n "${ID_LIKE}" ] && echo "${ID_LIKE}" ) || ( [ -n "${ID}" ] && echo "${ID}" ) ) 67 | readonly LSB_DIST 68 | 69 | UNAME_M="$(uname -m)" 70 | readonly UNAME_M 71 | 72 | UNAME_U="$(uname -s)" 73 | readonly UNAME_U 74 | 75 | readonly CASA_CONF_PATH=/etc/casaos/gateway.ini 76 | readonly CASA_UNINSTALL_URL="https://raw.githubusercontent.com/IceWhaleTech/get/main/uninstall.sh" 77 | readonly CASA_UNINSTALL_PATH=/usr/bin/casaos-uninstall 78 | 79 | # REQUIREMENTS CONF PATH 80 | # Udevil 81 | readonly UDEVIL_CONF_PATH=/etc/udevil/udevil.conf 82 | 83 | # COLORS 84 | readonly COLOUR_RESET='\e[0m' 85 | readonly aCOLOUR=( 86 | '\e[38;5;154m' # green | Lines, bullets and separators 87 | '\e[1m' # Bold white | Main descriptions 88 | '\e[90m' # Grey | Credits 89 | '\e[91m' # Red | Update notifications Alert 90 | '\e[33m' # Yellow | Emphasis 91 | ) 92 | 93 | readonly GREEN_LINE=" ${aCOLOUR[0]}─────────────────────────────────────────────────────$COLOUR_RESET" 94 | readonly GREEN_BULLET=" ${aCOLOUR[0]}-$COLOUR_RESET" 95 | readonly GREEN_SEPARATOR="${aCOLOUR[0]}:$COLOUR_RESET" 96 | 97 | # CASAOS VARIABLES 98 | TARGET_ARCH="" 99 | TMP_ROOT=/tmp/casaos-installer 100 | 101 | trap 'onCtrlC' INT 102 | onCtrlC() { 103 | echo -e "${COLOUR_RESET}" 104 | exit 1 105 | } 106 | 107 | ############################################################################### 108 | # Helpers # 109 | ############################################################################### 110 | 111 | ####################################### 112 | # Custom printing function 113 | # Globals: 114 | # None 115 | # Arguments: 116 | # $1 0:OK 1:FAILED 2:INFO 3:NOTICE 117 | # message 118 | # Returns: 119 | # None 120 | ####################################### 121 | 122 | Show() { 123 | # OK 124 | if (($1 == 0)); then 125 | echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[0]} OK $COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" 126 | # FAILED 127 | elif (($1 == 1)); then 128 | echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[3]}FAILED$COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" 129 | exit 1 130 | # INFO 131 | elif (($1 == 2)); then 132 | echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[0]} INFO $COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" 133 | # NOTICE 134 | elif (($1 == 3)); then 135 | echo -e "${aCOLOUR[2]}[$COLOUR_RESET${aCOLOUR[4]}NOTICE$COLOUR_RESET${aCOLOUR[2]}]$COLOUR_RESET $2" 136 | fi 137 | } 138 | 139 | Warn() { 140 | echo -e "${aCOLOUR[3]}$1$COLOUR_RESET" 141 | } 142 | 143 | GreyStart() { 144 | echo -e "${aCOLOUR[2]}\c" 145 | } 146 | 147 | ColorReset() { 148 | echo -e "$COLOUR_RESET\c" 149 | } 150 | 151 | # Clear Terminal 152 | Clear_Term() { 153 | 154 | # Without an input terminal, there is no point in doing this. 155 | [[ -t 0 ]] || return 156 | 157 | # Printing terminal height - 1 newlines seems to be the fastest method that is compatible with all terminal types. 158 | lines=$(tput lines) i newlines 159 | local lines 160 | 161 | for ((i = 1; i < ${lines% *}; i++)); do newlines+='\n'; done 162 | echo -ne "\e[0m$newlines\e[H" 163 | 164 | } 165 | 166 | # Check file exists 167 | exist_file() { 168 | if [ -e "$1" ]; then 169 | return 1 170 | else 171 | return 2 172 | fi 173 | } 174 | 175 | ############################################################################### 176 | # FUNCTIONS # 177 | ############################################################################### 178 | 179 | # 1 Check Arch 180 | Check_Arch() { 181 | case $UNAME_M in 182 | *aarch64*) 183 | TARGET_ARCH="arm64" 184 | ;; 185 | *64*) 186 | TARGET_ARCH="amd64" 187 | ;; 188 | *armv7*) 189 | TARGET_ARCH="arm-7" 190 | ;; 191 | *) 192 | Show 1 "Aborted, unsupported or unknown architecture: $UNAME_M" 193 | exit 1 194 | ;; 195 | esac 196 | Show 0 "Your hardware architecture is : $UNAME_M" 197 | CASA_PACKAGES=( 198 | "https://ghproxy.com/https://github.com/IceWhaleTech/CasaOS-Gateway/releases/download/v0.3.6/linux-${TARGET_ARCH}-casaos-gateway-v0.3.6.tar.gz" 199 | "https://ghproxy.com/https://github.com/IceWhaleTech/CasaOS-UserService/releases/download/v0.3.7/linux-${TARGET_ARCH}-casaos-user-service-v0.3.7.tar.gz" 200 | "https://ghproxy.com/https://github.com/IceWhaleTech/CasaOS-LocalStorage/releases/download/v0.3.7-2/linux-${TARGET_ARCH}-casaos-local-storage-v0.3.7-2.tar.gz" 201 | "https://ghproxy.com/https://github.com/IceWhaleTech/CasaOS/releases/download/v0.3.7-1/linux-${TARGET_ARCH}-casaos-v0.3.7-1.tar.gz" 202 | "https://ghproxy.com/https://github.com/IceWhaleTech/CasaOS-UI/releases/download/v0.3.7/linux-all-casaos-v0.3.7.tar.gz" 203 | ) 204 | } 205 | 206 | # PACKAGE LIST OF CASAOS (make sure the services are in the right order) 207 | CASA_SERVICES=( 208 | "casaos-gateway.service" 209 | "casaos-user-service.service" 210 | "casaos-local-storage.service" 211 | "casaos.service" # must be the last one so update from UI can work 212 | ) 213 | 214 | # 2 Check Distribution 215 | Check_Distribution() { 216 | sType=0 217 | notice="" 218 | case $LSB_DIST in 219 | *debian*) 220 | ;; 221 | *ubuntu*) 222 | ;; 223 | *raspbian*) 224 | ;; 225 | *openwrt*) 226 | Show 1 "Aborted, OpenWrt cannot be installed using this script, please visit ${CASA_OPENWRT_DOCS}." 227 | exit 1 228 | ;; 229 | *alpine*) 230 | Show 1 "Aborted, Alpine installation is not yet supported." 231 | exit 1 232 | ;; 233 | *trisquel*) 234 | ;; 235 | *) 236 | sType=1 237 | notice="We have not tested it on this system and it may fail to install." 238 | ;; 239 | esac 240 | Show $sType "Your Linux Distribution is : $LSB_DIST $notice" 241 | if [[ $sType == 1 ]]; then 242 | if (whiptail --title "${TITLE}" --yesno --defaultno "Your Linux Distribution is : $LSB_DIST $notice. Continue installation?" 10 60); then 243 | Show 0 "Distribution check has been ignored." 244 | else 245 | Show 1 "Already exited the installation." 246 | exit 1 247 | fi 248 | fi 249 | } 250 | 251 | # 3 Check OS 252 | Check_OS() { 253 | if [[ $UNAME_U == *Linux* ]]; then 254 | Show 0 "Your System is : $UNAME_U" 255 | else 256 | Show 1 "This script is only for Linux." 257 | exit 1 258 | fi 259 | } 260 | 261 | # 4 Check Memory 262 | Check_Memory() { 263 | if [[ "${PHYSICAL_MEMORY}" -lt "${MINIMUM_MEMORY}" ]]; then 264 | Show 1 "requires atleast 1GB physical memory." 265 | exit 1 266 | fi 267 | Show 0 "Memory capacity check passed." 268 | } 269 | 270 | # 5 Check Disk 271 | Check_Disk() { 272 | if [[ "${FREE_DISK_GB}" -lt "${MINIMUM_DISK_SIZE_GB}" ]]; then 273 | if (whiptail --title "${TITLE}" --yesno --defaultno "Recommended free disk space is greater than ${MINIMUM_DISK_SIZE_GB}GB, Current free disk space is ${FREE_DISK_GB}GB.Continue installation?" 10 60); then 274 | Show 0 "Disk capacity check has been ignored." 275 | else 276 | Show 1 "Already exited the installation." 277 | exit 1 278 | fi 279 | else 280 | Show 0 "Disk capacity check passed." 281 | fi 282 | } 283 | 284 | # Check Port Use 285 | Check_Port() { 286 | TCPListeningnum=$(${sudo_cmd} netstat -an | grep ":$1 " | awk '$1 == "tcp" && $NF == "LISTEN" {print $0}' | wc -l) 287 | UDPListeningnum=$(${sudo_cmd} netstat -an | grep ":$1 " | awk '$1 == "udp" && $NF == "0.0.0.0:*" {print $0}' | wc -l) 288 | ((Listeningnum = TCPListeningnum + UDPListeningnum)) 289 | if [[ $Listeningnum == 0 ]]; then 290 | echo "0" 291 | else 292 | echo "1" 293 | fi 294 | } 295 | 296 | # Get an available port 297 | Get_Port() { 298 | CurrentPort=$(${sudo_cmd} cat ${CASA_CONF_PATH} | grep HttpPort | awk '{print $3}') 299 | if [[ $CurrentPort == "$Port" ]]; then 300 | for PORT in {80..65536}; do 301 | if [[ $(Check_Port "$PORT") == 0 ]]; then 302 | Port=$PORT 303 | break 304 | fi 305 | done 306 | else 307 | Port=$CurrentPort 308 | fi 309 | } 310 | 311 | # Update package 312 | 313 | Update_Package_Resource() { 314 | GreyStart 315 | if [ -x "$(command -v apk)" ]; then 316 | ${sudo_cmd} apk update 317 | elif [ -x "$(command -v apt-get)" ]; then 318 | ${sudo_cmd} apt-get update 319 | elif [ -x "$(command -v dnf)" ]; then 320 | ${sudo_cmd} dnf check-update 321 | elif [ -x "$(command -v zypper)" ]; then 322 | ${sudo_cmd} zypper update 323 | elif [ -x "$(command -v yum)" ]; then 324 | ${sudo_cmd} yum update 325 | fi 326 | ColorReset 327 | } 328 | 329 | # Install depends package 330 | Install_Depends() { 331 | for ((i = 0; i < ${#CASA_DEPANDS_COMMAND[@]}; i++)); do 332 | cmd=${CASA_DEPANDS_COMMAND[i]} 333 | if [[ ! -x $(${sudo_cmd} which "$cmd") ]]; then 334 | packagesNeeded=${CASA_DEPANDS_PACKAGE[i]} 335 | Show 2 "Install the necessary dependencies: \e[33m$packagesNeeded \e[0m" 336 | GreyStart 337 | if [ -x "$(command -v apk)" ]; then 338 | ${sudo_cmd} apk add --no-cache "$packagesNeeded" 339 | elif [ -x "$(command -v apt-get)" ]; then 340 | ${sudo_cmd} apt-get -y -q install "$packagesNeeded" --no-upgrade 341 | elif [ -x "$(command -v dnf)" ]; then 342 | ${sudo_cmd} dnf install "$packagesNeeded" 343 | elif [ -x "$(command -v zypper)" ]; then 344 | ${sudo_cmd} zypper install "$packagesNeeded" 345 | elif [ -x "$(command -v yum)" ]; then 346 | ${sudo_cmd} yum install "$packagesNeeded" 347 | elif [ -x "$(command -v pacman)" ]; then 348 | ${sudo_cmd} pacman -S "$packagesNeeded" 349 | elif [ -x "$(command -v paru)" ]; then 350 | ${sudo_cmd} paru -S "$packagesNeeded" 351 | else 352 | Show 1 "Package manager not found. You must manually install: \e[33m$packagesNeeded \e[0m" 353 | fi 354 | ColorReset 355 | fi 356 | done 357 | } 358 | 359 | Check_Dependency_Installation() { 360 | for ((i = 0; i < ${#CASA_DEPANDS_COMMAND[@]}; i++)); do 361 | cmd=${CASA_DEPANDS_COMMAND[i]} 362 | if [[ ! -x $(${sudo_cmd} which "$cmd") ]]; then 363 | packagesNeeded=${CASA_DEPANDS_PACKAGE[i]} 364 | Show 1 "Dependency \e[33m$packagesNeeded \e[0m installation failed, please try again manually!" 365 | exit 1 366 | fi 367 | done 368 | } 369 | 370 | # Check Docker running 371 | Check_Docker_Running() { 372 | for ((i = 1; i <= 3; i++)); do 373 | sleep 3 374 | if [[ ! $(${sudo_cmd} systemctl is-active docker) == "active" ]]; then 375 | Show 1 "Docker is not running, try to start" 376 | ${sudo_cmd} systemctl start docker 377 | else 378 | break 379 | fi 380 | done 381 | } 382 | 383 | #Check Docker Installed and version 384 | Check_Docker_Install() { 385 | if [[ -x "$(command -v docker)" ]]; then 386 | Docker_Version=$(${sudo_cmd} docker version --format '{{.Server.Version}}') 387 | if [[ $? -ne 0 ]]; then 388 | Install_Docker 389 | elif [[ ${Docker_Version:0:2} -lt "${MINIMUM_DOCER_VERSION}" ]]; then 390 | Show 1 "Recommended minimum Docker version is \e[33m${MINIMUM_DOCER_VERSION}.xx.xx\e[0m,\Current Docker verison is \e[33m${Docker_Version}\e[0m,\nPlease uninstall current Docker and rerun the CasaOS installation script." 391 | exit 1 392 | else 393 | Show 0 "Current Docker verison is ${Docker_Version}." 394 | fi 395 | else 396 | Install_Docker 397 | fi 398 | } 399 | 400 | # Check Docker installed 401 | Check_Docker_Install_Final() { 402 | if [[ -x "$(command -v docker)" ]]; then 403 | Docker_Version=$(${sudo_cmd} docker version --format '{{.Server.Version}}') 404 | if [[ $? -ne 0 ]]; then 405 | Install_Docker 406 | elif [[ ${Docker_Version:0:2} -lt "${MINIMUM_DOCER_VERSION}" ]]; then 407 | Show 1 "Recommended minimum Docker version is \e[33m${MINIMUM_DOCER_VERSION}.xx.xx\e[0m,\Current Docker verison is \e[33m${Docker_Version}\e[0m,\nPlease uninstall current Docker and rerun the CasaOS installation script." 408 | exit 1 409 | else 410 | Show 0 "Current Docker verison is ${Docker_Version}." 411 | Check_Docker_Running 412 | fi 413 | else 414 | Show 1 "Installation failed, please run 'curl -fsSL https://get.docker.com | bash' and rerun the CasaOS installation script." 415 | exit 1 416 | fi 417 | } 418 | 419 | #Install Docker 420 | Install_Docker() { 421 | Show 2 "Install the necessary dependencies: \e[33mDocker \e[0m" 422 | GreyStart 423 | curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun 424 | ColorReset 425 | if [[ $? -ne 0 ]]; then 426 | Show 1 "Installation failed, please try again." 427 | exit 1 428 | else 429 | Check_Docker_Install_Final 430 | fi 431 | } 432 | 433 | #Configuration Addons 434 | Configuration_Addons() { 435 | Show 2 "Configuration CasaOS Addons" 436 | #Remove old udev rules 437 | if [[ -f "${PREFIX}/etc/udev/rules.d/11-usb-mount.rules" ]]; then 438 | ${sudo_cmd} rm -rf "${PREFIX}/etc/udev/rules.d/11-usb-mount.rules" 439 | fi 440 | 441 | if [[ -f "${PREFIX}/etc/systemd/system/usb-mount@.service" ]]; then 442 | ${sudo_cmd} rm -rf "${PREFIX}/etc/systemd/system/usb-mount@.service" 443 | fi 444 | 445 | #Udevil 446 | if [[ -f $PREFIX${UDEVIL_CONF_PATH} ]]; then 447 | 448 | # GreyStart 449 | # Add a devmon user 450 | USERNAME=devmon 451 | id ${USERNAME} &>/dev/null || { 452 | ${sudo_cmd} useradd -M -u 300 ${USERNAME} 453 | ${sudo_cmd} usermod -L ${USERNAME} 454 | } 455 | 456 | # Add and start Devmon service 457 | GreyStart 458 | ${sudo_cmd} systemctl enable devmon@devmon 459 | ${sudo_cmd} systemctl start devmon@devmon 460 | ColorReset 461 | # ColorReset 462 | fi 463 | } 464 | 465 | # Download And Install CasaOS 466 | DownloadAndInstallCasaOS() { 467 | if [ -z "${BUILD_DIR}" ]; then 468 | ${sudo_cmd} rm -rf ${TMP_ROOT} 469 | mkdir -p ${TMP_ROOT} || Show 1 "Failed to create temporary directory" 470 | TMP_DIR=$(mktemp -d -p ${TMP_ROOT} || Show 1 "Failed to create temporary directory") 471 | 472 | pushd "${TMP_DIR}" 473 | 474 | for PACKAGE in "${CASA_PACKAGES[@]}"; do 475 | Show 2 "Downloading ${PACKAGE}..." 476 | GreyStart 477 | curl -sLO "${PACKAGE}" || Show 1 "Failed to download package" 478 | ColorReset 479 | done 480 | 481 | for PACKAGE_FILE in linux-*-casaos-*.tar.gz; do 482 | Show 2 "Extracting ${PACKAGE_FILE}..." 483 | GreyStart 484 | tar zxf "${PACKAGE_FILE}" || Show 1 "Failed to extract package" 485 | ColorReset 486 | done 487 | 488 | BUILD_DIR=$(realpath -e "${TMP_DIR}"/build || Show 1 "Failed to find build directory") 489 | 490 | popd 491 | fi 492 | 493 | for SERVICE in "${CASA_SERVICES[@]}"; do 494 | Show 2 "Stopping ${SERVICE}..." 495 | GreyStart 496 | ${sudo_cmd} systemctl stop "${SERVICE}" || Show 3 "Service ${SERVICE} does not exist." 497 | ColorReset 498 | done 499 | 500 | MIGRATION_SCRIPT_DIR=$(realpath -e "${BUILD_DIR}"/scripts/migration/script.d || Show 1 "Failed to find migration script directory") 501 | 502 | for MIGRATION_SCRIPT in "${MIGRATION_SCRIPT_DIR}"/*.sh; do 503 | Show 2 "Running ${MIGRATION_SCRIPT}..." 504 | GreyStart 505 | ${sudo_cmd} bash "${MIGRATION_SCRIPT}" || Show 1 "Failed to run migration script" 506 | ColorReset 507 | done 508 | 509 | Show 2 "Installing CasaOS..." 510 | SYSROOT_DIR=$(realpath -e "${BUILD_DIR}"/sysroot || Show 1 "Failed to find sysroot directory") 511 | 512 | # Generate manifest for uninstallation 513 | MANIFEST_FILE=${BUILD_DIR}/sysroot/var/lib/casaos/manifest 514 | ${sudo_cmd} touch "${MANIFEST_FILE}" || Show 1 "Failed to create manifest file" 515 | 516 | GreyStart 517 | find "${SYSROOT_DIR}" -type f | ${sudo_cmd} cut -c ${#SYSROOT_DIR}- | ${sudo_cmd} cut -c 2- | ${sudo_cmd} tee "${MANIFEST_FILE}" || Show 1 "Failed to create manifest file" 518 | 519 | ${sudo_cmd} cp -rf "${SYSROOT_DIR}"/* / || Show 1 "Failed to install CasaOS" 520 | ColorReset 521 | 522 | SETUP_SCRIPT_DIR=$(realpath -e "${BUILD_DIR}"/scripts/setup/script.d || Show 1 "Failed to find setup script directory") 523 | 524 | for SETUP_SCRIPT in "${SETUP_SCRIPT_DIR}"/*.sh; do 525 | Show 2 "Running ${SETUP_SCRIPT}..." 526 | GreyStart 527 | ${sudo_cmd} bash "${SETUP_SCRIPT}" || Show 1 "Failed to run setup script" 528 | ColorReset 529 | done 530 | 531 | #Download Uninstall Script 532 | if [[ -f $PREFIX/tmp/casaos-uninstall ]]; then 533 | ${sudo_cmd} rm -rf "$PREFIX/tmp/casaos-uninstall" 534 | fi 535 | ${sudo_cmd} curl -fsSLk "$CASA_UNINSTALL_URL" >"$PREFIX/tmp/casaos-uninstall" 536 | ${sudo_cmd} cp -rf "$PREFIX/tmp/casaos-uninstall" $CASA_UNINSTALL_PATH || { 537 | Show 1 "Download uninstall script failed, Please check if your internet connection is working and retry." 538 | exit 1 539 | } 540 | 541 | ${sudo_cmd} chmod +x $CASA_UNINSTALL_PATH 542 | 543 | for SERVICE in "${CASA_SERVICES[@]}"; do 544 | Show 2 "Starting ${SERVICE}..." 545 | GreyStart 546 | ${sudo_cmd} systemctl start "${SERVICE}" || Show 3 "Service ${SERVICE} does not exist." 547 | ColorReset 548 | done 549 | } 550 | 551 | Clean_Temp_Files() { 552 | Show 2 "Clean temporary files..." 553 | ${sudo_cmd} rm -rf "${TMP_DIR}" || Show 1 "Failed to clean temporary files" 554 | } 555 | 556 | Check_Service_status() { 557 | for SERVICE in "${CASA_SERVICES[@]}"; do 558 | Show 2 "Checking ${SERVICE}..." 559 | if [[ $(${sudo_cmd} systemctl is-active "${SERVICE}") == "active" ]]; then 560 | Show 0 "${SERVICE} is running." 561 | else 562 | Show 1 "${SERVICE} is not running, Please reinstall." 563 | exit 1 564 | fi 565 | done 566 | } 567 | 568 | # Get the physical NIC IP 569 | Get_IPs() { 570 | PORT=$(${sudo_cmd} cat ${CASA_CONF_PATH} | grep port | sed 's/port=//') 571 | ALL_NIC=$($sudo_cmd ls /sys/class/net/ | grep -v "$(ls /sys/devices/virtual/net/)") 572 | for NIC in ${ALL_NIC}; do 573 | IP=$($sudo_cmd ifconfig "${NIC}" | grep inet | grep -v 127.0.0.1 | grep -v inet6 | awk '{print $2}' | sed -e 's/addr://g') 574 | if [[ -n $IP ]]; then 575 | if [[ "$PORT" -eq "80" ]]; then 576 | echo -e "${GREEN_BULLET} http://$IP (${NIC})" 577 | else 578 | echo -e "${GREEN_BULLET} http://$IP:$PORT (${NIC})" 579 | fi 580 | fi 581 | done 582 | } 583 | 584 | # Show Welcome Banner 585 | Welcome_Banner() { 586 | CASA_TAG=$(casaos -v) 587 | 588 | echo -e "${GREEN_LINE}${aCOLOUR[1]}" 589 | echo -e " CasaOS ${CASA_TAG}${COLOUR_RESET} is running at${COLOUR_RESET}${GREEN_SEPARATOR}" 590 | echo -e "${GREEN_LINE}" 591 | Get_IPs 592 | echo -e " Open your browser and visit the above address." 593 | echo -e "${GREEN_LINE}" 594 | echo -e "" 595 | echo -e " ${aCOLOUR[2]}CasaOS Project : https://github.com/IceWhaleTech/CasaOS" 596 | echo -e " ${aCOLOUR[2]}CasaOS Team : https://github.com/IceWhaleTech/CasaOS#maintainers" 597 | echo -e " ${aCOLOUR[2]}CasaOS Discord : https://discord.gg/knqAbbBbeX" 598 | echo -e " ${aCOLOUR[2]}Website : https://www.casaos.io" 599 | echo -e " ${aCOLOUR[2]}Online Demo : http://demo.casaos.io" 600 | echo -e "" 601 | echo -e " ${COLOUR_RESET}${aCOLOUR[1]}Uninstall ${COLOUR_RESET}: casaos-uninstall" 602 | echo -e "${COLOUR_RESET}" 603 | } 604 | 605 | ############################################################################### 606 | # Main # 607 | ############################################################################### 608 | 609 | #Usage 610 | usage() { 611 | cat <<-EOF 612 | Usage: install.sh [options] 613 | Valid options are: 614 | -p Specify build directory (Local install) 615 | -h Show this help message and exit 616 | EOF 617 | exit "$1" 618 | } 619 | 620 | while getopts ":p:h" arg; do 621 | case "$arg" in 622 | p) 623 | BUILD_DIR=$OPTARG 624 | ;; 625 | h) 626 | usage 0 627 | ;; 628 | *) 629 | usage 1 630 | ;; 631 | esac 632 | done 633 | 634 | # Step 1:Check ARCH 635 | Check_Arch 636 | 637 | # Step 2: Check OS 638 | Check_OS 639 | 640 | # Step 3: Check Distribution 641 | Check_Distribution 642 | 643 | # Step 4: Check System Required 644 | Check_Memory 645 | Check_Disk 646 | 647 | # Step 5: Install Depends 648 | Update_Package_Resource 649 | Install_Depends 650 | Check_Dependency_Installation 651 | 652 | # Step 6: Check And Install Docker 653 | Check_Docker_Install 654 | 655 | # Step 7: Configuration Addon 656 | Configuration_Addons 657 | 658 | # Step 8: Download And Install CasaOS 659 | DownloadAndInstallCasaOS 660 | 661 | # Step 9: Check Service Status 662 | Check_Service_status 663 | 664 | # Step 10: Show Welcome Banner 665 | #Clear_Term 666 | Welcome_Banner --------------------------------------------------------------------------------