[GH-ISSUE #1977] [PULL REQUEST] Support for BIN install in Synology #3763

Closed
opened 2026-08-05 00:54:12 -04:00 by saavagebueno · 25 comments
Owner

Originally created by @zzecool on GitHub (May 13, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/1977

As im noob in Git i will throw the install script modification for Synology NAS.

I just updated my BIN install in my NAS using the modded script

image

You better check my code here and refine it if needed.
install.zip

Forgive my ignorance :D
At least it working :P

Originally created by @zzecool on GitHub (May 13, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/1977 As im noob in Git i will throw the install script modification for Synology NAS. I just updated my BIN install in my NAS using the modded script ![image](https://github.com/netbirdio/netbird/assets/2816897/4d06a255-3dba-4c84-a215-062527d9e6b3) You better check my code here and refine it if needed. [install.zip](https://github.com/netbirdio/netbird/files/15299602/install.zip) Forgive my ignorance :D At least it working :P
saavagebueno added the bug label 2026-08-05 00:54:12 -04:00
Author
Owner

@bcmmbaga commented on GitHub (May 14, 2024):

Hello @zzecool,

Thank you for bringing this to our attention. To better understand the current behavior when installing on Synology NAS, could you please execute the following command:

curl -fsSL https://pkgs.netbird.io/install.sh | USE_BIN_INSTALL=true sh

Once you've tried it, kindly share the results with us. Your feedback will help us ensure the installer works as expected.

<!-- gh-comment-id:2110079397 --> @bcmmbaga commented on GitHub (May 14, 2024): Hello @zzecool, Thank you for bringing this to our attention. To better understand the current behavior when installing on Synology NAS, could you please execute the following command: `curl -fsSL https://pkgs.netbird.io/install.sh | USE_BIN_INSTALL=true sh` Once you've tried it, kindly share the results with us. Your feedback will help us ensure the installer works as expected.
Author
Owner

@zzecool commented on GitHub (May 14, 2024):

Hi @bcmmbaga,

Here you are :

$ curl -fsSL https://pkgs.netbird.io/install.sh | USE_BIN_INSTALL=true sh
sh: line 352: /etc/os-release: No such file or directory

So you need to detect synology with other tricks.

<!-- gh-comment-id:2110096546 --> @zzecool commented on GitHub (May 14, 2024): Hi @bcmmbaga, Here you are : ``` $ curl -fsSL https://pkgs.netbird.io/install.sh | USE_BIN_INSTALL=true sh sh: line 352: /etc/os-release: No such file or directory ``` So you need to detect synology with other tricks.
Author
Owner

@bcmmbaga commented on GitHub (May 14, 2024):

Thanks, I will use your changes to make the installer work and then let you test it again

<!-- gh-comment-id:2110111156 --> @bcmmbaga commented on GitHub (May 14, 2024): Thanks, I will use your changes to make the installer work and then let you test it again
Author
Owner

@bcmmbaga commented on GitHub (May 14, 2024):

@zzecool, could you please uninstall the currently installed NetBird and test the installation again using the following command:

curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh

Additionally, please test updating the installed NetBird with the following command:

curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh -s -- --update
<!-- gh-comment-id:2110242759 --> @bcmmbaga commented on GitHub (May 14, 2024): @zzecool, could you please uninstall the currently installed NetBird and test the installation again using the following command: ```bash curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh ``` Additionally, please test updating the installed NetBird with the following command: ```bash curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh -s -- --update ```
Author
Owner

@zzecool commented on GitHub (May 14, 2024):

@bcmmbaga

$ curl -fsSL https://github.com/netbirdio/netbird/blob/fix-synology-installer/release_files/install.sh | sh
sh: line 7: syntax error near unexpected token `newline'
sh: line 7: `<!DOCTYPE html>'
curl: (23) Failure writing output to destination

<!-- gh-comment-id:2110260130 --> @zzecool commented on GitHub (May 14, 2024): @bcmmbaga ``` $ curl -fsSL https://github.com/netbirdio/netbird/blob/fix-synology-installer/release_files/install.sh | sh sh: line 7: syntax error near unexpected token `newline' sh: line 7: `<!DOCTYPE html>' curl: (23) Failure writing output to destination ```
Author
Owner

@zzecool commented on GitHub (May 14, 2024):

If i download and run :

$ ./install_synology.sh 
Installing netbird from https://github.com/netbirdio/netbird/releases/download/v0.27.6/netbird_0.27.6_linux_amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 10.3M  100 10.3M    0     0  7000k      0  0:00:01  0:00:01 --:--:-- 11.5M
LICENSE
tar: LICENSE: Cannot open: File exists
README.md
tar: README.md: Cannot open: File exists
netbird
tar: Exiting with failure status due to previous errors

Seem the script leaves leftovers at tmp ?

<!-- gh-comment-id:2110266781 --> @zzecool commented on GitHub (May 14, 2024): If i download and run : ``` $ ./install_synology.sh Installing netbird from https://github.com/netbirdio/netbird/releases/download/v0.27.6/netbird_0.27.6_linux_amd64.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 10.3M 100 10.3M 0 0 7000k 0 0:00:01 0:00:01 --:--:-- 11.5M LICENSE tar: LICENSE: Cannot open: File exists README.md tar: README.md: Cannot open: File exists netbird tar: Exiting with failure status due to previous errors ``` Seem the script leaves leftovers at tmp ?
Author
Owner

@bcmmbaga commented on GitHub (May 14, 2024):

@bcmmbaga

$ curl -fsSL https://github.com/netbirdio/netbird/blob/fix-synology-installer/release_files/install.sh | sh
sh: line 7: syntax error near unexpected token `newline'
sh: line 7: `<!DOCTYPE html>'
curl: (23) Failure writing output to destination

You test again with updated URL's

curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh
curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh -s -- --update
<!-- gh-comment-id:2110266813 --> @bcmmbaga commented on GitHub (May 14, 2024): > @bcmmbaga > > ``` > $ curl -fsSL https://github.com/netbirdio/netbird/blob/fix-synology-installer/release_files/install.sh | sh > sh: line 7: syntax error near unexpected token `newline' > sh: line 7: `<!DOCTYPE html>' > curl: (23) Failure writing output to destination > ``` You test again with updated URL's ```bash curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh ``` ```bash curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh -s -- --update ```
Author
Owner

@zzecool commented on GitHub (May 14, 2024):

After Manuualy clearing the /tmp

$ curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh
Installing netbird from https://github.com/netbirdio/netbird/releases/download/v0.27.6/netbird_0.27.6_linux_amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 10.3M  100 10.3M    0     0  7339k      0  0:00:01  0:00:01 --:--:-- 26.2M
LICENSE
README.md
netbird
Installing netbird-ui from https://github.com/netbirdio/netbird/releases/download/v0.27.6/netbird-ui-linux_0.27.6_linux_amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 9951k  100 9951k    0     0  7161k      0  0:00:01  0:00:01 --:--:-- 23.9M
LICENSE
README.md
netbird-ui
Netbird service has been installed
Netbird service has been started
Installation has been finished. To connect, you need to run NetBird by executing the following command:

netbird up
$ curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh -s -- --update
Installed NetBird version (0.27.6) is up-to-date

What does the netbird-ui do actually ? I think for Synology we must skip UI

<!-- gh-comment-id:2110276068 --> @zzecool commented on GitHub (May 14, 2024): After Manuualy clearing the /tmp ``` $ curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh Installing netbird from https://github.com/netbirdio/netbird/releases/download/v0.27.6/netbird_0.27.6_linux_amd64.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 10.3M 100 10.3M 0 0 7339k 0 0:00:01 0:00:01 --:--:-- 26.2M LICENSE README.md netbird Installing netbird-ui from https://github.com/netbirdio/netbird/releases/download/v0.27.6/netbird-ui-linux_0.27.6_linux_amd64.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 9951k 100 9951k 0 0 7161k 0 0:00:01 0:00:01 --:--:-- 23.9M LICENSE README.md netbird-ui Netbird service has been installed Netbird service has been started Installation has been finished. To connect, you need to run NetBird by executing the following command: netbird up ``` ``` $ curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh -s -- --update Installed NetBird version (0.27.6) is up-to-date ``` What does the netbird-ui do actually ? I think for Synology we must skip UI
Author
Owner

@bcmmbaga commented on GitHub (May 14, 2024):

I have pushed the changes to complete skip installing UI on Synalogy

<!-- gh-comment-id:2110286635 --> @bcmmbaga commented on GitHub (May 14, 2024): I have pushed the changes to complete skip installing UI on Synalogy
Author
Owner

@pcfriek1987 commented on GitHub (May 14, 2024):

Can I use zzecool's latest command if I want to test it on mine?

<!-- gh-comment-id:2110316074 --> @pcfriek1987 commented on GitHub (May 14, 2024): Can I use zzecool's latest command if I want to test it on mine?
Author
Owner

@bcmmbaga commented on GitHub (May 14, 2024):

Can I use zzecool's latest command if I want to test it on mine?

Yes, you can use the commands

<!-- gh-comment-id:2110318496 --> @bcmmbaga commented on GitHub (May 14, 2024): > Can I use zzecool's latest command if I want to test it on mine? Yes, you can use the commands
Author
Owner

@potatoru commented on GitHub (May 15, 2024):

Tested with DSM 7

curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh


LICENSE
README.md
netbird
Netbird service has been installed
Netbird service has been started
Installation has been finished. To connect, you need to run NetBird by executing the following command:

netbird up

I was successfully added my nas to netbird console, but I got error trying do netbird up

Error: unable to get daemon status: rpc error: code = Unknown desc = new wg interface: couldn't check or load tun module

Found an old script in my snippets

#!/bin/sh

# Create the necessary file structure for /dev/net/tun
if ( [ ! -c /dev/net/tun ] ); then
  if ( [ ! -d /dev/net ] ); then
    mkdir -m 755 /dev/net
  fi
  mknod /dev/net/tun c 10 200
  chmod 0755 /dev/net/tun
fi

# Load the tun module if not already loaded
if ( !(lsmod | grep -q "^tun\s") ); then
  insmod /lib/modules/tun.ko
fi

run it and now it works

<!-- gh-comment-id:2111539681 --> @potatoru commented on GitHub (May 15, 2024): Tested with DSM 7 ``` curl -fsSL https://raw.githubusercontent.com/netbirdio/netbird/fix-synology-installer/release_files/install.sh | sh LICENSE README.md netbird Netbird service has been installed Netbird service has been started Installation has been finished. To connect, you need to run NetBird by executing the following command: netbird up ``` I was successfully added my nas to netbird console, but I got error trying do `netbird up` ``` Error: unable to get daemon status: rpc error: code = Unknown desc = new wg interface: couldn't check or load tun module ``` Found an old script in my snippets ``` #!/bin/sh # Create the necessary file structure for /dev/net/tun if ( [ ! -c /dev/net/tun ] ); then if ( [ ! -d /dev/net ] ); then mkdir -m 755 /dev/net fi mknod /dev/net/tun c 10 200 chmod 0755 /dev/net/tun fi # Load the tun module if not already loaded if ( !(lsmod | grep -q "^tun\s") ); then insmod /lib/modules/tun.ko fi ``` run it and now it works
Author
Owner

@pcfriek1987 commented on GitHub (May 15, 2024):

Isn't that the code tailscale also uses? The below script that is.

<!-- gh-comment-id:2111927644 --> @pcfriek1987 commented on GitHub (May 15, 2024): Isn't that the code tailscale also uses? The below script that is.
Author
Owner

@pcfriek1987 commented on GitHub (May 15, 2024):

I see it was just merged in main, can we use the main installer now as well then?

<!-- gh-comment-id:2112941283 --> @pcfriek1987 commented on GitHub (May 15, 2024): I see it was just merged in main, can we use the main installer now as well then?
Author
Owner

@zzecool commented on GitHub (May 15, 2024):

I see it was just merged in main, can we use the main installer now as well then?

Nope its not released yet

image

install.sh is not updated.

<!-- gh-comment-id:2112951742 --> @zzecool commented on GitHub (May 15, 2024): > I see it was just merged in main, can we use the main installer now as well then? Nope its not released yet ![image](https://github.com/netbirdio/netbird/assets/2816897/79744108-7a6c-47a7-95ab-85ba7be060cb) install.sh is not updated.
Author
Owner

@mlsmaycon commented on GitHub (May 15, 2024):

It will be in our next release, for now you can use the https://raw.githubusercontent.com/netbirdio/netbird/main/release_files/install.sh URL.

<!-- gh-comment-id:2112957943 --> @mlsmaycon commented on GitHub (May 15, 2024): It will be in our next release, for now you can use the https://raw.githubusercontent.com/netbirdio/netbird/main/release_files/install.sh URL.
Author
Owner

@pcfriek1987 commented on GitHub (May 15, 2024):

Cool, I was just about to comment how to install it now since the fix branch was deleted :) let's see how it holds up to Tailscale, as i do not really like how they do acl's and that selfhosting is more difficult :)

<!-- gh-comment-id:2112961637 --> @pcfriek1987 commented on GitHub (May 15, 2024): Cool, I was just about to comment how to install it now since the fix branch was deleted :) let's see how it holds up to Tailscale, as i do not really like how they do acl's and that selfhosting is more difficult :)
Author
Owner

@zzecool commented on GitHub (May 15, 2024):

Thats only the first step though for Synology as it will only provide you access on the machine.

If you want to use it as an Exit Node - Or enable Routes to access the local network, then the client needs more work.

Please join me on the other issues that im describing.

Synlogy Exit node + Routes : https://github.com/netbirdio/netbird/issues/1976

Synology Internal Netbird Hostname DNS resolve : https://github.com/netbirdio/netbird/issues/1983

Fingers crossed for full Synology support.

<!-- gh-comment-id:2113166390 --> @zzecool commented on GitHub (May 15, 2024): Thats only the first step though for Synology as it will only provide you access on the machine. If you want to use it as an Exit Node - Or enable Routes to access the local network, then the client needs more work. Please join me on the other issues that im describing. Synlogy Exit node + Routes : https://github.com/netbirdio/netbird/issues/1976 Synology Internal Netbird Hostname DNS resolve : https://github.com/netbirdio/netbird/issues/1983 Fingers crossed for full Synology support.
Author
Owner

@pcfriek1987 commented on GitHub (May 15, 2024):

I can do so, currently still fighting with the admin panel for my free account, i got peers and documentation and thats it :)

