# Persistence not working

**URL:** <https://community.graylog.org/t/persistence-not-working/28150>\
**Category:** Graylog Central (peer support)\
**Tags:** docker\
**Created:** [March 18, 2023, 4:34am UTC](https://community.graylog.org/t/persistence-not-working/28150 "2023-03-18T04:34:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marley](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@marley](https://community.graylog.org/u/marley)\
**Post date:** [March 18, 2023, 4:34am UTC](https://community.graylog.org/t/persistence-not-working/28150/1 "2023-03-18T04:34:58Z")

</div>

Before you post: Your responses to these questions will help the community help you. Please complete this template if you’re asking a support question.  
**Don’t forget to select tags to help index your topic!**

**1. Describe your incident:**  
Persistent not working new setup docker, volumes are not created in the path listed in the yml file. They are created in var/lib/docker. Every time I do docker-compose down and restart the data in the logs is gone. The settings remain but the log data is gone.

**2. Describe your environment:**

- OS Information: ubuntu 22.04.1 LTS

- Package Version: latest docker, graylog 5.0, mongo 5.0.13, opensearch 2.4.0

- Service logs, configurations, and environment variables:  
here is the yml file

version: ‘3.8’

services:

mongo:  
image: mongo:5.0.13  
volumes:

- mongo\_data:/data/db  
networks:  
- graylog  
restart: always

opensearch:  
image: opensearchproject/opensearch:2.4.0  
volumes:

- op\_data:/usr/share/graylog/openseach  
environment:
- OPENSEARCH\_JAVA\_OPTS=-Xms512m -Xmx512m
- bootstrap.memory\_lock=true
- discovery.type=single-node
- action.auto\_create\_index=false
- plugins.security.ssl.http.enabled=false
- plugins.security.disabled=true
- hostname:opensearch

ulimits:  
memlock:  
hard: -1  
soft: -1  
networks:

- graylog  
restart: always

graylog:  
image: graylog/graylog:5.0  
volumes:

- graylog\_data:/usr/share/graylog/data
- graylog\_journal:/usr/share/graylog/data/journal
- “graylogconfig:/usr/share/graylog/data/config”  
environment:

# CHANGE ME (must be at least 16 characters)!

- GRAYLOG\_PASSWORD\_SECRET=AlfaOmega1graylog
- GRAYLOG\_ALLOW\_LEADING\_WILDCARD\_SEARCHES=true
- GRAYLOG\_ALLOW\_HIGHLIGHTING=true

# Password: admin

- GRAYLOG\_ROOT\_PASSWORD\_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918

# - GRAYLOG\_HTTP\_BIND\_ADDRESS=0.0.0.0:9000

- GRAYLOG\_ELASTICSEARCH\_HOSTS=[http://opensearch:9200](http://opensearch:9200)
- GRAYLOG\_HTTP\_EXTERNAL\_URI=
- TZ=America/New\_York
- GRAYLOG\_ROOT\_TIMEZONE=America/New\_York
- GRAYLOG\_TIMEZONE=America/New\_York
- GRAYLOG\_TRANSPORT\_EMAIL\_ENABLED=true
- GRAYLOG\_TRANSPORT\_EMAIL\_HOSTNAME=100.100.1.4
- GRAYLOG\_TRANSPORT\_EMAIL\_PORT=25
- GRAYLOG\_TRANSPORT\_EMAIL\_USE\_AUTH=false
- GRAYLOG\_TRANSPORT\_EMAIL\_USE\_TLS=false
- GRAYLOG\_TRANSPORT\_EMAIL\_USE\_SSL=false  
entrypoint: /usr/bin/tini – wait-for-it opensearch:9200 – /docker-entrypoint.sh  
networks:
- graylog

# Links MongoDB with OpenSearch.

links:  
- mongo:mongo  
- opensearch  
restart: always

depends\_on:  
- opensearch  
- mongo

ports:

# Graylog web interface and REST API

- 9000:9000

# Syslog TCP

- 1514:1514

# Syslog UDP

- 1514:1514/udp

# GELF TCP

- 12201:12201

# GELF UDP

- 12201:12201/udp

# CEF UPD

- 5555:5555/udp  
networks:  
graylog:  
driver: bridge  
volumes:  
mongo\_data:

# driver: local

op\_data:

# driver: local

graylog\_data:

# driver: local

graylog\_journal:

# driver: local

graylogconfig:

# driver: local

**3. What steps have you already taken to try and solve the problem?**  
I have tried different syntaxes, also chmod 777 the desired base path in the yml file.

**4. How can the community help?**  
I am new to docker. This is my second setup. I can’t figure out why the persistence is not working, and the volumes are not created outside the docker path. Any help would be great.

Thank you,

**Helpful Posting Tips:** [Tips for Posting Questions that Get Answers](https://community.graylog.org/t/tips-for-posting-questions-that-get-answers/21828) [Hold down CTRL and link on link to open tips documents in a separate tab]

---

<div class="post-metadata">

**Author:** ![marley](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@marley](https://community.graylog.org/u/marley)\
**Post date:** [March 19, 2023, 6:26am UTC](https://community.graylog.org/t/persistence-not-working/28150/2 "2023-03-19T06:26:48Z")

</div>

I got it figured out.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [April 2, 2023, 6:26am UTC](https://community.graylog.org/t/persistence-not-working/28150/3 "2023-04-02T06:26:51Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
