What's new

Tutorial **Tailscale On Merlin**

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I guess I will have to go brute force on a total Router Reset and a USB Disk Format and try again.
Ok I’m trying this in two parts:
1. Format the USB SSD but leave router the same and
2. Reset the router completely and the USB.

I’ve done 1, I used amtm option 2 to remove entware, reset amtm etc. Then I used amtm to completely reformat the SSD, EXT4 with journaling, reinstalld entware, diversion, MerlinAU and a couple of other minor scripts.

Then I tried Colin’s Tailscale install again; exactiy the same issue.
Tomorrow I will try option 2, but so far for me, it’s not working ‘out of the box’ unfortunately. I’d love some others with RT-AX86u to try.
 
Tomorrow I will try option 2, but so far for me, it’s not working ‘out of the box’ unfortunately. I’d love some others with RT-AX86u to try.
I haven't tried Colin's way yet (sounded a bit too good to be true to be honest) but I have a sneaking feeling that you will get the same outcome even with a full reset from my experience with the other methods suggested here. I am very glad that more and more people appear to be interested in this now.

Before I dive into trying @JA93 's method, are you able to kindly share the error you have encountered and where you got stuck before I go ahead and reset the whole thing again and go through this process once more?
 
I haven't tried Colin's way yet (sounded a bit too good to be true to be honest) but I have a sneaking feeling that you will get the same outcome even with a full reset from my experience with the other methods suggested here. I am very glad that more and more people appear to be interested in this now.

Before I dive into trying @JA93 's method, are you able to kindly share the error you have encountered and where you got stuck before I go ahead and reset the whole thing again and go through this process once more?
Was hoping you’d give it a whirl and add a data point 👍. My gut feeling is you are correct to be wary, given your trial results and feedback thus far.

Do you mean the error using the most recent JA93 update or Colin’s out of the box approach? The latter is detailed above but I didn’t capture JA93’s method as shortly after the JA93 trial I formatted my USB and went through the whole entware install again, followed by another unsuccessful go at Colin’s approach.

If you like, before I totally reset my Router AND format the USB again (maybe later today) I can try JA93s method again to recreate the error.
 
Last edited:
I literally went through the same "stay-within-the-guardrails" steps/thought process that @ColinTaylor suggested. I didn't seem to have any problems either... it seemed very straightforward. Here's what I did:

1. opkg update
2. opkg install tailscale
3. tailscale update
4. added this line to the /opt/etc/init.d/S06tailscaled file: ARGS="--tun=userspace-networking --statedir=/opt/var/tailscale/ --state=/opt/var/tailscale/tailscaled.state"
5. /opt/etc/init.d/S06tailscaled start (this was where I was trying to figure out what needs to be done to make sure it runs as a service automatically, or if I need to add something so it can survive a reboot)
6. tailscale up --accept-routes --advertise-routes=192.168.50.0/24 (and follow the link it generates)

Mind you... this is on a GT-AX6000... aarch64. I'll give it a shot on my RT-AX88U tonight.
 
Last edited:
I literally went through the same "out-of-the-box" steps/thought process that @ColinTaylor suggested. I didn't seem to have any problems either... it seemed very straightforward. Here's what I did:

1. opkg update
2. opkg install tailscale
3. tailscale update
4. added this line to the /opt/etc/init.d/S06tailscaled file: ARGS="--tun=userspace-networking --statedir=/opt/var/tailscale/ --state=/opt/var/tailscaled.state"
5. /opt/etc/init.d/S06tailscaled start (this was where I was trying to figure out what needs to be done to make sure it runs as a service automatically, or if I need to add something so it can survive a reboot)
6. tailscale up --advertise-routes=192.168.50.0/24 (and follow the link it generates)

Mind you... this is on a GT-AX6000... aarch64
Great to know, thank you!

Step 4 isn’t quite out of the box though? At least not according to Colin’s steps here. Maybe that’s the missing ingredient which marries RandomUser777’s approach with Colin’s.

Aiadi’s Router is the same as yours.

Also in that link in step 5 you refer to some entries in your services-start script which were in the original install instructions from RandomUser777 but are not included in Colin’s. Did you remove these or leave them in place?

ETA: Also, I forgot to make sure to mention that these entries are also in my services-start script:
-------
/opt/etc/init.d/S06tailscaled start
tailscale up --accept-routes --advertise-routes=192.168.50.0/24
Sorry to be so picky but it is possible these very small changes make all the difference between success and yet another frustrating trial.
 
Last edited:
Great to know, thank you!

Step 4 isn’t quite out of the box though? At least not according to Colin’s steps here. Maybe that’s the missing ingredient which marries RandomUser777’s approach with Colin’s.

