Synology Letsencrypt DNS-01 cert issue and install

Install the Client

  • SSH to Synology DiskStation.
  • sudo -i to root login.
  • Install manually.
    $ wget
    $ tar xvf master.tar.gz
    $ cd
    $ ./ --install --nocron --home /usr/local/sbin/

Logout and login back again. so install is done :)

  • next step is to do the configuration:
    $ cd /usr/local/sbin/
export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
export CF_Email="[email protected]"
  • Issue and install the certs. The code below to reflect your own path and domain name.
./  --issue -d YOURDOMAIN.TLD --dns dns_cf --certpath /usr/syno/etc/certificate/_archive/PATH/cert.pem --keypath /usr/syno/etc/certificate/_archive/PATH/privkey.pem --fullchainpath /usr/syno/etc/certificate/_archive/PATH/fullchain.pem --capath /usr/syno/etc/certificate/_archive/PATH/chain.pem --reloadcmd "/usr/syno/etc/rc.sysv/ reload"
  • Configure Crontab for root
$ vi /etc/crontab 
Add the following line to the crontab. Remember to use tab for spacing.
0    10    2    *    *    root    root /usr/local/sbin/ --cron --home /usr/local/sbin/

Continue reading “Synology Letsencrypt DNS-01 cert issue and install”

Synology Cloudflare DDNS Script

Run commands in Synology

  1. Download from this repository to /usr/local/sbin/
wget -O /usr/local/sbin/

If you put the script in other name or path, make sure you use the right path.

  1. Give others execute permission
chmod +x /usr/local/sbin/
  1. Add to Synology
cat >> /etc.defaults/ddns_provider.conf << 'EOF'

queryurl does not matter because we are going to use our script but it is needed.

Get Cloudflare parameters

  1. Go to your domain overview page and get the Zone ID.
  2. Go to your account setting page and get API Key.
  3. Get record id using Cloudflare API.
curl -s GET "[Zone ID]/dns_records" \
	-H "X-Auth-Email: [Email]" \
	-H "X-Auth-Key: [API Key" \
	-H "Content-Type: application/json" \
	| jq '.result[] | {name, id, zone_id, zone_name, content, type}'

You need to replace with [] with your parameter. Then, you get the id in result which is you Record ID.

Setup DDNS

  1. Enter the parameters to the
  2. Login to your DSM
  3. Go to Control Panel > External Access > DDNS > Add
  4. Select Cloudflare as service provider. Enter your domain as hostname, your Cloudflare account as Username/Email, and API key as Password/Key

Customize Namecheap DDNS script for Synology

sudo -i
Extract and move namecheap.php to /usr/syno/bin/ddns/

Grant privilege
sudo chmod 755 /usr/syno/bin/ddns/namecheap.php

Edit DDNS Provider list
sudo vi /etc.defaults/ddns_provider.conf

In the DSM web interface, open the DDNS menu
Username/Email: www
Password: nameCheap DDNS passkey


Add TransmissionBT task from iOS devices

Till now, there is no official iOS app to add/manage torrent tasks of TransmissionBT. The only working application is iControlbits which is available to Jailbroken iOS users.
So there is not much choice left for non-jailbroken users to manage Tranmission tasks. We can use Safari web browser to view and delete the downloading task but no way to add torrent file as iOS has a very strictly privilege control on file dealing. It is impossible to download a torrent file and upload it via Safari browser.
Continue reading “Add TransmissionBT task from iOS devices”

Disable Adobe Reader Sign In when open a PDF

I do not remember since when Adobe Reader mandatory requires user to login their Adobe ID once open a PDF file. It is quite annoying. Especially, if you are on a slow Internet environment, you have to wait for login page to be fully loaded. And during that time, you cannot scroll down to browse the PDF content. How to get rid of this silly online function? Here is the solution.

Continue reading “Disable Adobe Reader Sign In when open a PDF”



过了一周,货还没到转运公司呢,却收到了ebay的邮件,MC999,我的ebay账号因为安全原因被无限制禁止了。 Continue reading “奇葩的ebay”



家庭数据无外乎电影、音乐、照片以及一些重要文档。这些数据虽不及企业的数据那么关键和重要,但是珍贵的照片、文档等数据一旦丢失,还是非常的心痛的。于是乎,家庭数据的安全性也逐渐被人们重视。人们想到了企业常用的RAID技术来武装家庭的NAS系统。有用RAID0来提升读写速度、有用RAID1来增加数据的可靠性,也有人用多块硬盘做RAID5或RAID10来确保数据的可用性。提到RAID,人们总是说,现在的硬盘啊,质量参差不齐,纯粹拼人品,建了RAID后,如果不幸哪块硬盘坏了,也不影响数据的完整性,只要再买一块硬盘顶上就行了。但是这仅仅是RAID的好处,大家却忽视的RAID的一些隐患。我的观点是,个人家庭用户不建议使用RAID! Continue reading “RAID是否适合家用?”


Linksys E4200的内存只有64M,刷了tomatoUSB固件再加载Transmission BT下载后,这么点内存颇为捉襟见肘。BT任务一多,Transmission daemon就会crash,有时甚至影响到整个路由器的稳定性。现在通过在外接到USB硬盘上增加SWAP分区,可以有效的解决E4200内存不够用的问题。这下BT下载稳定、可靠了。 Continue reading “给E4200路由器增加SWAP缓存,稳定BT下载”

Manually create MySQL database in CLI

MySQL is a widely spread SQL database management system mainly used on LAMP (Linux/Apache/MySQL/PHP) projects.

The best way to modify mysql database is going through phpmyadmin webgui. But if you only have local SSH shell access to the database, you will need to confirm the way of create mysql database and user in command line.

Continue reading “Manually create MySQL database in CLI”


终于下决心花钱买了个VPS,有了自己的掌控的空间。VPS与传统的webhosting比起来,需要更多的精力和时间去打理,没有多少tech support,全靠自己和google。