meshcentral is a free and open-source remote management. MeshCentral provides full computer management over web
1. Prerequisites
2. Supported Operating Systems
This guide supports installation on:
3. Installation
RHEL/CentOS/Rocky Linux/AlmaLinux
# Install EPEL repository if needed
sudo dnf install -y epel-release
# Install meshcentral
sudo dnf install -y meshcentral
# Enable and start service
sudo systemctl enable --now meshcentral
# Configure firewall
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --reload
# Verify installation
meshcentral --version
Debian/Ubuntu
# Update package index
sudo apt update
# Install meshcentral
sudo apt install -y meshcentral
# Enable and start service
sudo systemctl enable --now meshcentral
# Configure firewall
sudo ufw allow 443
# Verify installation
meshcentral --version
Arch Linux
# Install meshcentral
sudo pacman -S meshcentral
# Enable and start service
sudo systemctl enable --now meshcentral
# Verify installation
meshcentral --version
Alpine Linux
# Install meshcentral
apk add --no-cache meshcentral
# Enable and start service
rc-update add meshcentral default
rc-service meshcentral start
# Verify installation
meshcentral --version
openSUSE/SLES
# Install meshcentral
sudo zypper install -y meshcentral
# Enable and start service
sudo systemctl enable --now meshcentral
# Configure firewall
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --reload
# Verify installation
meshcentral --version
macOS
# Using Homebrew
brew install meshcentral
# Start service
brew services start meshcentral
# Verify installation
meshcentral --version
FreeBSD
# Using pkg
pkg install meshcentral
# Enable in rc.conf
echo 'meshcentral_enable="YES"' >> /etc/rc.conf
# Start service
service meshcentral start
# Verify installation
meshcentral --version
Windows
# Using Chocolatey
choco install meshcentral
# Or using Scoop
scoop install meshcentral
# Verify installation
meshcentral --version
Initial Configuration
Basic Configuration
# Create configuration directory
sudo mkdir -p /etc/meshcentral
# Set up basic configuration
# See official documentation for detailed configuration options
# Test configuration
meshcentral --version
5. Service Management
systemd (RHEL, Debian, Ubuntu, Arch, openSUSE)
# Enable service
sudo systemctl enable meshcentral
# Start service
sudo systemctl start meshcentral
# Stop service
sudo systemctl stop meshcentral
# Restart service
sudo systemctl restart meshcentral
# Check status
sudo systemctl status meshcentral
# View logs
sudo journalctl -u meshcentral -f
OpenRC (Alpine Linux)
# Enable service
rc-update add meshcentral default
# Start service
rc-service meshcentral start
# Stop service
rc-service meshcentral stop
# Restart service
rc-service meshcentral restart
# Check status
rc-service meshcentral status
rc.d (FreeBSD)
# Enable in /etc/rc.conf
echo 'meshcentral_enable="YES"' >> /etc/rc.conf
# Start service
service meshcentral start
# Stop service
service meshcentral stop
# Restart service
service meshcentral restart
# Check status
service meshcentral status
launchd (macOS)
# Using Homebrew services
brew services start meshcentral
brew services stop meshcentral
brew services restart meshcentral
# Check status
brew services list | grep meshcentral
Windows Service Manager
# Start service
net start meshcentral
# Stop service
net stop meshcentral
# Using PowerShell
Start-Service meshcentral
Stop-Service meshcentral
Restart-Service meshcentral
# Check status
Get-Service meshcentral
Advanced Configuration
See the official documentation for advanced configuration options.
Reverse Proxy Setup
nginx Configuration
upstream meshcentral_backend {
server 127.0.0.1:443;
}
server {
listen 80;
server_name meshcentral.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name meshcentral.example.com;
ssl_certificate /etc/ssl/certs/meshcentral.example.com.crt;
ssl_certificate_key /etc/ssl/private/meshcentral.example.com.key;
location / {
proxy_pass http://meshcentral_backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Apache Configuration
<VirtualHost *:80>
ServerName meshcentral.example.com
Redirect permanent / https://meshcentral.example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName meshcentral.example.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/meshcentral.example.com.crt
SSLCertificateKeyFile /etc/ssl/private/meshcentral.example.com.key
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:443/
ProxyPassReverse / http://127.0.0.1:443/
</VirtualHost>
HAProxy Configuration
frontend meshcentral_frontend
bind *:80
bind *:443 ssl crt /etc/ssl/certs/meshcentral.pem
redirect scheme https if !{ ssl_fc }
default_backend meshcentral_backend
backend meshcentral_backend
balance roundrobin
server meshcentral1 127.0.0.1:443 check
Security Configuration
Basic Security Setup
# Set appropriate permissions
sudo chown -R meshcentral:meshcentral /etc/meshcentral
sudo chmod 750 /etc/meshcentral
# Configure firewall
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --reload
# Enable SELinux policies (if applicable)
sudo setsebool -P httpd_can_network_connect on
Database Setup
See official documentation for database configuration requirements.
Performance Optimization
System Tuning
# Basic system tuning
echo 'net.core.somaxconn = 65535' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv4.tcp_max_syn_backlog = 65535' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Monitoring
Basic Monitoring
# Check service status
sudo systemctl status meshcentral
# View logs
sudo journalctl -u meshcentral -f
# Monitor resource usage
top -p $(pgrep meshcentral)
9. Backup and Restore
Backup Script
#!/bin/bash
# Basic backup script
BACKUP_DIR="/backup/meshcentral"
DATE=$(date +%Y%m%d_%H%M%S)
mkdir -p "$BACKUP_DIR"
tar -czf "$BACKUP_DIR/meshcentral-backup-$DATE.tar.gz" /etc/meshcentral /var/lib/meshcentral
echo "Backup completed: $BACKUP_DIR/meshcentral-backup-$DATE.tar.gz"
Restore Procedure
# Stop service
sudo systemctl stop meshcentral
# Restore from backup
tar -xzf /backup/meshcentral/meshcentral-backup-*.tar.gz -C /
# Start service
sudo systemctl start meshcentral
6. Troubleshooting
Common Issues
1. Service won't start:
# Check logs
sudo journalctl -u meshcentral -n 100
sudo tail -f /var/log/meshcentral/meshcentral.log
# Check configuration
meshcentral --version
# Check permissions
ls -la /etc/meshcentral
2. Connection issues:
# Check if service is listening
sudo ss -tlnp | grep 443
# Test connectivity
telnet localhost 443
# Check firewall
sudo firewall-cmd --list-all
3. Performance issues:
# Check resource usage
top -p $(pgrep meshcentral)
# Check disk I/O
iotop -p $(pgrep meshcentral)
# Check connections
ss -an | grep 443
Integration Examples
Docker Compose Example
version: '3.8'
services:
meshcentral:
image: meshcentral:latest
ports:
- "443:443"
volumes:
- ./config:/etc/meshcentral
- ./data:/var/lib/meshcentral
restart: unless-stopped
Maintenance
Update Procedures
# RHEL/CentOS/Rocky/AlmaLinux
sudo dnf update meshcentral
# Debian/Ubuntu
sudo apt update && sudo apt upgrade meshcentral
# Arch Linux
sudo pacman -Syu meshcentral
# Alpine Linux
apk update && apk upgrade meshcentral
# openSUSE
sudo zypper update meshcentral
# FreeBSD
pkg update && pkg upgrade meshcentral
# Always backup before updates
tar -czf /backup/meshcentral-pre-update-$(date +%Y%m%d).tar.gz /etc/meshcentral
# Restart after updates
sudo systemctl restart meshcentral
Regular Maintenance
# Log rotation
sudo logrotate -f /etc/logrotate.d/meshcentral
# Clean old logs
find /var/log/meshcentral -name "*.log" -mtime +30 -delete
# Check disk usage
du -sh /var/lib/meshcentral
Additional Resources
---
Note: This guide is part of the HowToMgr collection. Always refer to official documentation for the most up-to-date information.