Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QTS4 compatibility #72

Open
DocEmmetBrown opened this issue Jan 19, 2023 · 37 comments
Open

QTS4 compatibility #72

DocEmmetBrown opened this issue Jan 19, 2023 · 37 comments

Comments

@DocEmmetBrown
Copy link

DocEmmetBrown commented Jan 19, 2023

Hi Folks,

I used to update my qnap-412 NAS with the Tailscale_*_arm-x19.qpkg packages, and they don't seem to be available anymore with the new building system.
Is there a chance that I can find them somewhere ? or do I have to build them myself ?

Thanks a lot for this package, and also for all the hard work in Tailscale, the product is amazing !

@DentonGentry
Copy link
Contributor

The latest stable release is https://github.com/tailscale/tailscale-qpkg/releases/tag/v1.34.1, which has x19 packages available.

You may find other binaries if you look for them, which are marked as Pre-release and not intended for use. Those are aimed at getting into the QNAP App Center, which has its own notion of packaging. For example: x19, x31, and x41 all use exactly the same ARMv7 binary. The Tailscale_1.34.2-1_arm-x41.qpkg gets bundled as the ARMv7 package which all three use.

@DocEmmetBrown
Copy link
Author

Thanks for your message @DentonGentry.
I tried with the Tailscale_1.34.2-1_arm-x41.qpkg on my hardware, and it fails, with message Failed to install Tailscale 1.34.2-1. Installation package is incompatible. Use the correct package. .
It's OK with version 1.34.1, with the x19 package
Do you think it's worth investigating ? and if yes, what data can I collect to help the investigation ?

My NAS is a TS-412 ( and not 420 as I mistakenly mentioned in my first message), with QNAP OS version 4.3.3.2211

@DocEmmetBrown
Copy link
Author

from my reading of the old GitHub action builder code , it looks like the x19 package is actually the only ARMv5. That would explain why it doesn't install on my super old NAS.

@DentonGentry
Copy link
Contributor

Next week we're expecting to release 1.36.0, so a new qnap-* package will appear. I'll include the x19 build this time instead of x41, and expect to use that for the QNAP App Center ARM32 build.

It is unfortunate that we only get to deliver one ARM32 binary, we don't have a way to deliver one ARMv5 and one ARMv7.

@DocEmmetBrown
Copy link
Author

Thanks @DentonGentry. Don't hesitate to ping me if I can be any helpful for testing things on very old hardware ;)

@DentonGentry
Copy link
Contributor

https://github.com/tailscale/tailscale-qpkg/releases/tag/qnap-1.36.0 includes an x19 binary.

@DocEmmetBrown
Copy link
Author

Hey @DentonGentry , I tried to install it, but get the [App Center] Failed to install Tailscale. Upgrade QTS to 5.0.0 or a newer compatible version. message.
Any chance that you're also able to package it for QTS 4.X ?

@DentonGentry
Copy link
Contributor

Any chance that you're also able to package it for QTS 4.X ?

We tried, by purchasing a refurbished TS-231K which arrived with QTS 4.x. Without us ever telling it to do so, it updated itself to QTS5 overnight one night. QNAP is apparently pushing to get devices onto QTS5.

At this point I don't expect to be able to support QTS4. We do not have a way to develop for it nor test it.

@DocEmmetBrown
Copy link
Author

DocEmmetBrown commented Jan 26, 2023

At this point I don't expect to be able to support QTS4. We do not have a way to develop for it nor test it.

That's very unfortunate, as some (very) "old" Qnap devices can't migrate to QTS5. :'(
Any chance that you could download the old firmware from this page, and revert it to QTS 4 ?
My understanding is that models TS-X3X, X5X, and X7X can update to QTS5.
TS-X1X and X2X can't.

@DentonGentry
Copy link
Contributor

Any chance that you could download the old firmware from this page, and revert it to QTS 4 ?

I understand that you want QTS4 support. We did try. At this point I do not expect to put more effort into it. You are welcome to continue to use the CLI version https://github.com/tailscale/tailscale-qpkg/releases/tag/v1.34.1, which will continue to interoperate with Tailscale updates for the foreseeable future.

@DocEmmetBrown
Copy link
Author

Thanks for your answer @DentonGentry . I'm sad but I can understand.
Is there and easy-ish way for me to build it from source if I want to have the updated tailscale code ?
Thanks again

@DentonGentry
Copy link
Contributor

Is there and easy-ish way for me to build it from source

