diff --git a/Dockerfile b/Dockerfile
index 0bb977ad79c560355ba4930801afdb38412e614b..41edf56b3880421abc259d9b7a75a65d8c50a75d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -32,4 +32,4 @@ USER nobody
 
 EXPOSE 3000
 WORKDIR /opt/PiTube
-CMD /opt/PiTube/script/pitube daemon
+CMD hypnotoad -f /opt/PiTube/script/pitube
diff --git a/lib/PiTube.pm b/lib/PiTube.pm
index 7c5f8416afe21d9595aa907f2efd5ff0be6d3962..e25230e7f9d01715411c5b5def41926ca6ebb653 100644
--- a/lib/PiTube.pm
+++ b/lib/PiTube.pm
@@ -11,10 +11,13 @@ use PiTube::Schema;
 sub startup {
     my $self = shift;
 
-    $self->plugin('PiTube::Helpers::OAuth2');
+    # Nacteni konfigurace
+    my $config = $self->plugin('Config');
 
     $self->secrets([$ENV{SECRET}]);
 
+    $self->plugin('PiTube::Helpers::OAuth2');
+
     my $home = Mojo::Home->new()->detect;
 
     my $pg = Mojo::Pg->new
diff --git a/pi_tube.conf b/pi_tube.conf
new file mode 100644
index 0000000000000000000000000000000000000000..6e8fc860fa5f9af0a5a1bc9a8f81d0448a03ab1c
--- /dev/null
+++ b/pi_tube.conf
@@ -0,0 +1,8 @@
+{
+  hypnotoad => {
+    workers  => 10,
+    proxy    => 1,
+    pid_file => '/var/tmp/hypnotoad.pid',
+    listen   => ['http://*:3000']
+  }
+};