Backup bitwarden_rs data on Synology

In the last post, I wrote about installing bitwarden_rs per Docker on Synology and how to activate live sync. Now I’ll show you how to backup the data. I’ll use bruceforce/bw_backup docker to dump the sqlite database automatically, since just copying the sqlite3 file is not really backing up the database. I also found out, that the created dump file won’t be automatically uploaded to cloud by the Cloud Sync. Some how Cloud Sync doesn’t notice that there’s a new file.

Continue reading Backup bitwarden_rs data on Synology

Activating Bitwarden live sync on Synology

In my last post I showed how to install bitwarden_rs, an unofficial fork of bitwarden server, on a Synology Diskstation using docker. Now that everything works, I’ll show you how to activate live sync functionality on Synology. It’s not really easy, but doable. We need to add location based reverse proxy in Synology Nginx.

Basically we need to do 3 things:

  • enabling WebSockets in Docker
  • add new location in the reverse proxy
    Problem is, that we can’t do this in DSM GUI
  • open the WebSockets port in your router
Continue reading Activating Bitwarden live sync on Synology

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 🙂

Update on Google disabling sync of Photo to Drive

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