Install Tailscale on Wago cc100

Install Tailscale on Wago cc100
https://tailscale.com

Login via SSH

 ssh root@ipaddress
 pass: wago

Download the latest Tailscale client
https://pkgs.tailscale.com/stable/#static

arm: tailscale_1.62.1_arm.tgz
https://pkgs.tailscale.com/stable/tailscale_1.62.1_arm.tgz

mkdir tmp
cd tmp
curl https://pkgs.tailscale.com/stable/tailscale_1.62.1_arm.tgz --output tailscale_1.62.1_arm.tgz

Extract the package

tar x -zvC /root/tmp -f tailscale_1.62.1_arm.tgz

Delete the package when it’s extracted

rm tailscale_1.62.1_arm.tgz

Move the tailscale and tailscaled binaries to /usr/bin

cd tailsca~1
cp tailscale /usr/bin
cp tailscaled /usr/bin

Make a init script to start and stop the tailscale service

  cd /etc/init.d
  nano /etc/init.d/tailscale
  
  #!/bin/sh
  # Tailscale init script
  
  ### BEGIN INIT INFO
  # Provides:          tailscale
  # Required-Start:    $network $local_fs $remote_fs
  # Required-Stop:     $network $local_fs $remote_fs
  # Default-Start:     2 3 4 5
  # Default-Stop:      0 1 6
  # Short-Description: Tailscale VPN
  ### END INIT INFO
  
  case "$1" in
  start)
      echo "Starting Tailscale..."
      /usr/bin/tailscaled --state=/var/lib/tailscale/tailscaled.state
      ;;
  stop)
      echo "Stopping Tailscale..."
      /usr/bin/tailscale down
      ;;
  restart)
      $0 stop
      $0 start
      ;;
  *)
      echo "Usage: $0 {start|stop|restart}"
      exit 1
      ;;
  esac
  
  exit 0

Paste the script

chmod 775 /etc/init.d/tailscale
chmod 775 /usr/bin/tailscale
chmod 775 /usr/bin/tailscaled

Link the startup script to init

ln -s /etc/init.d/tailscale /etc/rc.d/S99_tailscale

Start tailscale service

/etc/init.d/tailscale start

See if the service is running.

ps aux |grep tailscale*

Login and connect tailscale

tailscale up

Nice !
There is a dockerized version but a binary is very interesting !

We could create an IPK package

Yes a IPK. that would be nice.

I would like a work opkg server that we could get packages from. Then It could be easier when updates is made.

I have started to make a installscript for tailscale.

Please give feedback

I prefer to use the Tailscale docker container.

docker run -d
–name=tailscaled
–restart=unless-stopped
–network=host
-v /var/lib:/var/lib
-v /dev/net/tun:/dev/net/tun
-v /var/lib/tailscale:/var/lib/tailscale
-e TS_ROUTES=< ip range >/24
-e TS_AUTHKEY=< key >
–cap-add=NET_ADMIN
–cap-add=NET_RAW
tailscale/tailscale

Enjoy!

Rewrite InstallTailscale.sh: safe atomic upgrades, fix stale static-binary parsing
The Tailscale download page changed its HTML structure ( anchors
became

), which had silently broken both the static-binary
lookup for arm/arm64/386 and the per-distro install-script lookup for amd64.
Rewrote the parsing against the live page.

Also fixes several correctness/safety issues found while validating on real
WAGO PLCs (PFC300, CC100, and a heavily space-constrained Old PFC200 BACnet controller):

  • Never delete the running tailscale/tailscaled until the new binaries are
    downloaded, extracted, and validated (previously deleted eagerly on update).
  • Atomic install with backup + rollback, using an off-destination backup
    location so it doesn’t need double the space on cramped root filesystems.
  • Low-space fallback: when there isn’t room to stage old+new binaries side
    by side, remove the (already backed-up) old binary first and copy the new
    one in directly - only needs headroom for the version-to-version size
    delta, not the full binary.
  • Replace stat -c%s with wc -c: some embedded BusyBox builds ship stat
    without format-string support.
  • Fix a subshell variable-scoping bug that silently prevented the extraction
    directory from ever being cleaned up.
  • New init.d script with PID-file repair, pidof fallback, and a real restart
    path; installed via the same backup+rollback pattern as the binaries.
  • Decouple daemon restart from install, with an optional detached restart so
    it survives the SSH-over-Tailscale session it may itself interrupt.
  • Fix duplicate install-status checks, curl --insecure, and a fetchAndParseData
    argument/scoping mismatch from the previous version.

Bra greier!
Would this survive a firmware update?

I’m not sure, I think a firmware upgrade would erease all the files on the PLC. And the script places the file in /usr/bin