Skip to content

Instantly share code, notes, and snippets.

@shayne
Last active June 9, 2023 16:02
Show Gist options
  • Save shayne/25e194e068751e281937ef68edefb99b to your computer and use it in GitHub Desktop.
Save shayne/25e194e068751e281937ef68edefb99b to your computer and use it in GitHub Desktop.
Tailscale Unraid Setup
########################################################################
#### DEPRECATED in favor of https://github.com/deasmi/unraid-tailscale
########################################################################
# /boot/config/go
# add the following...
# Tailscale
bash /boot/config/tailscale/install.sh
bash /boot/config/tailscale/start.sh
#!/bin/bash
# /boot/config/tailscale/install.sh
tar -xf /boot/config/tailscale/tailscale_static.tgz -C /usr/bin/ --strip-components=1 --no-anchored tailscale
tar -xf /boot/config/tailscale/tailscale_static.tgz -C /usr/sbin/ --strip-components=1 --no-anchored tailscaled
#!/bin/bash
# /boot/config/tailscale/start.sh
exec >/tmp/tailscaled.log 2>&1
setsid /usr/sbin/tailscaled -statedir=/boot/config/tailscale/ &
#!/bin/bash
set -x
# check latest version against what's installed
VER=$(curl -sL https://api.github.com/repos/tailscale/tailscale/releases/latest | jq -r ".tag_name" | cut -c 2-)
if [ "$VER" = "$(tailscale version | head -n1)" ]; then
echo "$VER already installed, exiting..."
exit 0
fi
# download latest version, restart daemon
curl -fsSL -o /boot/config/tailscale/tailscale_static.tgz "https://pkgs.tailscale.com/stable/tailscale_${VER}_amd64.tgz"
if [ $? -eq 0 ]; then
pkill tailscaled
sleep 1
/usr/sbin/tailscaled -cleanup
bash /boot/config/tailscale/install.sh
bash /boot/config/tailscale/start.sh
fi
@tmchow
Copy link

tmchow commented Jan 3, 2023

@SC8198 does the folder /boot/config/tailscale/ exist?

@SC8198
Copy link

SC8198 commented Jan 3, 2023

Wow, I feel dumb.

Made the directory and it grabbed it,
It looks like it didn't make the install.sh and the start.sh files.

When I run the Unraid set up script I get

bash: /boot/config/tailscale/install.sh: No such file or directory bash: /boot/config/tailscale/start.sh: No such file or directory

Do I have to manually make those files?

I do see tailscale and tailscaled in the correct folders

@tmchow
Copy link

tmchow commented Jan 3, 2023

@SC8198

Do I have to manually make those files?

yes you have to make those files. The files are at the top of the gist.

@SC8198
Copy link

SC8198 commented Jan 3, 2023

Nevermind I got the interface up. All good to go!

@mygrexit
Copy link

Sorry if that is the wrong place to ask but I am hoping that you might have the answer. Until yesterday, i was able to reach all the my docker apps/containers locally via the tailscale ip or the forwarded route (unraid local IP) and the corresponding port. However, today, apps that do not allow internet access (like sabnzbd) are locking me out like I am connecting from the internet.

Do you have any idea what could cause that? Thanks in advance.

@shayne
Copy link
Author

shayne commented Apr 29, 2023

Everyone should switch to using

https://github.com/dkaser/unraid-tailscale
😄

Edit: fixed link

@jozefKruszynski
Copy link

I moved away from the docker tailscale specifically because I once turned off docker in the unraid settings and was locked out until I got home a few days later.
I'm now using this tailscale plugin for unraid instead
https://forums.unraid.net/topic/136889-plugin-tailscale/

@dkaser
Copy link

dkaser commented Jun 9, 2023

I think @shayne meant https://github.com/dkaser/unraid-tailscale

That’s the plug-in :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment