You need to install the PHP sodium extension.
sodium
For PHP FPM 7.1 in Debian/Ubuntu:
apt-get install php7.1-sodium service php7.1-fpm restart