Aiadi’s Router is the same as yours.
I was following steps from various sources... but in the end, what I listed is the path I went down. ;)
 
If you like, before I totally reset my Router AND format the USB again (maybe later today) I can try JA93s method again to recreate the error.
Many thanks indeed for this generous offer. Don't worry as I might try it myself as soon as I have some time (and as family would allow me before getting me murdered due to all the resets and reboots involved!).

Here's what I did:
Many thanks indeed Viktor for your input. Can you please shed a bit more light on step 4 and where you have actually added this line (a screenshot would be greatly appreciated)? Also is this change and the new line in question what actually makes the service start automatically and survive a reboot or does it have any other role in this process? Thank you again for your help.
 
Many thanks indeed Viktor for your input. Can you please shed a bit more light on step 4 and where you have actually added this line (a screenshot would be greatly appreciated)? Also is this change and the new line in question what actually makes the service start automatically and survive a reboot or does it have any other role in this process? Thank you again for your help.
These additions seemed to be recommended arguments to include in order to allow the router to see the local network and know where to look for state files. @ColinTaylor didn't add anything, and he seemed to have success as well. So who knows, right? :) But no, this does not help survive a reboot. Supposedly if you reboot your router automatically, it would start up (I have not tried that yet)... or adding the command: /opt/etc/init.d/S06tailscaled start to your services-start file may do the trick as well (also not tested yet).

Here's a screenshot of my /opt/etc/init.d/S06tailscaled file:

1713488424698.png
 
Last edited:
I was following steps from various sources... but in the end, what I listed is the path I went down. ;)
Great! It is the difference between following the steps exactly and generally (with some amendments), I don’t mind as long as it is clear.

Your step 4 ARGS reference to "--tun=userspace-networking" was a huge flag to me, due to errors and references to it summarised in the last few lines of my post above.

Ultimately though, if this were ever to make its way into amtm, the steps (whatever form they take), would need to be successful and stable. I’d be interested to hear from Colin if his install remained on and stable the whole time, after a while, just left alone. It may well be, it’s just not been my experience.
 
Last edited:
Also in that link in step 5 you refer to some entries in your services-start script which were in the original install instructions from RandomUser777 but are not included in Colin’s. Did you remove these or leave them in place?

Sorry to be so picky but it is possible these very small changes make all the difference between success and yet another frustrating trial.
I would probably try adding:

/opt/etc/init.d/S06tailscaled start

But would not include:
tailscale up --accept-routes --advertise-routes=192.168.50.0/24

...because this would generate another one of those verification URLs... perhaps just:

tailscale up

But totally guessing... it may not even be needed.... totally not tested. :)
 
I would probably try adding:

/opt/etc/init.d/S06tailscaled start

But would not include:
tailscale up --accept-routes --advertise-routes=192.168.50.0/24

...because this would generate another one of those verification URLs... perhaps just:

tailscale up

But totally guessing... it may not even be needed.... totally not tested. :)
You can safely run tailscale up --xxx --advertise-routes=xxx (at least not generating new link for me)
but if you do not include all flags you run the last time example:
tailscale up --accept-routes --advertise-routes=192.168.50.0/24 --advertise-exit-node
next time you run

tailscale up --accept-routes --advertise-routes=192.168.50.0/24
You will get an error, so to fix it just run:
tailscale up --accept-routes --advertise-routes=192.168.50.0/24 --reset (you will turn off exit node;or whatever other flag you didnt include)

@jksmurf @Aiadi Main issue for troubleshooting is that I do not have arm64 Merlin, and w/o logs I can't help much.
 
Last edited:
@jksmurf @Aiadi Main issue for troubleshooting is that I do not have arm64 Merlin, and w/o logs I can't help much.
Understood, just to be totally open about it, I'm drowning a bit in the testing of this Tailscale install using the various approaches (RandomUser777, you, ColinTaylor, Viktor...) at the moment but if ColinTaylor's approach can be made to work then as it is built into entware, it becomes the preferred approach as it will be updated as entware is updated (and get into amtm).

Can I say for now I will just hold off on your implementation until the dust settles. Thanks a lot 👍!
 
Just catching up on these threads. I am so glad to see this level of interest!!!

My install has been running flawlessly. I have had to factory reset a few times (nothing to do with tailscale, rather testing some other things), and been able to successfully install using the CLI commands. Thanks to all who have tweaked them.

For those interested, once the binaries have been installed and updated (per the CLI commands already shared), and the one edit in the /opt/etc/init.d/S06tailscaled file (ARGS="-tun=userspace-networking -statedir /mnt/entware/tailscale/")

the only additional commands I have added (to services-start) are:

