diff --git a/api/index.php b/api/index.php
index d248c4f85ea2ca856659adb884ce730124882163..a1143a1dc349e5e8afd708b26c7e6c1461f9d636 100644
--- a/api/index.php
+++ b/api/index.php
@@ -17,6 +17,8 @@
 	require_once "functions.php";
 	require_once "sessions.php";
 
+	ini_set("session.gc_maxlifetime", 86400);
+
 	define('AUTH_DISABLE_OTP', true);
 
 	if (defined('ENABLE_GZIP_OUTPUT') && ENABLE_GZIP_OUTPUT &&