Change the default BASEDIR from ~/.octoprint to custom

Question: How to change the default BASEDIR from ~/.octoprint to something custom

I'm currently installing multiple instances of Octoprint on Raspberry Pi, which uses differing ports and appeared to work quite well. However, all share the same ~/.octoprint location for BASEDIR.

Looking at ./lib/python3.9/site-packages/octoprint/settings/ seems to suggest that if a basedir is provided then it will use that rather than the default.

What is the correct way to set the BASEDIR for Octoprint.settings.settings?

What did you already try to solve it?

I've looked at the documentation here: octoprint.settings β€” OctoPrint master documentation but doesn't suggest where I should correctly set this, rather than hack the code around which will probably break with an update.

Have you tried running in safe mode?

Not Relevant

Did running in safe mode solve the problem?

Not Relevant

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

browser.user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/113.0
connectivity.connection_ok: True
connectivity.enabled: True True
connectivity.resolution_ok: True
env.hardware.cores: 4
env.hardware.freq: 1500.0
env.hardware.ram: 3978645504
env.os.bits: 32 linux
env.os.platform: linux
env.plugins.pi_support.model: Raspberry Pi 4 Model B Rev 1.1
env.plugins.pi_support.throttle_check_enabled: True
env.plugins.pi_support.throttle_check_functional: True
env.plugins.pi_support.throttle_state: 0x0
env.python.pip: 20.3.4
env.python.version: 3.9.2
env.python.virtualenv: True unknown
octoprint.last_safe_mode.reason: unknown
octoprint.safe_mode: False
octoprint.version: 1.9.0
systeminfo.generated: 2023-06-02T16:41:47Z
systeminfo.generator: zipapi

Additional information about your setup

OctoPrint version 1.9, OctoPi version 1.9, any, any, any, bullseye (Raspberry Pi), ... as much data as possible

Raspberry Pi Bullseye 2Gb Pi 4

Hello @Muckypaws !

Please note:

No need for system info bundle. In order to have a separate basedir, you need to modify the service files that start the additional instances with the command line options --basedir="/home/pi/.octoprint2/" on the command line. A much simpler approach would be to utilize the octoprint_deploy script though to manage all this for you.


Thank you so much! Makes much more sense now, and trying it out now.

Kind Regards

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