diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index 0f7508b8f261de6346531a297ae846f9acf15704..9f243c15a4c4b999d674a3dc8ecfb65aa76a0ebf 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -386,7 +386,7 @@ class Filesystem {
 			throw new \OC\User\NoUserException('Backends provided no user object for ' . $user);
 		}
 
-		$homeStorage = \OC_Config::getValue('objectstore');
+		$homeStorage = \OC::$server->getConfig()->getSystemValue('objectstore');
 		if (!empty($homeStorage)) {
 			// sanity checks
 			if (empty($homeStorage['class'])) {
@@ -458,7 +458,7 @@ class Filesystem {
 	 * @param string $user user name
 	 */
 	private static function mountCacheDir($user) {
-		$cacheBaseDir = \OC_Config::getValue('cache_path', '');
+		$cacheBaseDir = \OC::$server->getConfig()->getSystemValue('cache_path', '');
 		if ($cacheBaseDir !== '') {
 			$cacheDir = rtrim($cacheBaseDir, '/') . '/' . $user;
 			if (!file_exists($cacheDir)) {
@@ -603,7 +603,7 @@ class Filesystem {
 	static public function isFileBlacklisted($filename) {
 		$filename = self::normalizePath($filename);
 
-		$blacklist = \OC_Config::getValue('blacklisted_files', array('.htaccess'));
+		$blacklist = \OC::$server->getConfig()->getSystemValue('blacklisted_files', array('.htaccess'));
 		$filename = strtolower(basename($filename));
 		return in_array($filename, $blacklist);
 	}
diff --git a/lib/private/preview/office.php b/lib/private/preview/office.php
index 415220ed4af96a967bbd9370db9559de65b8141a..acf3683def02815ca9915daa668362394096ce51 100644
--- a/lib/private/preview/office.php
+++ b/lib/private/preview/office.php
@@ -79,8 +79,9 @@ abstract class Office extends Provider {
 	private function initCmd() {
 		$cmd = '';
 
-		if (is_string(\OC_Config::getValue('preview_libreoffice_path', null))) {
-			$cmd = \OC_Config::getValue('preview_libreoffice_path', null);
+		$libreOfficePath = \OC::$server->getConfig()->getSystemValue('preview_libreoffice_path', null);
+		if (is_string($libreOfficePath)) {
+			$cmd = $libreOfficePath;
 		}
 
 		$whichLibreOffice = shell_exec('command -v libreoffice');
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index e59cd3bc8c553c92ae5df3bc2d4784d24e6f4d87..70f9a6e8920fdd42e773133b4c86880eccc89a29 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1149,7 +1149,7 @@ class Share extends Constants {
 					if (!empty($ids)) {
 						$ids = "'".implode("','", $ids)."'";
 						// TODO this should be done with Doctrine platform objects
-						if (\OC_Config::getValue( "dbtype") === 'oci') {
+						if (\OC::$server->getConfig()->getSystemValue("dbtype") === 'oci') {
 							$andOp = 'BITAND(`permissions`, ?)';
 						} else {
 							$andOp = '`permissions` & ?';
diff --git a/lib/public/util.php b/lib/public/util.php
index 50fe91850060146a6aa6f36d001771d002f44a4f..110028368d0ef6903d2dc76744d9ac9f399f2cbf 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -361,9 +361,10 @@ class Util {
 	 * @since 5.0.0
 	 */
 	public static function getDefaultEmailAddress($user_part) {
-		$user_part = \OC_Config::getValue('mail_from_address', $user_part);
+		$config = \OC::$server->getConfig();
+		$user_part = $config->getSystemValue('mail_from_address', $user_part);
 		$host_name = self::getServerHostName();
-		$host_name = \OC_Config::getValue('mail_domain', $host_name);
+		$host_name = $config->getSystemValue('mail_domain', $host_name);
 		$defaultEmailAddress = $user_part.'@'.$host_name;
 
 		$mailer = \OC::$server->getMailer();