Start with Raspian Lite.
Note: Commands run as a superuser will be prefixed with /...# while commands run as a regular user will be prefixed with /...$
Turn on SSH with raspi-config. Option 5 (Interfacing Options), then option P2 (SSH):
/...# raspi-config
Add some utilities:
/...# apt update
/...# apt install mc tmux htop iftop
The following is from the MeshCentral Install PDF:
http://info.meshcentral.com/downloads/MeshCentral2/MeshCentral2InstallGuide.pdf
Install the current nodejs:
/...# curl -sL https://deb.nodesource.com/setup_14.x | bash -
/...# apt-get install -y nodejs
Port permissions (to allow node to use ports below 1024):
Use the whereis command to find the path to the node executable and use that path in the setcap command:
Note: I believe this is so you can run node as non-root, but still run on ports 80 & 443.
/...# whereis node
/...# setcap cap_net_bind_service=+ep /usr/bin/node
Install MeshCentral (Important Note: Run npm as a regular user)
/...$ npm install meshcentral
Run MeshCentral as the non-root user. The --fastcert switch will use RSA2048 instead of RSA3072 since we are only on a Raspberry Pi.
/...$ node node_modules/meshcentral --fastcert
Use a browser and go to the IP addr of the Pi. (The 1st user to be defined will be the Administrator.)
Setup systemd to start & stop MeshCentral.
Create the file /etc/systemd/system/meshcentral.service
/...$ sudo nano /etc/systemd/system/meshcentral.service
Enter the following into the file:
[Unit]
Description=MeshCentral Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/usr/bin/node /home/pi/node_modules/meshcentral
WorkingDirectory=/home/pi
Environment=NODE_ENV=production
User=pi
Group=pi
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
Enable & start MeshCentral using systemd:
/...# systemctl enable meshcentral.service
/...# systemctl start meshcentral.service
Finished. Reboot the Pi to make sure everything starts up as it should.