git clone this repository and run make pkg on a Linux machine which has docker available. It will fetch the tailscale and tailscaled binaries from pkgs.tailscale.com, and create a set of packages in out/tailscale-<version>/pkg

If you want to build the tailscale and tailscaled binaries you can, it just isn't automated. You'd git clone https://github.com/tailscale/tailscale on a Linux machine and run GOARCH=arm go build ./cmd/tailscale and GOARCH=arm go build ./cmd/tailscaled
Then copy the new binaries into this repository's out/tailscale-<version>/ and run make pkg again. It won't download the binaries from pkgs.tailscale.com if they are already present.

@DocEmmetBrown
Copy link
Author

DocEmmetBrown commented Jan 28, 2023

Hey @DentonGentry ,
FWIW, after running :

sed -i -e  's/QTS_MINI_VERSION=".*"/QTS_MINI_VERSION="4.0.0"/' ./Tailscale/qpkg.cfg.in

and

make pkg

the Tailscale_1.36.0-1_arm-x19.qpkg can be installed on my TS-412, and seems to be working like a charm, including the webUI for the login page. 🥳

@DentonGentry
Copy link
Contributor

QTS4 would also require the QVPN package be installed, to create /dev/net/tun. Presumably you already had it.
QTS5 has a /dev/net/tun device by default without needing to install QVPN.

To support QTS4 we have to add QVPN as a package dependency, which QTS5 users would also have to install it as I know of no way for a package to express different dependencies based on QTS version.

@QuantumLibet
Copy link

Hej @DocEmmetBrown,

FWIW, the binaries (well, executables) still work. A workaround is to extract the executables tailscaled and tailscale from the qpkg package, and replace the older, already installed version of them with the newer versions. That has worked for my trusty old TS-112P.


Prerequisites:

  • a Linux installation
  • SSH access to the QNAP.

  1. Download the current Tailscale_..._x19.qpkg:

     curl -sSLO $(curl -s https://api.github.com/repos/tailscale/tailscale-qpkg/releases/latest | awk '/https.*x19.qpkg"/{gsub("\"",""); print $2}')
    
  2. Clone the extraction scripts from Max Boehm:

     git clone https://github.com/max-boehm/qnap-utils.git
    
  3. Unpack the qpkg package:
    The tailscale and tailscaled executables will be available in the folder ./Tailscale*/data.

     ./qnap-utils/extract_qpkg.sh ./Tailscale*.qpkg
    
  4. Copy the executables with SSH to the QNAP and overwrite the existing files:

     scp Tailscale*/data/tailscale* <user>@<server>:/share/HDA_DATA/.qpkg/Tailscale/
    
  5. Restart the Tailscale app in the QNAP App Center, or reboot the QNAP.


Hope that helps.

@DocEmmetBrown
Copy link
Author

Thanks @QuantumLibet .

I continue building the packages from source, which is super quick, and it works perfectly ;)
But thanks for your solution that will probably be useful sooner rather than later !

@DentonGentry DentonGentry changed the title x19 compatibility QTS4 compatibility May 3, 2023
@DentonGentry
Copy link
Contributor

If there are any examples of packages which can express a different set of dependencies for QTS4 versus QTS5, we would do that.

We'd still need to acquire a QTS4 system to be able to test and develop, and prevent it from auto-updating to QTS5, but we can probably do that.

@DocEmmetBrown
Copy link
Author

If there are any examples of packages which can express a different set of dependencies for QTS4 versus QTS5, we would do that.

Hi @DentonGentry ,
unfortunately I don't think that such thing would be possible natively.
The least crappy solution that I can think of right now would be to have a specific build process for arm-x19 with a specific qpkg.cfg.in file, that would only build for QTS4, with the required set of dependencies.

@HansRen1024
Copy link

HansRen1024 commented May 11, 2023

Hey @DentonGentry , FWIW, after running :

sed -i -e  's/QTS_MINI_VERSION=".*"/QTS_MINI_VERSION="4.0.0"/' ./Tailscale/qpkg.cfg.in

and

make pkg

the Tailscale_1.36.0-1_arm-x19.qpkg can be installed on my TS-412, and seems to be working like a charm, including the webUI for the login page. 🥳

Hi @DocEmmetBrown , I followed your comment to build pkg for my qnap TS-412 on ubuntu18.04. I got an error shown below. I am wondering if you have met this error before. Thank you.

