Synology DSM Customization: Unlocking the Potential of NAS
About
As you know, Synology NAS devices are based on the Linux kernel, but they have some function limitations that make installing applications not as easy as using package management systems likeapt
,yum
, ordnf
. Also, commands likeusermod
andgroupadd
don't actually exist on Synology NAS.
Sudo without Password (Option)
- Eable SSH on Synology
- Remove the need to enter a password each time
sudo
is used.
Log in to Synology DSM usingssh
with an account that hassudo
permissions.
sudo tee /etc/sudoers.d/$(USER) <<< '$(USER) ALL=(ALL) NOPASSWD: ALL'
$(USER) is the current username, which is up to you.
- Update the permission to read-only.
sudo chmod 400 /etc/sudoers.d/$(USER)
Install Entware on Synology DSM
Entware has been adapted for Synology's DSM as a software repository.
- Create a folder on your HDD
mkdir -p /volume1/@Entware/opt
- Remove
/opt
and mount the Optware folder.
Make sure that the/opt
folder is empty (Optware is not installed). Remove the/opt
folder with its contents in this step.
rm -rf /opt
mkdir /opt
mount -o bind "/volume1/@Entware/opt" /opt
Note: If the bind
command doesn't work, try creating a link instead:
ln -s /volume1/@Entware/opt/ /opt
- Run the installation script depending on the processor (
uname -m
to know).
for armv8 (aarch64) - Realtek RTD129x
wget -O - https://bin.entware.net/aarch64-k3.10/installer/generic.sh | /bin/sh
for armv5
wget -O - https://bin.entware.net/armv5sf-k3.2/installer/generic.sh | /bin/sh
wget -O - https://bin.entware.net/armv7sf-k3.2/installer/generic.sh | /bin/sh
for x64
for armv7
wget -O - https://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh
- Create Autostart Task
Create a triggered user-defined task in Task Scheduler.
Goto: DSM > Control Panel > Task Scheduler
Create > Triggered Task > User Defined Script
General
Task: Entware
User: root
Event: Boot-up
Pretask: none
Task Settings
Run Command: (as bellow)
#!/bin/sh
# Mount/Start Entware
mkdir -p /opt
mount -o bind "/volume1/@Entware/opt" /opt
/opt/etc/init.d/rc.unslung start
# Add Entware Profile in Global Profile
if grep -qF '/opt/etc/profile' /etc/profile; then
echo "Confirmed: Entware Profile in Global Profile"
else
echo "Adding: Entware Profile in Global Profile"
cat >> /etc/profile <<"EOF"
# Load Entware Profile
[ -r "/opt/etc/profile" ] && . /opt/etc/profile
EOF
fi
# Update Entware List
/opt/bin/opkg update
- Reboot your NAS.
Install Packages
Install all the packages through opkg
sudo opkg install git git-http wget curl tree iperf3
This installs Git, Git over HTTP, wget, curl, tree, and iperf3 packages using the opkg
package manager with superuser privileges.
Manage Docker Without Using Sudo
Manage Docker on Synology NAS viassh
without requiringsudo
.
- Create a new user group called
docker
.
sudo synogroup --add docker
- Add the user you want to use to this group
sudo synogroup --member docker $USER
- Change the ownership of the
docker.sock
file.
sudo chown root:docker /var/run/docker.sock
Once have completed these steps, log out and back in again to ensure the changes take effect.
Install VIM-PLUG on Synology DSM
- Download
plug.vim
and put it in the "autoload" directory.
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- Add a vim-plug section to your
~/.vimrc
.
cat >> ~/.vimrc << EOF
call plug#begin()
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-commentary'
Plug 'scrooloose/nerdtree'
Plug 'joshdick/onedark.vim'
call plug#end()
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Keyboard mapping to toggle the nerdtree file explorer.
nnoremap <F5> :exec 'NERDTreeToggle' <CR>
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable syntax highlighting
syntax enable
" Set colorscheme
set background=dark
" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8
" Use Unix as the standard file type
set ffs=unix,dos,mac
" Enable status bar color
set t_Co=256
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim Airline themes
let g:airline_powerline_fonts=1
let g:airline#extensions#tabline#enabled=1
" Vim Cpp Highlight
let g:cpp_class_scope_highlight=1
let g:cpp_member_variable_highlight=1
let g:cpp_experimental_simple_template_highlight=1
let g:cpp_concepts_highlight=1
EOF
- Reload
.vimrc
and install plugins.
Open vi editor
:PlugInstall
Commands
Command | Description |
---|---|
PlugInstall [name ...] [#threads] | Install plugins |
PlugUpdate [name ...] [#threads] | Install or update plugins |
PlugClean[!] | Remove unlisted plugins (bang version will clean without prompt) |
PlugUpgrade | Upgrade vim-plug itself |
PlugStatus | Check the status of plugins |
PlugDiff | Examine changes from the previous update and the pending changes |
PlugSnapshot[!] [output path] | Generate script for restoring the current snapshot of the plugins |
Conclusion
Entware
, managing Docker without requiringsudo
, and installing packages usingopkg
. This is a useful for users looking to customize on Synology NAS devices.
Highly descriptive blog, I loved that a lot. Will there be a part 2?
website
Hello there! Do you know if they make any plugins to protect against hackers?
I'm kinda paranoid about losing everything I've worked hard on. Any recommendations?
casino en ligne
Hmm it looks like your site ate my first comment (it was super long)
so I guess I'll just sum it up what I had written and say,
I'm thoroughly enjoying your blog. I as well am
an aspiring blog writer but I'm still new to everything.
Do you have any tips and hints for beginner blog writers?
I'd genuinely appreciate it.
web page
Thank you, I have recently been searching for info approximately this subject
for a long time and yours is the best I have found out so far.
But, what about the bottom line? Are you sure in regards to the supply?
web site
What i don't understood is in truth how you are now not
actually a lot more neatly-appreciated than you may be right
now. You're so intelligent. You realize thus significantly in the case of this
subject, made me in my view believe it from numerous
numerous angles. Its like women and men don't seem to be
involved unless it's one thing to do with Woman gaga! Your own stuffs great.
All the time deal with it up!
website
Thanks a bunch for sharing this with all folks you really realize what you are speaking about!
Bookmarked. Please additionally consult with my web site =).
We will have a link change arrangement between us
meilleur casino en ligne
Touche. Sound arguments. Keep up the great work.
casino en ligne fiable
Fantastic goods from you, man. I've understand your stuff previous to and you are just extremely fantastic.
I actually like what you've acquired here, really like what you are saying and the
way in which you say it. You make it entertaining and you still take care of to keep it wise.
I can not wait to read much more from you. This is actually a wonderful site.
site
I couldn't refrain from commenting. Well written!
casino en ligne
It's actually very difficult in this full of activity life to listen news on Television,
so I just use internet for that purpose, and obtain the newest news.
web site
Hey! Do you know if they make any plugins to protect against hackers?
I'm kinda paranoid about losing everything I've worked hard on. Any suggestions?
webpage
Hmm it looks like your site ate my first comment (it was extremely long) so I guess I'll just sum
it up what I wrote and say, I'm thoroughly enjoying your blog.
I too am an aspiring blog writer but I'm still new to everything.
Do you have any recommendations for novice blog writers?
I'd really appreciate it.
site
Thanks for sharing your thoughts on Entware. Regards
webpage
Hurrah, that's what I was searching for, what a information! present here at this blog,
thanks admin of this web page.
casino en ligne
Every weekend i used to pay a quick visit this site, for the reason that i
want enjoyment, since this this web page conations genuinely nice funny data too.
web page
I think the admin of this web site is genuinely working hard for
his website, for the reason that here every information is quality based material.
casino en ligne
Keep on working, great job!
casino en ligne France
Hi there, just became aware of your blog through Google, and found that it is truly informative.
I am gonna watch out for brussels. I will appreciate if
you continue this in future. Numerous people will
be benefited from your writing. Cheers!
webpage
I think this is among the most vital info for me. And i am glad reading your
article. But wanna remark on some general things, The website style is perfect, the articles is really nice :
D. Good job, cheers
web page
What's up, I read your blogs on a regular basis. Your humoristic style is awesome, keep doing what you're doing!
webpage
Inventonslemondedapres : l'expertise que vous recherchez pour identifier les casinos en ligne
vraiment dignes de confiance.
Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something.
I think that you could do with a few pics to drive the message
home a little bit, but other than that, this is wonderful blog.
An excellent read. I'll definitely be back.
casino en ligne
Exceptional post however I was wondering if you could write a litte more
on this subject? I'd be very grateful if you could elaborate
a little bit more. Kudos!
meilleur casino en ligne
Hi there, this weekend is pleasant designed for me, as this point in time
i am reading this great educational paragraph here at my home.
meilleur casino en ligne
Wow, this paragraph is pleasant, my sister is analyzing these kinds of things, thus I am going to
tell her.
casino en ligne
Wonderful blog! I found it while browsing on Yahoo News.
Do you have any tips on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get there!
Appreciate it
casino en ligne
After exploring a few of the blog articles on your website,
I honestly appreciate your technique of writing a blog.
I bookmarked it to my bookmark webpage list and will be checking back soon. Please visit my website
too and let me know what you think.
casino en ligne
This is my first time go to see at here and i am really happy
to read everthing at single place.
casino en ligne
Quality posts is the secret to invite the viewers to pay a quick visit the
web site, that's what this web site is providing.
casino en ligne
Appreciate the recommendation. Will try it out.
casino en ligne
Hi there! Someone in my Myspace group shared this website with us so I came
to take a look. I'm definitely loving the information. I'm book-marking and will be tweeting this
to my followers! Terrific blog and fantastic design.
casino en ligne
Inventonslemondedapres vous présente uniquement des casinos en ligne vérifiés et approuvés selon des critères stricts.