How to modify Jira logging configuration for docker setup ?

Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This article describes a scenario where user has to modify logging configuration for Jira docker setup managed by docker compose.

Environment

Jira 9.5.0 and above

Diagnoses

  • We did a basic modification where we changed name of atlassian-jira.log to atlassian-jira-app.log file, this is just to check if we can mount a single file. And it works well.

  • Following way we mounted log4j2.xml from local(./log4j2.xml) to docker container(/opt/atlassian/jira/atlassian-jira/WEB-INF/classes/log4j2.xml).

    volumes: - ./log4j2.xml:/opt/atlassian/jira/atlassian-jira/WEB-INF/classes/log4j2.xml
  • In container, we can find that log file is modified.

    root@56db41247920:/var/atlassian/application-data/jira/log# ls -ltr *app.log -rw-r----- 1 jira jira 986410 Jul 19 18:19 atlassian-jira-app.log

Solution

  • Volumes are the preferred mechanism for persisting data generated by and used by Docker containers.

  • Following sample, demonstrate how we can mount log4j2.xml in our local to Jira docker container(/opt/atlassian/jira/atlassian-jira/WEB-INF/classes/log4j2.xml). This sample just demonstrate how log4j2.xml modifications can be done in Docker container, it might not be useful for other purpose.

❯ cat docker-compose.yml version: '3.5' services: app1: depends_on: - db image: atlassian/jira-software:9.10-ubuntu-jdk11 #restart: unless-stopped ports: - 8081:8080 volumes: - jiradc_vol_sharedhome:/var/atlassian/application-data/jira/shared - ./log4j2.xml:/opt/atlassian/jira/atlassian-jira/WEB-INF/classes/log4j2.xml environment: - ATL_JDBC_URL=jdbc:postgresql://db:5432/jiradc - ATL_DB_DRIVER=org.postgresql.Driver - ATL_DB_TYPE=postgres72 - ATL_JDBC_USER=jiradc - ATL_JDBC_PASSWORD=jiradc -----
Updated on April 21, 2026

Still need help?

The Atlassian Community is here for you.