I'm running two instances using systemd. I know this is not supported, but it works fine for months now.
I just wanted to describe on how I'm planning to do this and if maybe someone sees something that could be an issue, maybe give me a little hint?
I would also update these guides accordingly or add another one for the migration process, so others can benefit from this.
Current version is 1.4.0 running with Python 2. Configuration and data files are in /home/octoprint/.octoprint1 and /home/octoprint/.octoprint2
1.) First, I would stop the currently running processes (in my case using systemctl).
2.) Make sure Python 3 and pip is installed (something like apt install python3 python3-pip python3-dev python3-setuptools git build-essential)
3.) Upgrade local pip3 and then run pip3 (in my case as the system user running OctoPrint) to install OctoPrint in its local directory:
pip3 install --upgrade --user pip
pip3 install --user octoprint
4.) Make sure, that (in my case) /home/octoprint/.local/bin/octoprint uses the #!/bin/python3 shebang and/or make sure that the octoprint script is started with the Python 3 executable (/bin/python3) - in my case in /etc/systemd/system/octoprint@.service
5.) Restart the service(s) (systemctl start email@example.com firstname.lastname@example.org)
6.) Re-install the Python 3 plugin packages (if available) using the GUI. List them with something like ls -ld ~/.local/lib/python2.7/site-packages/octoprint_*
Or install them using pip3?
I'm aware that this is "dirty", since I run multiple instances and both share the same local Python libs.