Abstract
- Open-source Embedded OS that is based on Linux Kernel, primarily designed for Network Router
Attention
Use the Ext4 for File System for easy expansion of the Flash Memory!
Attention
OpenWRT doesn’t uses ash instead of bash, so
.bashrc
doesn’t work, use/etc/profile
instead.
Packages
Prerequisites
OpenWRT comes with minimal set of tools, run the below command to update and install all the neccssary tools to install new tools & configure openwrt with breeze!
opkg install tar wget-ssl shadow-useradd shadow-usermod shadow-groupadd sudo openssh-sftp-server unzip curl bash git-http
GUI System Tools
- luci-app-wechatpush, push network info to telegram chat, useful!
- luci-theme-argo &
opkg install luci-lib-ipkg
-
opkg install luci-i18n-netdata-zh-cn
-
opkg install luci-i18n-uhttpd-zh-cn
-
opkg install luci-i18n-ddns-go-zh-cn
-
opkg install luci-i18n-dockerman-zh-cn
, refer to OpenWrt as Docker container host for more information
Networking Tools
-
opkg install cloudflared
-
opkg install nftables kmod-nft-queue kmod-nf-conntrack-netlink
for OpenGFW -
opkg install adguardhome
(the binary & config are in/usr/bin
, setup guide) - DNS sinkhole - Wikipedia
Proxy Tools
-
opkg install luci-app-openclash
System Tools
-
opkg install rclone
(or install the zip from official site,ln -s /root/.bin/rclone /usr/bin/rclone
) & Cronitor for OpenWRT Backup -
opkg install python3
-
opkg install coreutils-nohup procps-ng-watch
-
opkg install file
-
opkg install stress
-
opkg install luci-app-dockerman
Third-party packages
- Download from Github
- btop
- fastfetch
OpenWRT Backup and Restore
- I use RCLONE and Cron Job to have automated back up to a cloud storage of my choice. I also use Cronitor to make I get notified when the job fails. Refer to OpenWrt Wiki - Backup and restore for more information
Sample cronjob code
Make sure you have rclone, cronitor cli installed and a folder
backup
created in the root directory. For Cronitor cli, you need to download the installation script and remove thesudo
from the script first, andcronitor discover
didn’t work for me, you need to add in the cronitor wrapper yourself as shown below.0 0 * * * cronitor exec <your_cronitor_job_key> "sysupgrade -b /root/backup/backup-${HOSTNAME}-$(date +%F%T).tar.gz && /usr/bin/rclone sync /root/backup/ r2:<remote_cloud_storage_folder>"
OpenWRT restore
Personally I prefer to use the Web UI to restore the OpenWRT system configuration, then use SFTP to upload all the configuration files at the
/root
.