<!-- gh-comment-id:2113171142 --> @pcfriek1987 commented on GitHub (May 15, 2024): I can do so, currently still fighting with the admin panel for my free account, i got peers and documentation and thats it :)
Author
Owner

@mlsmaycon commented on GitHub (May 22, 2024):

@pcfriek1987 if you are still facing the issue, please send us an email at support@netbird.io with your user email.

<!-- gh-comment-id:2125039536 --> @mlsmaycon commented on GitHub (May 22, 2024): @pcfriek1987 if you are still facing the issue, please send us an email at support@netbird.io with your user email.
Author
Owner

@mlsmaycon commented on GitHub (May 22, 2024):

closing this one as completed.

<!-- gh-comment-id:2125041713 --> @mlsmaycon commented on GitHub (May 22, 2024): closing this one as completed.
Author
Owner

@Stunt0265 commented on GitHub (Jul 22, 2024):

I have it successfully install, but what's the correct update method with newer versions?

<!-- gh-comment-id:2243941004 --> @Stunt0265 commented on GitHub (Jul 22, 2024): I have it successfully install, but what's the correct update method with newer versions?
Author
Owner

@zzecool commented on GitHub (Jul 23, 2024):

I have it successfully install, but what's the correct update method with newer versions?

add the --update switch

<!-- gh-comment-id:2245441531 --> @zzecool commented on GitHub (Jul 23, 2024): > I have it successfully install, but what's the correct update method with newer versions? add the --update switch
Author
Owner

