Synology Photos Backup Slowness

TD;LR – I had manual DNS setup (1.1.1.1 and 8.8.8.8) in my NAS. Everything is good now after I turned off manual DNS.

I have a Synology NAS for my house and have setup own backup cloud. Recently, My wife has complained to me Synology photo auto backup is extremely slow, and it is super slow for me too – it took a few minutes to upload just one picture.

So I started to check where the slow comes from. I know the NAS is not fast since it is 5 years old but it is not too slow too. I am able to transfer files to it and access it from my phone from DS File.

I searched a lot and suspected the slowness comes from not enough memory and DSM 7 is memory-hungry. As DSM 7 claimed it requires at least 1G RAM and my DS216+II has exact 1G RAM – so it could be the issue that my RAM is on the low side. And the memory usage is around 80% from Resource Monitor. After trying for almost one whole day and it went nowhere, I have ordered a 8GB DDR3L RAM online.

And today I did some more search and one person mentioned about switching off IPv6 from NAS. So I decided to login and take a look on my NAS network setup. And the first thing I saw from Network setup is manual DNS servers: 1.1.1.1 and 8.8.8.8. That strike me immediately – I quite like these two DNS but it has given me some trouble before. Last time I had slowness on connecting to my company’s Citrix. I am based in Singapore but somehow I am always redirected to US Citrix farm. It turned out I had DNS set to these two on my machine. So that probably explains – underlying Synology photos services uses DNS and the connection from Synology Photos app from my phone may all the way from Singapore to US and back to Singapore.

I have set DNS to auto on NAS and rebooted it, and now backup process is flying.

But my 8GB RAM is on the way – I guess I will just replace it anyway for good.

Moving from python to Java/C++ is like…

So I’m changing job and I will use Java/C++ mostly in my new job. And here is the counter to add every time I forget to put a semicolon.

6

Missed Semicolons

New Website Setup – Part II

Part I

In Part I we have setup web hosting for multisite wordpress for blogs. In this part we will setup email hosting.

In old days where VPS hosting with cPanel is main stream, we don’t need email hosting at all as they are usually provided together in bundle. But now I need to look for email hosting for customised domains. The most popular ones are – of course giants like google workspace and MS office 365 (for business). They are, however, more than just email hosting but more like whole business app suite. There are some popular email hosting too like ZohoMail, but the charge is still quite high. All I need is a simple mail hosting allow me to have email on my own domains, and then I will use my Gmail to fetch them and delete from server. In this case storage is not a concern either.

In the end I found out my domain registrar namecheap provides private mail hosting too, and with a very good price. As of written, the cheapest tier is only $0.84 per month, with any additional mailbox at $0.41 per month. So I signed up from here.

Once signed up, there are some very nice guide documents on welcome emails. A few things to setup here:

DNS Records

This can be found in welcome email, or follow the link https://www.namecheap.com/support/knowledgebase/article.aspx/1340/2176/namecheap-private-email-records-for-domains-with-thirdparty-dns/ to setup on Lightsail.

The only issue I had encountered is with DKIM key as there is 255 text length limit on lightsail. However this is not a problem, simply put a new line break (Enter key) in between DKIM value to make each line below 255 text. And once setup is done this can be verified from https://mxtoolbox.com/dkim.aspx to make sure the value is valid.

Gmail Fetcher/Desktop/Mobile setup

Again this is in welcome email or can be found on https://www.namecheap.com/support/knowledgebase/subcategory/2175/private-email-client-setup/

WordPress SMTP plugin

WordPress has its SMTP plugin (WP Mail SMTP) installed by default. Just need to enable it and follow setup from previous section and that’s it.

New Website Setup – Part I

Part II

So first thing is to determine a web hosting provider.

Since I have my own domains, immediately I just need to get a few things here.

  1. web hosting for wordpress blog
  2. email hosting for using my domains

I could find another cheap web hosting again from WHT forum providing both wordpress hosting and email (usually unlimited, bounded by host) but worried that it may just become another downtownhost in future. And with cPanel as well as Softaculous getting greedy it seems VPS web hosting is no longer a popular option.

So I started to search for cloud solution. The 2 popular ones – AWS and Google cloud. Both are decent and flexible – but all I need is just a simple hosting – so in the end I chose AWS Lightsail – which provides a package install for wordpress (built by bitnami), and also it’s cheapest.

I have more than one domains also used to have multiple WP blogs – so the wordpress multisite is a no brainer for me.

Create a wordpress multisite instance is easy, just follow the steps on lightsail website: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tutorial-launching-and-configuring-wordpress
Only one thing – I choose multisite version instance instead of normal wordpress.

You will need static IP, DNS setup, update DNS record on your domain registrar (namecheap/namesilo for me). Once setup is done, there is a few other steps to follow:

Enable HTTPS

Not a must – but any good website should have it. Follow the guide on https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-enabling-https-on-wordpress
One thing to note – HTTP to HTTPS redirect is not auto setup by bncert tool – so need to manually change bitnami conf. Follow https://docs.bitnami.com/aws/apps/wordpress/administration/force-https-apache/. Importantly we need to change -vhost.conf file too.

Since we use multisite wordpress – we need to use slightly different config to allow HTTPS redirect for individual domains. This is described in https://community.bitnami.com/t/force-https-for-individual-domains-within-wp-multisite/85658

So in the end, I have updated 2 files (the SSL config file is not needed as it’s already on port 443).

  1. /opt/bitnami/apache2/conf/bitnami/bitnami.conf
  2. /opt/bitnami/apache2/conf/vhosts/wordpress-vhost.conf

With changes like below (highlighted are added lines).

<VirtualHost 127.0.0.1:80 _default_:80>
  ServerAlias *
  DocumentRoot /opt/bitnami/wordpress
  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
  RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [R,L]
  ......

Update primary domain

For multisite wordpress, there is one extra step to update its primary domain. Otherwise you will see it changes URL to IP address. This needs to be done from command line too: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-define-the-primary-domain-for-your-wordpress-multisite

Setup additional blogs for other domains

I haven’t done this step yet – but this can be done by following https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-add-blogs-as-domains-to-your-wordpress-multisite

Reborn

So it seems.. downtownhost is gone. I can still login their client portal but not able to login my old wordpress, nor database/file manager etc.

I have lost my old blogs, which I’ve used for years. The good news, I am lazy, so didn’t write many posts in past years.

With this, I have now moved the website to Amazon Lightsail, and hopefully it can last longer than downtownhost.

Setup steps will be in some future post(s).