====== Meshcentral ======
apt install nodejs npm mariadb-server
mysql_secure_installation
useradd -r -s /sbin/nologin meshcentral
mkdir /opt/meshcentral
cd /opt/meshcentral
npm install meshcentral
chown -R meshcentral:meshcentral /opt/meshcentral
mysqlCREATE DATABASE meshcentral;
CREATE USER meshcentral@localhost IDENTIFIED BY 'xxx';
GRANT ALL PRIVILEGES ON meshcentral.* TO meshcentral@localhost;
flush privileges;
quit
nano /opt/meshcentral/meshcentral-data/config.json
{
"$schema": "http://info.meshcentral.com/downloads/meshcentral-config-schema.json",
"__comment1__": "This is a simple configuration file, all values and sections that start with underscore (_) are ignored. Edit a section and remove the _ in front of the name. Refer to the user's guide for>
"__comment2__": "See node_modules/meshcentral/sample-config-advanced.json for a more advanced example.",
"settings": {
"cert": "aa.makeitsimple.be",
"MariaDB" : { "host": "localhost", "user": "meshcentral", "password": "xxx", "database": "meshcentral" },
"WANonly": true,
"_LANonly": true,
"_sessionKey": "MyReallySecretPassword1",
"_port": 443,
"_aliasPort": 443,
"_redirPort": 80,
"_redirAliasPort": 80
},
"domains": {
"": {
"title": "makeITsimple",
"title2": "Remote platform",
"minify": true,
"newAccounts": false,
"_userNameIsEmail": true
}
},
"_letsencrypt": {
"__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.",
"email": "myemail@mydomain.com",
"names": "myserver.mydomain.com",
"production": false
}
}
nano /etc/systemd/system/meshcentral.service
[Unit]
Description=MeshCentral Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/usr/bin/node /opt/meshcentral/node_modules/meshcentral
WorkingDirectory=/opt/meshcentral
Environment=NODE_ENV=production
User=meshcentral
Group=meshcentral
Restart=always
# Restart service after 10 seconds if node service crashes
RestartSec=10
# Set port permissions capability
AmbientCapabilities=cap_net_bind_service
[Install]
WantedBy=multi-user.target
systemctl enable meshcentral.service
sudo systemctl start meshcentral.service
===== Sources =====
https://www.valken.org/installer-un-serveur-meshcentral.html