-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running MeshCentral Sate-less with MariaDB #4645
Comments
Hi. Sorry for the delay. First, note that passing command line switches is the same as putting a value in the "Settings" section of the config.json. So:
Is the same as placing this value in your config.json file:
So, you can configure MariaDB in the config.json as you want and run this:
Then to start the server, run:
Of course the issue here is that your going to have a minimal config.json to connect to the database to get the rest of the config.json. I am going to give this a try myself just for kicks, will report back. |
Ok, I just did some testing and put fixes for the state-less server stuff. Fixes will be in v1.0.90. I tried with PostgreSQL, but it's the same code for MariaDB. I setup the config.json with the DB settings, then loaded the configuration like this:
I then switched the config.json to this. With only the database stuff:
I then run the server like this:
Now, you still need this mini config.json to get the database to connect. Let me know if that is a problem. Once v1.0.90 is published, let me know if this works. |
Another option is to use this mini config.json:
In this case, you don't need any command line switches. Again, same for MariaDB. |
Thanks heaps for this, will test and report back soon. |
Tried and it works as advised. Thanks heaps again Had to provide database name as well. |
I was trying to run Meshcentral state-less so the certificates and the config files are stored in the databased with encryption
The following commands worked to put the configs/certs into the database as per documentation
However, I am running MariaDB and could not figure out the equivalent command for MariaDB. The below is available in the doco for MongoDB
Moreover, I tried setting up a test server with MongoDB > used the same commands above and it does what it is designed to do except that when I tried to run it as a service - it fails
Once the service starts - it creates new certificates and config files and cannot load the config from the server.
The text was updated successfully, but these errors were encountered: