[id='server_directory_structure']
= {brandname} Server Filesystem
{brandname} Server uses the following folders on the host filesystem under `{server_home}`:

[source,options="nowrap",subs=attributes+]
----
├── bin
├── boot
├── docs
├── lib
├── server
└── static
----

[TIP]
====
//Community
ifndef::productized[]
See the {brandname} Server README, available in the distribution, for descriptions of the each folder in your `{server_home}` directory as well as system properties you can use to customize the filesystem.
endif::productized[]
//Downstream
ifdef::productized[]
See the link:{runtime_readme}[{brandname} Server README] for descriptions of the each folder in your `{server_home}` directory as well as system properties you can use to customize the filesystem.
endif::productized[]
====

== Server Root Directory

Apart from resources in the `bin` and `docs` folders, the only folder under `{server_home}` that you should interact with is the server root directory, which is named `server` by default.

You can create multiple nodes under the same `{server_home}` directory or in different directories, but each {brandname} Server instance must have its own server root directory.
For example, a cluster of 5 nodes could have the following server root directories on the filesystem:

[source,options="nowrap",subs=attributes+]
----
├── server
├── server1
├── server2
├── server3
└── server4
----

Each server root directory should contain the following folders:

[source,options="nowrap",subs=attributes+]
----
├── server
│   ├── conf
│   ├── data
│   ├── lib
│   └── log
----

[discrete]
== `server/conf`
Holds `infinispan.xml` configuration files for a {brandname} Server instance.

{brandname} separates configuration into two layers:

Dynamic:: Create mutable cache configurations for data scalability. +
{brandname} Server permanently saves the caches you create at runtime along with the cluster state that is distributed across nodes.
Each joining node receives a complete cluster state that {brandname} Server synchronizes across all nodes whenever changes occur.
Static:: Add configuration to `infinispan.xml` for underlying server mechanisms such as cluster transport, security, and shared datasources.

[discrete]
== `server/data`
Provides internal storage that {brandname} Server uses to maintain cluster state.

[IMPORTANT]
====
Never directly delete or modify content in `server/data`.

Modifying files such as `caches.xml` while the server is running can cause corruption.
Deleting content can result in an incorrect state, which means clusters cannot restart after shutdown.
====

[discrete]
== `server/lib`
Contains extension `JAR` files for custom filters, custom event listeners, JDBC drivers, custom `ServerTask` implementations, and so on.

[discrete]
== `server/log`
Holds {brandname} Server log files.

ifdef::productized[]
.Reference

* link:{runtime_readme}[{brandname} Server README]
* link:https://access.redhat.com/solutions/5455731[What is stored in the <server>/data directory used by a RHDG server] (Red Hat Knowledgebase)
endif::productized[]
