diff --git a/docker-compose.yml b/docker-compose.yml
index dadc48600792c6a903e0dc59b3bf3d107e595278..044093ad2e9533dae5a511e08327c45239c115e3 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -17,6 +17,7 @@ services:
     networks:
       - onlyoffice
     volumes:
+       - /etc/onlyoffice
        - /var/www/onlyoffice/Data
        - /var/log/onlyoffice
        - /var/lib/onlyoffice/documentserver/App_Data/cache/files
diff --git a/run-document-server.sh b/run-document-server.sh
index 40a7c27c78526ce4c31ed266190fb1341a6723f6..d8585f74da56df1081540c2684ac2854211f58a3 100755
--- a/run-document-server.sh
+++ b/run-document-server.sh
@@ -67,7 +67,7 @@ read_setting(){
   REDIS_SERVER_HOST=${REDIS_SERVER_HOST:-$(${JSON} services.CoAuthoring.redis.host)}
   REDIS_SERVER_PORT=${REDIS_SERVER_PORT:-6379}
 
-  DS_LOG_LEVEL=${DS_LOG_LEVEL:-$(${JSON_LOG} levels.nodeJS)}
+  DS_LOG_LEVEL=${DS_LOG_LEVEL:-$(${JSON_LOG} categories.default.level)}
 }
 
 parse_rabbitmq_url(){
@@ -198,7 +198,7 @@ create_postgresql_tbl(){
 
   # Create db on remote server
   if $PSQL -lt | cut -d\| -f 1 | grep -qw | grep 0; then
-    $CREATEDB $DB_NAME
+    $CREATEDB $POSTGRESQL_SERVER_DB_NAME
   fi
 
   $PSQL -d "${POSTGRESQL_SERVER_DB_NAME}" -f "${APP_DIR}/server/schema/postgresql/createdb.sql"
@@ -256,7 +256,11 @@ update_supervisor_settings(){
 }
 
 update_log_settings(){
-   ${JSON_LOG} -I -e "this.levels.nodeJS = '${DS_LOG_LEVEL}'"
+   ${JSON_LOG} -I -e "this.categories.default.level = '${DS_LOG_LEVEL}'"
+}
+
+update_logrotate_settings(){
+  sed 's|\(^su\b\).*|\1 root root|' -i /etc/logrotate.conf
 }
 
 # create base folders
@@ -341,6 +345,7 @@ if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then
   service supervisor start
   
   # start cron to enable log rotating
+  update_logrotate_settings
   service cron start
 fi