Environment Variables | Apache Ozone Skip to main content Apache Ozone Docs Latest Docs Docs 2.0.0 (Archived) Docs 1.4.1 (Archived)DownloadRoadmapBlog Community Communication Channels Who Uses Ozone? Report An Issue Ask a Question How to Contribute Events and Media Search Version: Next Next 2.2.0 2.1.1 Overview Quick Start Core Concepts User Guide Administrator Guide Installation Configuration Basic Configuration Files Environment Variables Network Directories Logging Security Performance High Availability Cluster Architectures Appendix Operations System Internals Developer Guide This is unreleased documentation for Apache Ozone Next version. For up-to-date documentation, see the latest version (2.2.0). Administrator Guide Configuration Basic Environment VariablesVersion: Next On this page Environment Variables The ozone-env.sh script, located at $OZONE_HOME/etc/hadoop, defines the environment variables used by Ozone processes. Note: The following list is not exhaustive but includes the most commonly used environment variables. Common Environment Variables​ These environment variables apply to all Ozone processes. VariableDefault ValueDescriptionJAVA_HOME(none)The path to the Java installation. Must be set on most platforms, but is auto-detected on macOS.OZONE_HOMEAuto-detected from script locationThe path to the Ozone installation directory.OZONE_CONF_DIR$OZONE_HOME/etc/hadoopThe directory containing Ozone configuration files.OZONE_LOG_DIR$OZONE_HOME/logsThe directory where Ozone log files are stored.OZONE_SECURE_LOG_DIR$OZONE_LOG_DIRThe directory where logs for secure (privileged) daemons are stored.OZONE_PID_DIR/tmpThe directory where daemon PID files are stored.OZONE_WORKER_NAMES(none)A space-separated list of worker host names, used as an alternative to the OZONE_WORKERS file. Only one of the two may be set.OZONE_OPTS-Djava.net.preferIPv4Stack=trueUniversal Java options applied to all Ozone processes.OZONE_LOGLEVELINFOThe default log level applied to Ozone processes.OZONE_HEAPSIZE_MAX(JVM default)The maximum JVM heap size (-Xmx). If not set, the JVM auto-scales.OZONE_HEAPSIZE_MIN(JVM default)The minimum JVM heap size (-Xms). If not set, the JVM auto-scales. Role-Specific Environment Variables​ These environment variables apply only to certain Ozone services or roles. VariableDefault ValueDescriptionOZONE_SERVER_OPTS(none)Options for all Ozone server daemons (appended to OZONE_OPTS).OZONE_CLIENT_OPTS(empty)Specifies Java properties for Ozone commands and clients.OZONE_OM_OPTS(empty)Specifies Java properties for the Ozone Manager (OM).OZONE_SCM_OPTS(empty)Specifies Java properties for the Storage Container Manager (SCM).OZONE_DATANODE_OPTS(empty)Specifies Java properties for Datanodes.OZONE_S3G_OPTS(empty)Specifies Java properties for the S3 Gateway.OZONE_RECON_OPTS(empty)Specifies Java properties for the Recon server.OZONE_HTTPFS_OPTS(empty)Specifies Java properties for the HttpFS Gateway.OZONE_CSI_OPTS(empty)Specifies Java properties for the CSI server.OZONE_SH_OPTS(empty)Specifies Java properties for the ozone sh command.OZONE_FS_OPTS(empty)Specifies Java properties for the ozone fs command.OZONE_ADMIN_OPTS(empty)Specifies Java properties for the ozone admin command.OZONE_DEBUG_OPTS(empty)Specifies Java properties for the ozone debug command.OZONE_FREON_OPTS(empty)Specifies Java properties for the ozone freon command.OZONE_VAPOR_OPTS(empty)Specifies Java properties for the ozone vapor command.OZONE_DAEMON_JSVC_EXTRA_OPTS(none)Extra arguments passed to jsvc when launching secure (privileged) daemons. Configuration Methods​ There are several ways to set these environment variables, depending on your needs. System-Wide Configuration​ For multi-user environments, creating a system-wide profile file ensures that variables are set for all users. A common practice is to create a file in /etc/profile.d/, which is loaded by most shells on login. Example for /etc/profile.d/ozone.sh: export JAVA_HOME="$(/usr/libexec/java_home)" export OZONE_HOME=/opt/ozone export OZONE_CONF_DIR=/etc/ozone After creating this file, users must log out and log back in for the changes to take effect. User-Specific Configuration​ If you only need to set variables for a single user, you can add them to their personal shell profile. For Bash users, add to ~/.bashrc or ~/.bash_profile. For Zsh users, add to ~/.zshrc. For other shells, consult their documentation. Example for ~/.bashrc: export OZONE_HOME=~/ozone export OZONE_CONF_DIR=$OZONE_HOME/etc/hadoop After editing, you must reload the profile (e.g., source ~/.bashrc) or open a new shell session. Per-Command Configuration​ For quick tests or one-off commands, you can set an environment variable for a single command's execution. OZONE_HEAPSIZE_MAX=16G ozone sh volume create /vol1 Edit this page Previous Configuration Files Next Network Common Environment Variables Role-Specific Environment Variables Configuration Methods System-Wide Configuration User-Specific Configuration Per-Command Configuration Apache Software Foundation Foundation License Events Sponsorship Privacy Security Thanks Community GitHub Discussions Jira Issues Slack Mailing List YouTube Twitter Repositories Ozone Website Docker Image Docker Runner Image Copyright © 2026 The Apache Software Foundation. Licensed under the Apache License, Version 2.0. The Apache Software Foundation, Apache Ozone, Ozone, Apache, the Apache Feather, and the Apache Ozone project logo are either registered trademarks or trademarks of the Apache Software Foundation.