I based this post on HERE


Just for reference, the things I did to make it work:

git clone https://github.com/tailscale/tailscale-android.git

nano tailscale-android/cmd/tailscale/backend.go

change:

func (b *backend) Start(notify func(n ipn.Notify)) error {
	b.backend.SetNotifyCallback(notify)
	return b.backend.Start(ipn.Options{
	    StateKey: "ipn-android",
    })
}

to:

func (b *backend) Start(notify func(n ipn.Notify)) error {
    b.backend.SetNotifyCallback(notify)
    prefs := ipn.NewPrefs()
    prefs.ControlURL = "https://myheadscale.domain.com"
    opts := ipn.Options{
    StateKey: "ipn-android",
        UpdatePrefs: prefs,
    }
    return b.backend.Start(opts)
}

nano Dockerfile

Add the below to the file:

ARG GO_VERSION=1.17.1

and comment out or change the sha256sum to the 1.17.1 one with #

make dockershell

in the new docker:

make tailscale-debug.apk


I have never had to do this, but I just did this for the first time 20220319

you get the error: compile: version “go1.17.1” does not match go tool version “go1.17.1-ts097d128”

manual run these commands:

go run gioui.org/cmd/gogio -buildmode archive -target android -appid com.tailscale.ipn -o android/libs/ipn.aar github.com/tailscale/tailscale-android/cmd/tailscale

(cd android && ./gradlew assemblePlayDebug) mv android/build/outputs/apk/play/debug/android-play-debug.apk tailscale-debug.apk

Copy the the apk to your mobile

Sign in with “other” and register the device, by inputing the provided command on the headscale server. I copied that command using my linx-server paste function.

Done