`
tailscale_1.36.0_arm64/

      tailscale_1.36.0_arm64/tailscale
    
      tailscale_1.36.0_arm64/tailscaled
    
      tailscale_1.36.0_arm64/systemd/
    
      tailscale_1.36.0_arm64/systemd/tailscaled.defaults
    
      tailscale_1.36.0_arm64/systemd/tailscaled.service
    
      docker run --rm \

      -e TSTAG=1.36.0 \

      -e QNAPTAG=1 \

      -v /home/hans/Downloads/tailscale-qpkg-1.36.0/out/tailscale-1.36.0:/out \

      -v /home/hans/Downloads/tailscale-qpkg-1.36.0/Tailscale:/Tailscale \

      -v /home/hans/Downloads/tailscale-qpkg-1.36.0/build/build-qpkg.sh:/build-qpkg.sh \

      build.tailscale.io/qdk:latest \

      /build-qpkg.sh

      Unable to find image 'build.tailscale.io/qdk:latest' locally
    
      docker: Error response from daemon: Get https://build.tailscale.io/v2/: dial tcp: lookup build.tailscale.io: no such host.
    
      See 'docker run --help'.
    
      Makefile:17: recipe for target 'pkg' failed
    
      make: *** [pkg] Error 125

`

@DocEmmetBrown
Copy link
Author

DocEmmetBrown commented May 11, 2023

Hi @HansRen1024 ,
I think I recall this bug 🤔

you might need to run make build-qdk-container on the first time, to set everything up properly.
and then your make pkg should (hopefully) work 🤞

@HansRen1024
Copy link

make build-qdk-container

@DocEmmetBrown Brilliant! I have had them run properly. Thank you, Emmet!

@QuantumLibet
Copy link

@HansRen1024 Did you have a previous version of Tailscale installed on your TS-412? Did the package you created also include the QVPN package necessary for the QTS4 version?

I am asking, since it was my understanding, that the current source does not build the QVPN package, which QTS4 needs, but QTS5 does not.

@DocEmmetBrown
Copy link
Author

@QuantumLibet : "QVPN Service" is available from the QNAP App Center, even with QTS version 4.* . It does not have to be built AFAIU.

DocEmmetBrown added a commit to DocEmmetBrown/tailscale-qpkg that referenced this issue Nov 1, 2023
The x19 architecture cannot run QTS5 anyway, but can run Tailscale perfectly.

Updates tailscale#72
@daxliniere
Copy link

We tried, by purchasing a refurbished TS-231K which arrived with QTS 4.x. Without us ever telling it to do so, it updated itself to QTS5 overnight one night.

Hey Denton, did you manage to get TailScale working on your TS-231K running QTS 5? The available download is currently not compatible.
TS-231K uses an AnnapurnaLabs Alpine AL214 32-bit ARM CPU.

@aith85
Copy link

aith85 commented Apr 29, 2024

Hi @DentonGentry,

v1.34.1 does install on an old QNAP TS870 Pro with QTS 4.3.6.2665, and I've also updated it successfully extracting the latest qpkg and overwriting the files.

However, 1.34.1 does not create an app icon in QTS, nor a web interface.
I've managed to make it run through SSH with the following:

./tailscaled
./tailscale up

but it would be nice to have a web interface :)

Also, the Tailscale.sh script always exit with Tailscale is disabled.

@salimhb
Copy link

salimhb commented Apr 30, 2024

I have an old QNAP TS-231 with firmware 4.3.6.2665 and I was able to build the latest release 1.58.2 as suggested here #72 (comment)
It's running fine with an icon in the menu and launches a web interface. Only downside is that the exit node feature does not work.

@aith85
Copy link

aith85 commented Apr 30, 2024

Hi @salimhb

Thanks for confirming.

