All persistent data for TailStatic is stored under a single root directory: `/app/data/tailstatic`. This directory should be mounted as a volume in your Docker configuration to ensure your data survives container updates.

### Important Subdirectories

Inside the data root, several folders handle different types of information:

#### `/app/data/tailstatic/DB`
This folder contains the main database files. It stores your application settings, users, collection indexes, domain mappings and site metadata.

#### `/app/data/tailstatic/Security`
This folder holds sensitive security data, such as encryption keys and certificates used by the application.

#### `/app/data/tailstatic/Sites`
This is where the source files for all your managed sites live. Each site has its own folder containing pages, styles, scripts and assets. See the [Site Directory Layout](/docs/site-directory-layout) for details.

#### `/app/data/tailstatic/SitesPreview`
When you preview a site in the dashboard, the temporary rendered files are stored in this folder.

#### `/app/data/tailstatic/SitesRendered`
When you publish a site, the final HTML and CSS files are generated and stored here. These are the files served to your visitors.

#### `/app/data/tailstatic/jobs`
This folder contains data related to background processing jobs, such as logs and temporary files used by TailStatic-Tools.

### Managing the Storage

* **Backups:** You should regularly take backup of the entire `/app/data/tailstatic` directory.
* **Permissions:** Ensure the user running the Docker containers has full access to this directory tree on the host system.
* **Disk Space:** Monitor the `SitesRendered` and `SitesPreview` folders, as they can grow over time if you have many sites or large assets.