@Stunt0265 commented on GitHub (Jul 23, 2024):

Thanks. That worked, but now getting this error:

Management: Disconnected, reason: new wg interface: couldn't check or load tun module
Signal: Disconnected, reason: new wg interface: couldn't check or load tun module

*update - testing another Synology NAS, and after a reboot - as in the original NAS, I'm seeing the same error:

Error: status failed: new wg interface: couldn't check or load tun module

<!-- gh-comment-id:2245674273 --> @Stunt0265 commented on GitHub (Jul 23, 2024): Thanks. That worked, but now getting this error: Management: Disconnected, reason: new wg interface: couldn't check or load tun module Signal: Disconnected, reason: new wg interface: couldn't check or load tun module *update - testing another Synology NAS, and after a reboot - as in the original NAS, I'm seeing the same error: Error: status failed: new wg interface: couldn't check or load tun module
Author
Owner

@Stunt0265 commented on GitHub (Jul 23, 2024):

I added the script referenced above as a startup script, and now things are working.

#!/bin/sh

Create the necessary file structure for /dev/net/tun

if ( [ ! -c /dev/net/tun ] ); then
if ( [ ! -d /dev/net ] ); then
mkdir -m 755 /dev/net
fi
mknod /dev/net/tun c 10 200
chmod 0755 /dev/net/tun
fi

Load the tun module if not already loaded

if ( !(lsmod | grep -q "^tun\s") ); then
insmod /lib/modules/tun.ko
fi

<!-- gh-comment-id:2246111308 --> @Stunt0265 commented on GitHub (Jul 23, 2024): I added the script referenced above as a startup script, and now things are working. #!/bin/sh # Create the necessary file structure for /dev/net/tun if ( [ ! -c /dev/net/tun ] ); then if ( [ ! -d /dev/net ] ); then mkdir -m 755 /dev/net fi mknod /dev/net/tun c 10 200 chmod 0755 /dev/net/tun fi # Load the tun module if not already loaded if ( !(lsmod | grep -q "^tun\s") ); then insmod /lib/modules/tun.ko fi
Sign in to join this conversation.
No Label bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#3763