diff --git a/docker-compose-logging.yaml b/docker-compose-logging.yaml
index 3933c5095c33e21f98eab6b702e2fd47760a73eb..2fa6709e03ac3eb31460d00f0c095803979689c6 100644
--- a/docker-compose-logging.yaml
+++ b/docker-compose-logging.yaml
@@ -7,12 +7,17 @@ services:
     restart: always
     ports:
       - 3000:3000
-  
+
   influxdb:
-    image: influxdb:1.7
+    image: influxdb
     restart: always
     environment:
-      INFLUXDB_DB: glances
+      - DOCKER_INFLUXDB_INIT_MODE=setup
+      - DOCKER_INFLUXDB_INIT_USERNAME=admin
+      - DOCKER_INFLUXDB_INIT_PASSWORD=adminadmin
+      - DOCKER_INFLUXDB_INIT_ORG=ntnu
+      - DOCKER_INFLUXDB_INIT_BUCKET=glances
+      - DOCKER_INFLUXDB_INIT_RETENTION=1w
+      - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=randomTokenValue
     ports:
       - 8086:8086
-
diff --git a/glances.conf b/glances.conf
index 6d7103d5322e46e722db163ffcc4384ef9be4f7c..433fb5a965de0ecc109b22532284dc8afcbe933e 100644
--- a/glances.conf
+++ b/glances.conf
@@ -353,6 +353,27 @@ prefix=localhost
 # You can also use dynamic values
 #tags=system:`uname -s`
 
+[influxdb2]
+# NOTE: localhost will NOT work here!
+host=INSERT_IP_TO_VM_HERE
+port=8086
+protocol=http
+org=ntnu
+bucket=glances
+token=randomTokenValue
+
+# Prefix will be added for all measurement name
+# Ex: prefix=foo
+#     => foo.cpu
+#     => foo.mem
+# You can also use dynamic values
+#prefix=foo
+# Followings tags will be added for all measurements
+# You can also use dynamic values.
+# Note: hostname is always added as a tag
+#tags=foo:bar,spam:eggs,domain:`domainname`
+
+
 [cassandra]
 # Configuration for the --export cassandra option
 # Also works for the ScyllaDB
diff --git a/runLogging b/runLogging
index 0473c769ba6cb09631281d289a877336fc7f41bf..e784bb570f5a200b0c0893f1657524c993b891c4 100755
--- a/runLogging
+++ b/runLogging
@@ -7,6 +7,5 @@ fi
 
 clear
 echo "Starting logsystem..."
-sudo -u $SUDO_USER touch ~/warnings.txt # Run as normal user, so the file is created in the right home directory
-glances -C glances.conf --export influxdb -q &
+glances -C glances.conf --export influxdb2 -q &
 echo "Done."