_MigrateServerXML

_UpgradeGuideIncludes

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community


  1. Locate your server.xml file.
     

    Tell me where to look...
    ReleaseDirectory
    Stash 3.7 and earlier<Stash installation directory>/conf/server.xml
    Stash 3.8 and later<Stash home directory>/shared/server.xml
    Bitbucket Server 4.0 - 4.14<Bitbucket home directory>/shared/server.xml
    Bitbucket Server 5.0 and laterN/A, replaced by <Bitbucket home directory>/shared/bitbucket.properties
  2. Identify and note any customizations made. Ideally you will know which customizations were made and can locate them in your server.xml file.
     

    Here are some common customizations...

    This is not a comprehensive list. Review your server.xml file closely to ensure all your customizations are noted.

    1. Securing Bitbucket using SSL.

    2. Running Bitbucket behind a reverse a proxy.
    3. Bypassing the Bitbucket reverse proxy to solve Application Links issues.
    4. Bypassing the Bitbucket proxy to connect directly to a Data Center node (for troubleshooting, or to generate support zips).
    5. Configuring a custom keystore path and password.
  3. Locate your bitbucket.properties file in the <Bitbucket home directory> /shared directory.

  4. Look up the customization equivalent in the bitbucket.properties file by referring to one of the migration examples and/or by using the migration table below.

  5. Add the equivalent values to the bitbucket.properties file. Save and close the file.

    For Bitbucket Data Center users...

    The value for your load balancer to support session affinity ("sticky sessions") was previously set to JSESSIONID. The default value for Bitbucket 5.0+ has changed to BITBUCKETSESSIONID.

    You need to either change your load balancer cookie configuration to BITBUCKETSESSIONID, or, change the value in the bitbucket.properties file to JSESSIONID.


    To change the value in the bitbucket.properties file, add this line


    server.session.cookie.name=JSESSIONID


    To change this value in your load balancer configuration, locate your load balancer proxy configuration file, change the instances of JSESSIONID to BITBUCKETSESSIONID.


  6. Remove or rename the server.xml file (don't delete this file until you confirm the customizations were successfully migrated to your upgraded instance). 

Migration reference table

Show me the table...
4.x and earlier (server.xml)5.x and later (bitbucket.properties)
compression="on"server.compression.enabled=true
compressableMimeType=
"text/html,text/xml,text/
plain,text/css,application/
json,application/javascript,
application/x-javascript"
server.compression.mime-types=
text/css,text/html,text/javascript,text/
json,text/plain,text/xml,text/x-javascript,
\
application/javascript,application/
json,application/x-javascript,application
/vnd.git-lfs+json
connectionTimeout="20000"server.connection-timeout=20000
path="/"server.context-path=/
N/Aserver.displayName=Atlassian Bitbucket
port="7990"server.port=7990
useHttpOnly="true"server.session.cookie.http-only=true
secure="true"server.secure=true
SSLEnabled="true"server.ssl.enabled=true
keyAlias="YourAlias"

certificateKeyAlias="YourAlias"

server.ssl.key-alias=tomcat
keystoreFile=
"/path/to/keystore/bitbucket.jks"

certificateKeystoreFile="
/path/to/keystore/bitbucket.jks"

server.ssl.key-store=
${bitbucket.shared.home}
/config/ssl-keystore

keystorePass=
"<password value>"

certificateKeystorePassword=
"<password value>"

server.ssl.key-store-password=changeit
sslProtocol="TLSv1.2"server.ssl.protocol=TLSv1.2
keystoreType="JKS"

certificateKeystoreType="JKS"

server.ssl.key-store-type=
${keystore.type:jks}

clientAuth="false" or clientAuth="true"

server.ssl.client-auth=want or
server.ssl.client-auth=need
redirectPort="443"server.redirect-port=443
proxyPort="443"server.proxy-port=443
proxyName="mycompany.com"server.proxy-name=mycompany.com
address="192.168.10.10"server.address=192.168.10.10


For Bitbucket Data Center

These properties are applicable to Bitbucket Data Center instances. In previous versions these were set within load balancer configuration files. Depending on which load balancer you're using, there are many configuration options, so it is not possible to precisely describe the properties or values for every configuration.

Setting these values within the bitbucket.properties in file in 5.0+ overrides what's in the load balancer configuration file.

  • server.session.cookie.name=BITBUCKETSESSIONID
  • server.session.timeout=1800
  • server.session.tracking-modes=cookie
Last modified on Oct 17, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.