/opt/etc/init.d/S06tailscaled start
tailscale up --accept-routes --advertise-routes=192.168.50.0/24

and it works like a dream after any restart or reboot.

Looking forward to trying out the scripts being developed.
 
the only additional commands I have added (to services-start) are:

/opt/etc/init.d/S06tailscaled start
tailscale up --accept-routes --advertise-routes=192.168.50.0/24

and it works like a dream after any restart or reboot.
Yep, you're right (and @JA93)... running that tailscale up --accept-routes --advertise-routes=192.168.50.0/24 command with the additional flags doesn't generate another URL... seems that once it's configured the first time, that you can keep running it.

I'm just wondering what the difference is between running that statement, and just running tailscale up would be... they both seem to work. It seems to assume those flags if the host had already been setup.

And the other crazy thing is that my tailscale will autostart without putting anything in my services-start. Not sure how it's doing this... but it works.
 
Last edited:
Yep, you're right (and @JA93)... running that tailscale up --accept-routes --advertise-routes=192.168.50.0/24 command with the additional flags doesn't generate another URL... seems that once it's configured the first time, that you can keep running it.

I'm just wondering what the difference is between running that statement, and just running tailscale up would be... they both seem to work. It seems to assume those flags if the host had already been setup.

And the other crazy thing is that my tailscale will autostart without putting anything in my services-start. Not sure how it's doing this... but it works.
Yeah, after you setup everything you only need to run tailscale up or down afterwards
After opkg install tailscale_nohf I need to start manually S06tailscaled otherwise I cant execute tailscale up, same goes for my own updated version. I'm not sure if entware dropped support for armv7sf-k2.6...
It auto-starts after reboot for me too straight out of box, although some people are still having issues for some unknown reason
 
@Aiadi @jksmurf @kuki68ster
Okay I found what was the issue. Follow my steps:
opkg update
opkg install entware-opt
opkg status entware-opt #confirm its installed
opkg install ca-bundle
opkg install tailscale (or version you downloaded)
/opt/etc/init.d/S06tailscaled start
tailscale up #authorize
reboot #after reboot, it should be up and running
 
Last edited:
...
And the other crazy thing is that my tailscale will autostart without putting anything in my services-start. Not sure how it's doing this... but it works.

...
It auto-starts after reboot for me too straight out of box, although some people are still having issues for some unknown reason

If the router is running RMerlin's F/W and you have installed Entware successfully using AMTM then you should have the following line in your "/jffs/scripts/post-mount" script:
Bash:
. /jffs/addons/amtm/mount-entware.mod # Added by amtm
The above line ensures that all installed Entware services are started during reboot after the USB drive partition where Entware was installed is mounted. This assumes, of course, that the script starting the specific service (e.g. "/opt/etc/init.d/S06tailscaled") follows the expected structure & format to work with the Entware services startup process.

If one does not have the above line in the "post-mount" script it would indicate that Entware was not installed via AMTM, or perhaps it was not installed successfully or completely for some reason.

If the above line is present in the "post-mount" script but the service is not started during reboot, it's likely that something in the service script is not properly set up as expected or a dependency is missing so the service fails when called by the Entware startup process.

Note that adding a call to start up an Entware service in the "services-start" script is generally not a good idea because there's no guarantee that the USB drive partition where Entware is installed has already been mounted *before* the "services-start" is executed. Entware services should be started from the "post-mount" script (or from another script executed within it).

Just my 2 cents.
 
If the router is running RMerlin's F/W and you have installed Entware successfully using AMTM then you should have the following line in your "/jffs/scripts/post-mount" script:
Bash:
. /jffs/addons/amtm/mount-entware.mod # Added by amtm
The above line ensures that all installed Entware services are started during reboot after the USB drive partition where Entware was installed is mounted. This assumes, of course, that the script starting the specific service (e.g. "/opt/etc/init.d/S06tailscaled") follows the expected structure & format to work with the Entware services startup process.

If one does not have the above line in the "post-mount" script it would indicate that Entware was not installed via AMTM, or perhaps it was not installed successfully or completely for some reason.

If the above line is present in the "post-mount" script but the service is not started during reboot, it's likely that something in the service script is not properly set up as expected or a dependency is missing so the service fails when called by the Entware startup process.

Note that adding a call to start up an Entware service in the "services-start" script is generally not a good idea because there's no guarantee that the USB drive partition where Entware is installed has already been mounted *before* the "services-start" is executed. Entware services should be started from the "post-mount" script (or from another script executed within it).

Just my 2 cents.
Thank you 🙏. Hopefully @ColinTaylor and maybe @Viktor Jaep will be along presently to add some commentary on from their recent trials installing Tailscale via the current entware package for it👍🏼.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top