diff --git a/opt/atlassian/bamboo/atlassian-bamboo/WEB-INF/web.xml b/opt/atlassian/bamboo/atlassian-bamboo/WEB-INF/web.xml
index 9af9c94..571887c 100644
--- a/opt/atlassian/bamboo/atlassian-bamboo/WEB-INF/web.xml
+++ b/opt/atlassian/bamboo/atlassian-bamboo/WEB-INF/web.xml
@@ -1201,8 +1201,11 @@
 
   <!-- ============================================================================================== General Config -->
   <session-config>
-    <session-timeout>30</session-timeout>
-    <tracking-mode>COOKIE</tracking-mode>
+      <session-timeout>120</session-timeout>
+      <cookie-config>
+          <max-age>604800</max-age>
+      </cookie-config>
+      <tracking-mode>COOKIE</tracking-mode>
   </session-config>
 
   <welcome-file-list>
diff --git a/opt/atlassian/bamboo/bin/setenv.sh b/opt/atlassian/bamboo/bin/setenv.sh
index 5dd71d4..549b261 100755
--- a/opt/atlassian/bamboo/bin/setenv.sh
+++ b/opt/atlassian/bamboo/bin/setenv.sh
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
 #
 # One way to set the Bamboo HOME path is here via this variable.  Simply uncomment it and set a valid path like /bamboo/home.  You can of course set it outside in the command terminal.  That will also work.
 #
-#BAMBOO_HOME=""
+BAMBOO_HOME="/var/atlassian/application-data/bamboo"
+BAMBOO_CATALINA="/opt/atlassian/bamboo"
 
 #
 # Recommended JVM setting for Embedded Crowd
@@ -12,7 +13,7 @@
 #
 #  Occasionally Atlassian Support may recommend that you set some specific JVM arguments.  You can use this variable below to do that.
 #
-: ${JVM_SUPPORT_RECOMMENDED_ARGS:=""}
+: ${JVM_SUPPORT_RECOMMENDED_ARGS:="-Datlassian.plugins.enable.wait=300 -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions"}
 
 #
 #  Uncomment the line below to enable the Byteman agent.
@@ -23,13 +24,13 @@
 # The following 2 settings control the minimum and maximum given to the Bamboo Java virtual machine.  In larger Bamboo instances, the amounts will need to be increased.
 # We recommend that the minimum and maximum be set to the same value.
 #
-: ${JVM_MINIMUM_MEMORY:=1024m}
-: ${JVM_MAXIMUM_MEMORY:=1024m}
+: ${JVM_MINIMUM_MEMORY:="2048m"}
+: ${JVM_MAXIMUM_MEMORY:="2048m"}
 
 #
 # The following are the required arguments need for Bamboo standalone.
 #
-: ${JVM_REQUIRED_ARGS:="-XX:+UseG1GC"}
+: ${JVM_REQUIRED_ARGS:="-XX:+UseZGC -XX:ZCollectionInterval=5 -XX:ZAllocationSpikeTolerance=5 -XX:+ExplicitGCInvokesConcurrent"}
 
 #
 # Additional JPMS bypass. Used to bypass the encapsulation of specific packages for unnamed modules.
@@ -62,12 +63,44 @@ fi
 #
 # JAVA_OPTS has been deprecated for startup purposes. Use CATALINA_OPTS
 #
-CATALINA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${JVM_SUPPORT_RECOMMENDED_ARGS} ${JVM_EC_RECOMMENDED_ARGS} ${JPMS_BYPASS} ${BAMBOO_HOME_MINUSD} ${CATALINA_OPTS}"
+CATALINA_OPTS="-XX:ReservedCodeCacheSize=512m ${CATALINA_OPTS}"
+CATALINA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JAVA_OPTS} ${JVM_SUPPORT_RECOMMENDED_ARGS} ${JVM_REQUIRED_ARGS} ${JVM_EC_RECOMMENDED_ARGS} ${JPMS_BYPASS} ${BAMBOO_HOME_MINUSD} ${CATALINA_OPTS}"
+
+# Perm Gen size needs to be increased if encountering OutOfMemoryError: PermGen problems. Specifying PermGen size is not valid on IBM JDKs
+BAMBOO_MAX_PERM_SIZE=256m
+if [ -f "${PRGDIR}/permgen.sh" ]; then
+    echo "Detecting JVM PermGen support..."
+    . "${PRGDIR}/permgen.sh"
+    if [ $JAVA_PERMGEN_SUPPORTED = "true" ]; then
+        echo "PermGen switch is supported. Setting to ${BAMBOO_MAX_PERM_SIZE}"
+        JAVA_OPTS="-XX:MaxPermSize=${BAMBOO_MAX_PERM_SIZE} ${JAVA_OPTS}"
+    else
+        echo "PermGen switch is NOT supported and will NOT be set automatically."
+    fi
+fi
 
 CATALINA_OPTS=$(echo "$CATALINA_OPTS" | sed -e 's/\s*$//' -e 's/^\s*//')
 export CATALINA_OPTS
 unset JAVA_OPTS
 