I did try to git clone and build the latest version, but it says it wants go version 1.23, but I only have 1.22 (which I understand it's the latest one).
I'm completely new to linux and build, so I did my best googling through it but I'm stuck at the moment. I'll give it another try later.

Did someone managed to build a recent version for QNAP with x86_64 intel cpu (EG: i3-3220) in qpkg format with working web interface?

@salimhb
Copy link

salimhb commented Apr 30, 2024

The build should run in docker. I manage to run it and it creates packages for all CPUs.

sed -i -e  's/QTS_MINI_VERSION=".*"/QTS_MINI_VERSION="4.0.0"/' ./Tailscale/qpkg.cfg.in

make build-qdk-container
make pkg

@aith85
Copy link

aith85 commented May 1, 2024

Sorry but I'm not sure what you mean.
Should I build the qpkg from inside the docker with TS installed?
I have a Tailscale container running already, but I'd like to install Tailscale on the nas to have it accessible via a Tailscale IP (and not by routes).

@salimhb
Copy link

salimhb commented May 2, 2024

I'm running the compile on my desktop using docker and then simply installing the package in QNAP. When the build works, it generates Packages for all architectures. Which one do you need?

Tailscale_1.58.2-1_arm-x19.qpkg
Tailscale_1.58.2-1_arm-x19.qpkg.md5
Tailscale_1.58.2-1_arm-x31.qpkg
Tailscale_1.58.2-1_arm-x31.qpkg.md5
Tailscale_1.58.2-1_arm-x41.qpkg
Tailscale_1.58.2-1_arm-x41.qpkg.md5
Tailscale_1.58.2-1_arm_64.qpkg
Tailscale_1.58.2-1_arm_64.qpkg.md5
Tailscale_1.58.2-1_x86.qpkg
Tailscale_1.58.2-1_x86.qpkg.md5
Tailscale_1.58.2-1_x86_64.qpkg
Tailscale_1.58.2-1_x86_64.qpkg.md5
Tailscale_1.58.2-1_x86_64.zip
Tailscale_1.58.2-1_x86_ce53xx.qpkg
Tailscale_1.58.2-1_x86_ce53xx.qpkg.md5

@aith85
Copy link

aith85 commented May 2, 2024

x86_64 :)

@salimhb
Copy link

salimhb commented May 3, 2024

Alright, here's the file. I hope it works for you Tailscale_1.58.2-1_x86_64.zip

@aith85
Copy link

aith85 commented May 8, 2024

Thanks for helping @salimhb !

Unfortunately it's not working.
It installs on QTS4, but there's no app icon and no web interface.

I tried to remove the previous files before reinstalling, without luck.
Also tried to manually create the link to /ui (where index.cgi is) in my httpd cgi-bin folder.

Currently I'm using it through ssh, manually starting tailscaled after each boot (no autostart).
I'm not messing too much with it because there's people working on the nas and don't want to break things.

@salimhb
Copy link

salimhb commented May 8, 2024

I don't know what would be the issue here. Is there anything in the event logs?

@aith85
Copy link

aith85 commented May 8, 2024

Actually yes, didn't check before, sorry.

It keeps throwing the same error since I tried to install.

Severity Level	Date	Time	Users	Source IP	Application	Category	Content	
Error	08/05/2024	18:32:27	System	127.0.0.1	App Center	App Installation	[App Center] Failed to install Tailscale. Model does not support Tailscale.	
Error	08/05/2024	18:11:55	System	127.0.0.1	App Center	App Installation	[App Center] Failed to install Tailscale. Model does not support Tailscale.	
Error	08/05/2024	17:55:11	System	127.0.0.1	App Center	App Installation	[App Center] Failed to install Tailscale. Model does not support Tailscale.	

App center said the app was installed correctly and I didn't get any error from it, though the app is not listed in the App center. Not sure if a reboot will change anything (will try in the next days).
Tailscale folder under /share/.../.qpkg was created with all files, and it started correctly via SSH.

Nas is a TS-870 Pro with latest supported QTS 4.3.6.2665.

EDIT: Ok, I feel a bit stupid. In the past I've added myqnap.org repo to the App center, and Tailscale was showing there and not under QNAP Store. I tried to start the app and it's working, also with the web interface, though I'm not sure if the link under /home/httpd/cgi-bin/qpkg/ would have been created by the installer because I've created it manually.
Unfortunately, starting the app seems to have blocked local connections, so I'll do more testing later when nobody's at work.
I'll keep you updated.

EDIT2:

  • Uninstalled the app and checked all files were gone.
  • Removed qnap.org repo from app center.
  • Installed the app from your recompiled package, it showed app in app center normally and I was able to add it to desktop.
  • Disabled subnets from other nodes (which were messing up local connections, I guess).
  • sudo ./tailscale up --advertise-exit-node --advertise-routes=192.168.0.0/24 --accept-routes=false via SSH.

Working like a charm!

Thank you @salimhb !

@salimhb
Copy link

salimhb commented May 9, 2024

Nice that it finally worked :)
And yes, now that you mention it, I remember having to add these flags: --accept-routes=false and --accept-dns=false because I have a custom DNS configuration, which also is not working with QNAP. Exit node is also not working for me. Even if I enable it, it does not work when I use it 🤷

@aith85
Copy link

aith85 commented May 9, 2024

Exit node is working for me.
Too bad that you need to set those params via SSH with the NAS, it kinda nullifies the purpose of the app/web interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants