How to increase the session expiration time in Subsonic

Here’s how you can increase the length of a session in Subsonic from the default of 30 minutes to something longer. In this example I’m increasing it to 2 weeks (20160 minutes).

mkdir workspace
cd workspace
sudo cp /usr/share/subsonic/subsonic-booter-jar-with-dependencies.jar /usr/share/subsonic/subsonic-booter-jar-with-dependencies.jar.orig
unzip /usr/share/subsonic/subsonic-booter-jar-with-dependencies.jar
cat > webdefault.patch <<End-of-message
--- org/mortbay/jetty/webapp/webdefault.xml.orig  2014-06-11 10:06:12.000000000 -0700
+++ org/mortbay/jetty/webapp/webdefault.xml 2014-06-11 10:06:39.000000000 -0700
@@ -323,7 +323,7 @@

   <!-- ==================================================================== -->
-    <session-timeout>30</session-timeout>
+    <session-timeout>20160</session-timeout>

   <!-- ==================================================================== -->
patch -p0 webdefault.patch && rm webdefault.patch
sudo service subsonic stop
sudo zip -r /usr/share/subsonic/subsonic-booter-jar-with-dependencies.jar ./
sudo service subsonic start

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see