Installing bitwarden on Synology Diskstation

Until lately I had been using 1Password as my trusted password manager. I had been using it since 1Password 4 and lately bought the upgrade to 1Password 7 for Mac and Android. Syncing between devices was done by using Dropbox. It was pretty easy. But then it was time to share some passwords with my wife. I was looking the possibilities. Creating 1Password vault and shared it per Dropbox, or using the 1Password for families for 4,99 USD per month. Other alternatives, such as Lastpass, Dashlane and Bitwarden, are subscription model and you need to upload your password to their server.

But Bitwarden advertises itself as open source and can be self-hosted. But although it’s self-hosted, you have to pay the monthly subscription to use all the features. Then I came to an unofficial implementation of the Bitwarden server written in Rust, called bitwarden_rs. It has all the official Bitwarden’s features minus the subscription.

Continue reading Installing bitwarden on Synology Diskstation

GeoIP2 is not updated in Matomo

cron error update Maxmind GeoIP2 database

Over the new year I got a PHP error from my Matomo crontask regarding GeoIP2 database from Maxmind. The error message is:

After short time googling, I found out that Maxmind doesn’t allow anonymous download of their free GeoIP2 databases because of a California Consumer Privacy Act (CCPA). See source

Continue reading GeoIP2 is not updated in Matomo

Synology NAS as backup drive

Using Apple TimeMaschine to backup entire Macbook is an easy step. But what about files, which are shared between users/devices? here comes a Synology NAS to help.

I’ve been using Synology since DS207. Now a DS216+ saves all the precious data and pictures. As I wrote, backup a Mac with TimeMaschine on a Synology DiskStation is an easy step. But what about shared file on cloud platform like Dropbox, Google Drive and so on? Synology can handle that too 🙂

Continue reading Synology NAS as backup drive

Search for string part per TypoScript

To search a string part (needle) in string (haystack), you can easily use the PHP strpos function. But this function doesn’t exist in TypoScript.

The following TypoScript return true if the needle is found in the haystack. This can be used in an if condition.

The above COA will return true if http is found in the header_link field. I used this to add ATagParams for external link, in assumption that link with http(s) is an external link.

Adding javascript: in href using TYPO3 RTE

The link wizard is a great tool for normal TYPO3 user to add link (internal, external, or email link). But what if a javascript function needs to be triggered manually by clicking a link? you can make an onClick event listener to achieve this. But in RTE you can also adds javascript:someFunction(); as href parameter.

To do this, switch to text mode in RTE by clicking the <> button and put your link manually. Following parameters need to be added manually:

so should the link looks like

Automatically apply PSR-2 coding style

*UPDATE*

In version 2 of php_cs_fixer some parameters and rules are renamed. Upgrade guide can be see on their Github page. This how-to is accordingly updated.


Applying PSR-2 coding style manually is really no fun and wasting time. A short visit in Github and there’s a tool which detects and fixes the coding style. The tool is called php-cs-fixer.

I’ll show you how to get the tool and use it to easily reformat all PHP file in project.

Continue reading Automatically apply PSR-2 coding style

Connection refused after installing DSM 6.0 Beta

After installing the newly released DSM 6.0 beta for Synology NAS, I was unable to reach the DSM again. My Chrome browser showed “Connection refused”. Not really a good start for beta testing new software. connection-refused

Luckily SSH is still up. Since DSM running on nginx, it’s straightforward to look for some error log in the nginx error log.

shows following log records

in the file /usr/syno/etc/ssl/ssl.chain.crt/server.crt I found a weird certificate formatting

There’s a missing newline between the chained certificate. Put a new line between the certificate and restart nginx.

and restart nginx

Tadaaaa… DSM is available again.

Fail downloading file on Android

How hard is it, to write a PHP script to allow user to download a file? really easy, one would say. Just send the appropriate HTTP header and echo the file content.

Basically that’s all I need to force download per PHP. But somehow Android stock browser (Chrome) only downloads and creates a 0 kB file. Other browser (tested with Firefox on Android) saves the file correctly.

What does happen here?

Continue reading Fail downloading file on Android

SEO – add trailing slash to URL

The problem

For those who use Google Webmaster Tool, they might find Google “duplicated content” warning. This is caused by slightly different URL, which is found by search engine.
Like:

and

are interpreted as 2 different pages by search engine. So how do we resolve this?

Continue reading SEO – add trailing slash to URL

Munin on Raspberry Pi with dynamic IP

the easiest tool to monitoring a server is munin. It’s easy to install and has lots of plugins. Installing munin on a server, which is to be monitored, is not really a smart move. Seeing a raspberry pi laying on a closet and do nothing, gives me the idea to use it to monitor my vServer. The problem is how to configure munin-node to communicate with munin, which is behind a dynamic IP. But one step after the other 🙂

First move is to grab a SD-Card and flash Raspbian from Raspberry Pi website. This is an easy task.

Next task is to assign a static IP address. Continue reading Munin on Raspberry Pi with dynamic IP