Self-hosted Selene backend and GUI

Hi. I am trying to deploy Mycroft Selene self-hosted for a research project. I know there have been some posts asking how to do this but they all point to alternatives. What I am trying to do is actually deploy the official Selene Backend + GUI.
So far I have managed to build, install, configure and run everything, but am having problems when accessing the GUI, mostly because it is configured for Mycroft offiicial URLs and the Github readme doesn’t mention how to (or that you need to) change them. I imagine I need to change all the environment.ts files of all projects in Selene-UI angular source before building, but I would like a confirmation or some hint if I need to change anything else - for instance, I don’t know which of the URLs in those .ts files are suppossed to be replaced with my GUI website URLS or the Backend API ones.
If anyone has gone through this it would be great to get some advice - or consider it a lost cause.
As a side note: Prebuilt packages, or even better, Docker images, would be great (I know there are some but they are for Mycroft’s own CI/CD)

I am also looking to self-host.

Any chance you got this working in the end?

Yes, in the end I managed to get it running, but had to do a lot of heavy work, debugging, trial and error, that could be avoided if things were clearer in the readmes (and, as I mentioned before, if they supplied proper Docker images).
I will not get into much detail, but this is a list of things I had to do:

  • Made my own 4 Docker images for the backend modules, loosely based on the Dockerfile in Github + the instructions in the Readme. Using Docker containers I can use Docker Compose to better manage them, and use container hostname as endpoint address instead of IP.
  • Ran Postgres and Redis as Docker containers, configured them as per the Readme in Github.
  • Made a Nginx-based Docker container serving the Selene UI websites all in the same place, as a single server (which means renaming their index.html so they are all in the same place)
  • Then used Nginx as proxy to redirect each request to the appropriate endpoint. This is what took me longest. Essentially it’s redirecting the path of each api call to the right place. Example: /api/cities to the account backend, or /skills to the marketplace web index.html (renamed to market.html). I imagine this would all be easier if you had sub-domains, just like Mycroft, but I currently don’t have domain and am working on IP only. This meant going to the code and finding all API paths.

Files I needed to change:

  • /selene-backend/*/uwsgi.ini - In these I had to change “socket” to “http”. I guess it could work with socket if I configured something better, but this worked for me.
  • /selene-backend/shared/selene/api/ - Change the Mycroft domain to your domain or IP
  • /selene-backend/projects//src/environments/environment.ts - There are a lot of these. Change the Mycroft domain to your domain or IP.

Other changes and gotchas not explained in Readme:

  • Selene Backend Environment variables SSO_BASE_URL and OAUTH_BASE_URL are suppossed to point to the SSO Selene Backend.
  • Add environment variable “DB_SSLMODE prefer” to Selene backends or they will not connect to the DB via SSL.
  • The SALT must be 16 character alphanumeric.
  • When running the DB bootstrap script, you must first add your own and to /opt/mycroft/devops/agreements
  • Had to use the script, modified to only use the part where it initializes the wake words, otherwise you cannot register devices.

I am omitting a lot of details and rationales for the changes, but that is the gist of it. I hope it is helpful.

1 Like

are any chances to make it work without docker?
when i try to acces sso backend i get error 500
i would appreciate your help.
Thank you!

May I ask why you are trying to run selene?

There is noone left in the mycroft team to help out, and with mycroft dead there is no reason so use selene at all since both OVOS and Neon work offline, so it will be hard to get any help around this

because i want to try to run fully independent from platform, or any platform.
could you help me with some advice?

you should drop mycroft-core and use ovos instead, it is the continuation of the original code since mycroft went under. then there is no need for selene at all, plus you get an updated and maintained code base instead of abandonware

if you must stick with the old unmaintained mycroft-core (does it even install?) you can try the personal backend, which historically was the only way to run it offline

1 Like

i tried to install ovos on RP3 b+ but is not working or is very slow

i like to install and operate selene because mycroft aparently is working very good.

Mycroft is breaking down one piece at a time. The successor projects can’t do anything about it. We don’t have any control over the old infrastructure, except for this forum. When old Mycroft-branded things go down or stop working, it’s usually forever.

If you’re trying to put the Assistant on a 3B, much like in the Picroft days, you’re better off installing our prebuilt Raspbian image, which already has the Assistant installed. It will still take several minutes to start up for the first time, because it’s not a very powerful computer.

Selene is kaput. The successor projects don’t need or want it, so it hasn’t been maintained and is not supported.

I understand.
Still my question is than anyone installed and make it work selene backend.

i managed to make the replica of mycroft backend server

1 Like

Well done! Is it something you are able to share on GitHub or elsewhere for others who may be interested?

i will try to do that.
i used documentation of mycroft selene backend and ui, and making a lot of debugging.
the database it was another version, i modified some scripts and adding others.
was a lot of work, but now it is working perfectly.
i can mage devices and i can register new ones.


I too would like a working selene backend/ui. I have a mark 1, the personal backend failed to install and my backup of my mark 1 is bad so I had to re-image it. It mostly works but has permanent yellow eyes. I have whisper and mimic3 running with gpu acceleration on a separate machine, I can manage skills via command line. I really just need it to calm down about losing it’s internet overlords.

side question: is there a mirror of somewhere? apt-upgrade fails because of that, I could probably just build the mycroft-mark-1 package if there isn’t a mirror.

I didn’t realize there was a Mycroft apt repo. I know @forslund has the mimic binary packaged in his own apt repo (GitHub - forslund/mycroft-desktop-repo: Simple repo for mycroft-packages) but I’m not sure about mycroft-mark-1.

I’m finding serveral little bits and pieces now that the mycroft services are gone. I saw this one when I tried an “apt-get upgrade”

here is a grep of mycroft in the /apt directory:
/etc/apt/sources.list.d/ debian main

You can try the raspOVOS headless image on your Mark1. I have had good luck with it.

1 Like

I had the impression that Ovos is slow on the mark I. Is that true? if not I’ll put ovos back in consideration. The other question I have is, Do they eyes and mouth work the same in ovos?

I had a general feeling that support for the Mark I in ovos is more of a kindness(thank you) than a goal. I don’t want to minimize anyone’s efforts, I appreciate all the work being done, so please don’t take my reluctance as being disapproval.

side note, I have been able get the selene web ui up and running, and I have all the backend sites running on different ports (not as containers) via uwsgi, but the existing documentation leaves out the parts I needs. simple stufll like they give a command to see that the backend is running, but not what the curl command should return. (the best I get is ‘empty response’).

enough of my woes. I may just install ovos on an sd card and see what goes, instead of worrying so much about keeping my “classic” all original.

I’ve been running OVOS on my Mark 1 for months. The mouth doesn’t quite work the same (grapheme to phoneme conversion isn’t as good outside of Mimic 1), but otherwise it’s quite fast. If you have a spare, I recommend “hot rodding” your Mark 1 with a Pi 4, as the 3 is pretty long in the tooth. The performance is just fine on original hardware but it really does well on the newer Pi.

It’s not a fully supported solution, mostly because not everyone developing for OVOS has a Mark 1 for testing, but it does pretty well. :slightly_smiling_face:

1 Like