+CATALINA_OPTS="-Dbamboo.catalina.connector.port=8085 ${CATALINA_OPTS}"
+CATALINA_OPTS="-Dbamboo.catalina.connector.scheme=http ${CATALINA_OPTS}"
+CATALINA_OPTS="-Dbamboo.catalina.connector.secure=false ${CATALINA_OPTS}"
+CATALINA_OPTS="-Dbamboo.catalina.connector.proxyname= ${CATALINA_OPTS}"
+CATALINA_OPTS="-Dbamboo.catalina.connector.proxyport= ${CATALINA_OPTS}"
+CATALINA_OPTS="-Dbamboo.catalina.context.path= ${CATALINA_OPTS}"
+export CATALINA_OPTS
+
+# set the location of the pid file
+if [ -z "$CATALINA_PID" ] ; then
+    if [ -n "$CATALINA_BASE" ] ; then
+        CATALINA_PID="$CATALINA_BASE"/work/catalina.pid
+    elif [ -n "$CATALINA_HOME" ] ; then
+        CATALINA_PID="$CATALINA_HOME"/work/catalina.pid
+    fi
+fi
+export CATALINA_PID
+
 echo ""
 echo "If you encounter issues starting or stopping Bamboo Server, please see the Troubleshooting guide at https://confluence.atlassian.com/display/BAMBOO/Installing+and+upgrading+Bamboo"
 echo ""
diff --git a/opt/atlassian/bamboo/conf/server.xml b/opt/atlassian/bamboo/conf/server.xml
index fa783fb..4961ab2 100644
--- a/opt/atlassian/bamboo/conf/server.xml
+++ b/opt/atlassian/bamboo/conf/server.xml
@@ -46,7 +46,7 @@
     <Service name="Catalina">
 
         <Connector
-                port="8085"
+                port="${bamboo.catalina.connector.port}"
                 protocol="HTTP/1.1"
 
                 maxThreads="150" minSpareThreads="25"
@@ -60,6 +60,10 @@
                 useBodyEncodingForURI="true"
                 URIEncoding="UTF-8"
 
+                relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
+                scheme="${bamboo.catalina.connector.scheme}" secure="${bamboo.catalina.connector.secure}"
+                proxyName="${bamboo.catalina.connector.proxyname}" proxyPort="${bamboo.catalina.connector.proxyport}"
+
                 redirectPort="8443">
             <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
         </Connector>
@@ -154,7 +158,7 @@
         <Engine name="Catalina" defaultHost="localhost">
             <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
 
-                <Context path="" docBase="${catalina.home}/atlassian-bamboo" reloadable="false" useHttpOnly="true">
+                <Context path="${bamboo.catalina.context.path}" docBase="${catalina.home}/atlassian-bamboo" reloadable="false" useHttpOnly="true">
 
                     <!--<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"-->
                               <!--factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>-->
diff --git a/opt/atlassian/bamboo/conf/web.xml b/opt/atlassian/bamboo/conf/web.xml
index eff1388..c9e8c5b 100644
--- a/opt/atlassian/bamboo/conf/web.xml
+++ b/opt/atlassian/bamboo/conf/web.xml
@@ -15,11 +15,11 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
-                      http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
-  version="4.0">
+  xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
+                      https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
+  version="6.0">
 
   <!-- ======================== Introduction ============================== -->
   <!-- This document defines default values for *all* web applications      -->
@@ -637,7 +637,11 @@
   <!-- created sessions by modifying the value below.                       -->
 
     <session-config>
-        <session-timeout>30</session-timeout>
+        <session-timeout>120</session-timeout>
+        <cookie-config>
+            <max-age>604800</max-age>
+        </cookie-config>
+        <tracking-mode>COOKIE</tracking-mode>
     </session-config>
 
 
