diff --git a/Dockerfile b/Dockerfile
index a00c1a3b656921f494eccc573c39734f62446c20..6602cf5c97675d3b17431232fdcf8b946bfb4440 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,51 +1,54 @@
-FROM ubuntu:14.04
+FROM ubuntu:16.04
 LABEL maintainer Ascensio System SIA <support@onlyoffice.com>
 
 ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive
 
 RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
     apt-get -y update && \
-    apt-get --force-yes -yq install wget apt-transport-https curl && \
+    apt-get -yq install wget apt-transport-https curl locales && \
     apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CB2DE8E5 && \
-    echo "deb http://archive.ubuntu.com/ubuntu precise main universe multiverse" >> /etc/apt/sources.list && \
     locale-gen en_US.UTF-8 && \
     curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
     apt-get -y update && \
     echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
-    apt-get --force-yes -yq install adduser \
-                                    bomstrip \
-                                    fonts-crosextra-carlito \
-                                    fonts-dejavu \
-                                    fonts-liberation \
-                                    fonts-opensymbol \
-                                    fonts-takao-gothic \
-                                    htop \
-                                    libasound2 \
-                                    libboost-regex-dev \
-                                    libcairo2 \
-                                    libcurl3 \
-                                    libgconf2-4 \
-                                    libgtkglext1 \
-                                    libnspr4 \
-                                    libnss3 \
-                                    libnss3-nssdb \
-                                    libstdc++6 \
-                                    libxml2 \
-                                    libxss1 \
-                                    libxtst6 \
-                                    nano \
-                                    nginx-extras \
-                                    nodejs \
-                                    postgresql \
-                                    postgresql-client \
-                                    pwgen \
-                                    rabbitmq-server \
-                                    redis-server \
-                                    software-properties-common \
-                                    supervisor \
-                                    ttf-mscorefonts-installer \
-                                    xvfb \
-                                    zlib1g && \
+    apt-get -yq install \
+        adduser \
+        bomstrip \
+        fonts-crosextra-carlito \
+        fonts-dejavu \
+        fonts-liberation \
+        fonts-opensymbol \
+        fonts-takao-gothic \
+        htop \
+        libasound2 \
+        libboost-regex-dev \
+        libcairo2 \
+        libcurl3 \
+        libgconf2-4 \
+        libgtkglext1 \
+        libnspr4 \
+        libnss3 \
+        libnss3-nssdb \
+        libstdc++6 \
+        libxml2 \
+        libxss1 \
+        libxtst6 \
+        nano \
+        net-tools \
+        netcat \
+        nginx-extras \
+        nodejs \
+        postgresql \
+        postgresql-client \
+        pwgen \
+        rabbitmq-server \
+        redis-server \
+        software-properties-common \
+        sudo \
+        supervisor \
+        ttf-mscorefonts-installer \
+        xvfb \
+        zlib1g && \
     [  $(ls -l /usr/share/fonts/truetype/msttcorefonts | wc -l) -eq 61 ] && \
     sudo -u postgres psql -c "CREATE DATABASE onlyoffice;" && \
     sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" && \
@@ -68,7 +71,7 @@ ARG PRODUCT_NAME=onlyoffice-documentserver
 RUN echo "$REPO_URL" | tee /etc/apt/sources.list.d/onlyoffice.list && \
     apt-get -y update && \
     service postgresql start && \
-    apt-get --force-yes -yq install $PRODUCT_NAME && \
+    apt-get --allow-unauthenticated -yq install $PRODUCT_NAME && \
     service postgresql stop && \
     service supervisor stop && \
     chmod 755 /app/onlyoffice/*.sh && \
diff --git a/run-document-server.sh b/run-document-server.sh
index f17c2447c529233d06a2a365894d7ec86848e185..e3229b4a2147972fe7dca9db8b78786a63e1bdc4 100755
--- a/run-document-server.sh
+++ b/run-document-server.sh
@@ -45,7 +45,7 @@ JSON_EXAMPLE="json -q -f ${ONLYOFFICE_EXAMPLE_CONFIG}"
 
 LOCAL_SERVICES=()
 
-PG_VERSION=9.3
+PG_VERSION=9.5
 PG_NAME=main
 PGDATA=/var/lib/postgresql/${PG_VERSION}/${PG_NAME}
 PG_NEW_CLUSTER=false
@@ -214,6 +214,9 @@ update_nginx_settings(){
     sed 's,{{SSL_CERTIFICATE_PATH}},'"${SSL_CERTIFICATE_PATH}"',' -i ${NGINX_ONLYOFFICE_CONF}
     sed 's,{{SSL_KEY_PATH}},'"${SSL_KEY_PATH}"',' -i ${NGINX_ONLYOFFICE_CONF}
 
+    # turn on http2
+    sed 's,\(443 ssl\),\1 http2,' -i ${NGINX_ONLYOFFICE_CONF}
+
     # if dhparam path is valid, add to the config, otherwise remove the option
     if [ -r "${SSL_DHPARAM_PATH}" ]; then
       sed 's,\(\#* *\)\?\(ssl_dhparam \).*\(;\)$,'"\2${SSL_DHPARAM_PATH}\3"',' -i ${NGINX_ONLYOFFICE_CONF}