Cannot update config.yaml manually

What is the problem?
When updating ~/.octoprint/config.yaml manually, it applies the changes when I restart octoprint service and the changes work correctly. However, when I reboot, it resets all the changes and brings back the previous config.yaml file
What did you already try to solve it?
Tried different changes to the config.yaml file but they all got reset after reboot.
Same happens when I use plugins such as "Custom Control Editor" - I can see the changes but they don't survive reboot.
Logs (octoprint.log, serial.log or output on terminal tab, browser error console ...)
Not sure which logs are needed. I looked at octoprint.log but it has no relevant information.
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ...)
I'm running OctoPrint 1.3.11 via OctoPi 0.16.0 on a Raspberry PI 3 model.

Have you tried it in safe mode?

No. I will try and update.

Thanks.

Safe mode didnt help. same behavior.

As a workaround you could try to make the config read only

Make sure you change permissions on the file. By default you can't edit config.yaml and octoprint reverts because it doesn't even have write permissions on the file

I changed it to 777 and still it didnt help.

@5ft24 that certainly is news to me :face_with_raised_eyebrow:

So far every version I have installed sets the config.yaml as read only. Change settings and all is good until you reboot then it reverts back to the default settings again.

Please file a big report, that certainly is not what should happen. It will set chmod to I think 664 for the user OctoPrint is running under, but that shouldn't make it revert or read only for OctoPrint.

that's not read only - that's everyone can do everything with the file.
444 is read only

If it were me, I think I would...

  1. Edit the file manually
  2. using ls -l ~/.octoprint/config.yaml note the timestamp
  3. run a cat ~/.octoprint/config.yaml to confirm that my changes were there
  4. wait three minutes then reboot
  5. repeat that ls command from before and note the timestamp to see if it's different
1 Like

I ended up replacing my SD card and reinstalling OctoPi. I suspect it has started to malfunction as I started to notice additional weird stuff.
Now everything works as it should.

Thanks for all the suggestions!

just did a fresh install of octoprint on my Pi4. Went thru the initial config, setting up username etc. all good. restarted the server, and it starts me thru the whole thing again. did it 3 times. It shows as rw for pi user, rear only for all others.
changed to 666 from 644, and this time it saved the data.
this is after 3 attempts of restarting the server after going thru the settings each time
It was doing this on the Pi3 as well.

1 Like

I note that your prompt indicates that you're logged in as root. I personally don't spend any significant time in my system as root, to be honest.

From what you're describing, it's as if OctoPrint is running as a user who isn't pi.

With OctoPi or manual?

644 is definitely correct and works flawlessly on all my systems. A wrong permission should also not cause the file to revert itself after save, it should cause a write error.

This amnesia is definitely not normal and nothing I've ever seen (and I go through a LOT of initial setups during my testing). Have you tried a different SD card?

I'm having the exact same issue. I've updated the config.yaml file, verified the changes are still there after saving and closing, and after a reboot the file is back to "normal". I've even tried making permissions read-only for everyone, and when I restart it's back to RW for owner and RO for everyone else, and it's back to the stock file.

Pi 4, originally installed with a nightly OctoPi image. No other issues with anything else.

I am having the same issue. I am using the latest Octopi Image from the website. I have tried a fresh install and new SD card. For me this issue seems revolves around the DetailedProgress plugin. I AM able to manually make changes to the config,yaml file in plugin sections such as tracking and pluginBlacklist (just changing from true to flase). I can make changes through the web interface and they will stick. However when I manually make changes to the DetailProgress plugin, they do not take and always revert back to:

  detailedprogress:
    eta_strftime: '%I:%M %p %b %d'
    etl_format: '{hours:02d}:{minutes:02d}:{seconds:02d}'
    messages:
    - 'ETA: {ETA}'
    time_to_change: 60

I am trying to change it to the code below, as this matches my other Octopi installations. The older installations are running the latest version of Octopi, but have been upgraded to it rather than started on it.

  detailedprogress:
    # Number of seconds (minimum) to rotate the messages
    time_to_change: 60
    eta_strftime: "%I:%M %p %b %d"
    etl_format: "{hours:02d}:{minutes:02d}:{seconds:02d}"
    # Messages to display. Placeholders:
    # - completion : The % completed
    # - printTimeLeft : A string in the format "HH:MM:SS" with how long the print still has left
    # - ETA : The date and time formatted in "%H:%M:%S Day %d" that the print is estimated to be completed
    # - filepos: The current position in the file currently being printed
    messages:
      - "ETA: {ETA}"

I hope this helps, though at this point I do not know if it is an issue with Octoprint or the DetailedProgress Plugin. If you need more information please let me know what you need and I will try and get if for you.

I know this is a bit old but since this was one of the first results I got from google I'll post here. It seems when I upgraded to 1.4.0 from within octoprint, my locale settings in raspi-config got overridden from Detroit to Europe, making my timestamps on files 6 hours in the future, so I was saving "older" files than what was already on disk. Fixed my locale, time zone, and wifi country and my config.yaml stopped being reverted on reboot. Hope this helps someone.

Debian decided to completely change some of the underlying configuration information some time ago.