Returned to Keenetic. It allows for the use -1 server (and no permanently running servers).

For example:

  • PPPoE
  • WiFi mesh
  • extra providers (when needed): 4g, wifi, 2nd ethernet
  • DHCP & DNS
  • VPN client
  • VPN server
  • Torrent-client
  • DLNA-server
  • External LB with https from Let’s Encrypt (Caddy)
  • Static internal homepage (Caddy)
  • Exchange folder (SFTP-server)
  • Back-up server (to external hdd, sftp protocol or time machine)

A Caddy was required to host the internal start page. Let’s see how it can be installed and configured.

Installing OPKG

2 articles:

In general, it results in another separate ssh connection to the system, which is access to the already running Linux.

Also, from the second article we understand that my architecture is aarch64 aka arm64 – this will be useful to know which Caddy to download.

Installing Caddy

opkg install curl
curl -fLO https://github.com/caddyserver/caddy/releases/download/v2.8.4/caddy_2.8.4_linux_arm64.tar.gz
gunzip caddy_2.8.4_linux_arm64.tar.gz 
tar -xvf caddy_2.8.4_linux_arm64.tar 
mv caddy /opt/usr/bin
caddy --help
rm caddy_2.8.4_linux_arm64.tar LICENSE README.md

Configuring Caddy

mkdir /opt/var/log/caddy
mkdir /opt/share/caddy
mkdir /opt/share/caddy/start
mkdir /opt/etc/caddy

cat > /opt/etc/caddy/Caddyfile << EOF
{
	storage file_system /opt/share/caddy
	default_bind 192.168.1.1
}

:8080 {
	root * /opt/share/caddy/start
	file_server
}
EOF
caddy fmt --overwrite /opt/etc/caddy/Caddyfile

cat > /opt/share/caddy/start/index.html << EOF
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Caddy</title>
  </head>
  <body>
    Caddy works! 🎇🎇🎇
  </body>
</html>
EOF

cat > /opt/etc/init.d/S98caddy << \EOF
#!/bin/sh

ENABLED="yes"
PROCS="caddy"
ARGS="start --config /opt/etc/caddy/Caddyfile"
WORK_DIR="/opt/share/caddy"
DESC=$PROCS
PREARGS=""
PRECMD="export GOMAXPROCS=1"
POSTCMD=""

. /opt/etc/init.d/rc.func
EOF
chmod +x /opt/etc/init.d/S98caddy

/opt/etc/init.d/S98caddy start
/opt/etc/init.d/S98caddy check

Install rsync to update static website using rsync:

opkg install rsync

And a router restart for checking that everything starts up properly.