# Loss of configuration after Jenkins restart

**URL:** <https://community.jenkins.io/t/loss-of-configuration-after-jenkins-restart/4938>\
**Category:** Ask a question\
**Created:** [December 13, 2022, 4:12pm UTC](https://community.jenkins.io/t/loss-of-configuration-after-jenkins-restart/4938 "2022-12-13T16:12:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorgequesadalopez](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/jorgequesadalopez/32/2941_2.png) [@jorgequesadalopez](https://community.jenkins.io/u/jorgequesadalopez)\
**Post date:** [December 13, 2022, 4:12pm UTC](https://community.jenkins.io/t/loss-of-configuration-after-jenkins-restart/4938/1 "2022-12-13T16:12:20Z")

</div>

Good afternoon,

We are modifying the security permissions in “Configure Global Security”, adding groups, removing users, etc, all using the “Project-based Matrix Authorization Strategy” authorisation option.

When we make modifications and Jenkins restarts, all the information of the configuration that has been modified is lost and the configuration that was there before remains.

We have solved this by updating Jenkins with the configuration file values.yaml. For example:

helm upgrade --wait --timeout 300s jenkins jenkins jenkinsci/jenkins --namespace jenkins --values 02b-jenkins-values.yaml

By doing this and then restarting Jenkins, the modifications persist and are not deleted.

Why does this happen?

Best regards,

Jorge.

---

<div class="post-metadata">

**Author:** ![PierreBtz](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/pierrebtz/32/55_2.png) [@PierreBtz](https://community.jenkins.io/u/PierreBtz)\
**Post date:** [December 13, 2022, 4:18pm UTC](https://community.jenkins.io/t/loss-of-configuration-after-jenkins-restart/4938/2 "2022-12-13T16:18:34Z")

</div>

There are several pieces of the puzzle missing in the description of your setup, but from the looks of it you are using [JCasc](https://www.jenkins.io/projects/jcasc/) to manage the configuration of your instance.

Jenkins will apply the JCasc configuration at startup and therefore override any manual configuration you did in the UI.

---

<div class="post-metadata">

**Author:** ![mPokornyETM](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mpokornyetm/32/6375_2.png) [@mPokornyETM](https://community.jenkins.io/u/mPokornyETM)\
**Post date:** [December 14, 2022, 11:19pm UTC](https://community.jenkins.io/t/loss-of-configuration-after-jenkins-restart/4938/3 "2022-12-14T23:19:23Z")

</div>

And I like it, because I know when i reboot jenkins it starts always with correct settings. 😉

---

<div class="post-metadata">

**Author:** ![Praveentps](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/praveentps/32/3439_2.png) [@Praveentps](https://community.jenkins.io/u/Praveentps)\
**Post date:** [February 23, 2023, 9:02am UTC](https://community.jenkins.io/t/loss-of-configuration-after-jenkins-restart/4938/4 "2023-02-23T09:02:29Z")

</div>

Hi Jorge,

What values have you changed in jenkins-values.yaml file to persist “Project-based Matrix Authorization Strategy” data after restart of jenkins ?

---

<div class="post-metadata">

**Author:** ![karnwaltushti](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/karnwaltushti/32/5863_2.png) [@karnwaltushti](https://community.jenkins.io/u/karnwaltushti)\
**Post date:** [October 19, 2023, 11:47am UTC](https://community.jenkins.io/t/loss-of-configuration-after-jenkins-restart/4938/5 "2023-10-19T11:47:56Z")

</div>

how can i restore the configurations that i made through the UI. I want those changes to be persisted, i see the changes are made in the config.xml but when everything gets deleted once i restart it.
