I have multiple Raspberry Pi's running Octoprint. I'm trying to automate the installation process, to make maintenance easier. I know I can clone an entire SD card, but that doesn't work so well for OS or hardware upgrades.
Is there a way to skip the setup wizard and just copy over a slightly customized config file instead to a printer instead?
I guess you could use the backup and restore option for that and modify the file in the backup zip
You can copy the config.yaml file, or just a skeleton version - the setup wizard will only show up if there is stuff that has not been configured yet, which normally nothing has on a first start up. If you setup one instance, you could copy the config to the other instances config location
Ah, those are both good suggestions. I'll test out just copying
config.yaml. That would be a super easy solution.
I see that there is a line
firstRun: false in my
config.yaml; my guess is that as long as that's set to false, I'll be fine.
Thanks so much for the help.
Some parts of the setup wizard will still show up if it's not fully configured - for example setting up a new user if you don't have a users.yaml file. I think there's a couple of other parts that will show regardless of the
firstrun, they have some additional conditions to check.
That's interesting. I'll have to give it a try.
I found that if I configure an admin user and then add some lines to the
plugins: tracking: section of
and add some lines to the
server section of
then the setup wizard is disabled.
I still have to figure out how to make those edits automatically, but this is a great start. Thank you.
The best way to do this automatically would be to write a script for it.
You can view/change OctoPrint config settings via the command line.
Example for OctoPi:
oprint/bin/octoprint config set plugins.tracking.enabled false --bool will set that value to false. You can do all of the other values in a similar way, and put them in a shell script that you run once.
Thanks, that's useful. I've been using Ansible to edit config.yaml directly, but your approach is also appealing.
I use Ansible as well, remotely installing plugins using the URL and triggering the install script, no manual copying required, but I might try copying the config.yaml from a fully configured instance.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.