M1
Applications Azure

MeshCentral 1.3 on Ubuntu 26.04 LTS on Azure User Guide

| Product: MeshCentral 1.3 on Ubuntu 26.04 LTS on Azure

Overview

This guide covers deploying and using MeshCentral 1.3 on Ubuntu 26.04 LTS from cloudimg on Microsoft Azure.

MeshCentral is an open source, self-hosted remote device management server. You install its small agent on the Windows, Linux and macOS computers you look after. Each agent connects out to your server over HTTPS, so the devices need no open inbound port. From the browser you can then:

  • see every device and whether it is online;
  • open a remote terminal, remote desktop or file browser on it, and run commands;
  • read its hardware and software inventory and its event log;
  • share access with other users.

All of this goes through your own server.

Upstream MeshCentral lets the first person who opens a new server create the administrator account. The cloudimg image closes that and the other gaps of an internet facing install:

  • No default credentials, and no account for the taking. First boot creates the one administrator account, admin, with a password generated for your VM. The password is written to a root only file, and MeshCentral stores only a salted hash. Self-registration is off (creating an account answers 401). If MeshCentral's account database is ever missing, unreadable, damaged or empty of accounts, MeshCentral refuses to start instead of offering the server to the first visitor.
  • HTTPS from the first boot. nginx serves MeshCentral on port 443 with a certificate generated at first boot for your VM's public address, and port 80 redirects to HTTPS. MeshCentral is given the same certificate, so its agents can check they reached your server. Requests for a host name the VM does not serve get no answer.
  • Lockout and rate limits. After ten failed sign-ins from one IPv4 /24 range (or one IPv6 address) in ten minutes, MeshCentral refuses sign-in from that whole range for ten minutes. In front of that, nginx limits each client address (per IPv6 /64) to 30 a minute, bursts of 20, and answers 429 beyond that. The limit covers every sign-in, form post and browser WebSocket, and any request that carries credentials, whatever their spelling. Agent connections are not limited, and the agents' relay and file-transfer connections have their own, larger limit. Forged X-Forwarded-For headers do not move the limit and never reach MeshCentral's logs.
  • Other web sites cannot use your session. nginx refuses any sign-in, form post or WebSocket (the agent, relay and control channels) that comes from another site's page, and sends no CORS headers. Agents send no browser headers and connect normally. MeshCentral 1.3.2 also ties its sign-in cookie to your session.
  • The agent files are pinned and on the image. MeshCentral 1.3.2 and its Node.js packages are installed from a lock file checked by hash. The MeshAgent files it hands to your devices (Windows, Linux, macOS, FreeBSD and Android) are the release files MeshCentral 1.3.2 pins, verified against those pins at build time. MeshCentral does not download agents at run time.
  • MeshCentral listens on localhost only (127.0.0.1:4430). It runs as its own unprivileged meshcentral user with no Linux capabilities, and cannot change its own program files. Other local accounts (including your administrator account) cannot connect to it directly. Intel AMT's port 4433 and LAN discovery are off.
  • No outbound reach inside Azure. At the kernel level, on every boot, MeshCentral and nginx are refused any connection to:
  • the Azure Instance Metadata Service (169.254.169.254) and the WireServer (168.63.129.16);
  • link-local, private (RFC 1918), carrier grade NAT and reserved addresses;
  • your virtual network's own subnet.

Your devices connect in to MeshCentral, so it needs none of these. * Daily backups. MeshCentral backs up its database every 24 hours to /var/lib/meshcentral/backups and keeps 10 days of backups. * Fully patched Ubuntu 26.04 LTS at build time, with unattended security upgrades on.

What is on the image:

  • MeshCentral 1.3.2 (/opt/meshcentral) on Node.js 22, with its configuration /etc/meshcentral/config.json and the pinned agent files.
  • nginx, the HTTPS front door.
  • The tools meshcentral-set-domain, meshcentral-set-password, meshcentral-selftest and cloudimg-set-public-address.
  • Ubuntu 26.04 LTS with cloud-init and the Azure Linux agent.

Default user: the administrator account you choose when you deploy the VM (for example azureuser), with sudo. Architecture: x64, Gen2.

Prerequisites

  • An active Azure subscription and an SSH public key.
  • A virtual network and subnet in your target region (the Portal creates them for you if needed).
  • A DNS name for the server (for example mesh.example.com) is strongly recommended before you add devices. See Step 5.
  • Network Security Group rules that allow:
Port Protocol Source Purpose
22 TCP your admin network SSH
443 TCP your administrators and your devices the web interface, and the agents on your devices
80 TCP optional redirects to HTTPS, so plain http:// links work

Agents connect out to port 443 on the server: the devices need no inbound port.

Recommended virtual machine size: Standard_B2s (2 vCPU, 4 GB RAM) serves a few dozen devices well. Add memory as the number of devices and remote sessions grows.

Step 1: Deploy the virtual machine

Option A: Azure Portal

Search for MeshCentral 1.3 on Ubuntu 26.04 LTS in the Azure Marketplace, select the cloudimg offer and click Create. Choose your resource group, region and size, set the administrator username and your SSH public key, and allow inbound SSH (TCP 22). After the VM is created, add an inbound rule to its Network Security Group for TCP 443 (and TCP 80 if you want the redirect), limited to the networks your administrators and devices connect from.

Use a Standard SKU public IP, which is static: agents connect to the server's name or address, so it should never change.

Option B: Azure CLI

Accept the Marketplace terms once per subscription, then create the VM and open its ports (replace the source prefix with yours):

RG="meshcentral-prod"; LOCATION="eastus"; VM_NAME="meshcentral1"
IMAGE_URN="cloudimg1647283583153:meshcentral-ubuntu-26-04:default:latest"
az group create --name "$RG" --location "$LOCATION"
az vm image terms accept --urn "$IMAGE_URN"
az vm create \
  --resource-group "$RG" --name "$VM_NAME" \
  --image "$IMAGE_URN" \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_rsa.pub \
  --public-ip-sku Standard
az network nsg rule create --resource-group "$RG" --nsg-name "${VM_NAME}NSG" \
  --name meshcentral-https --priority 1001 --protocol Tcp --destination-port-ranges 443 80 \
  --source-address-prefixes <your-cidr> --access Allow

First boot takes about a minute after the VM is running:

  1. It reads the VM's public address from the Azure Instance Metadata Service.
  2. It generates the certificate, creates the admin account and writes the credentials file.
  3. The egress backstop loads.
  4. MeshCentral and nginx start.

Step 2: Connect over SSH

Find the VM's public IP address and connect as the administrator you chose:

PUBLIC_IP=$(az vm show -d --resource-group "$RG" --name "$VM_NAME" --query publicIps -o tsv)
ssh azureuser@"$PUBLIC_IP"

Step 3: Check the services

systemctl is-active cloudimg-meshcentral-egress meshcentral nginx
sudo test -f /var/lib/cloudimg/meshcentral-firstboot.done && echo FIRSTBOOT_DONE

All three units are active and the first boot marker is present:

active
active
active
FIRSTBOOT_DONE

Only SSH and nginx listen on the network. MeshCentral (the node process) listens on localhost only:

sudo ss -lntpH | awk '{print $4, $6}' | sed -E 's/users:\(\("([^"]+)".*/\1/' | grep -v '127.0.0.5' | sort -u
0.0.0.0:22 sshd
0.0.0.0:443 nginx
0.0.0.0:80 nginx
127.0.0.1:4430 node
[::]:22 sshd
[::]:443 nginx
[::]:80 nginx

The three units active, the listening set with only SSH and nginx on the network and MeshCentral's node process on 127.0.0.1:4430, and MeshCentral 1.3.2 on Node.js v22.23.5 and Ubuntu 26.04.1 LTS

Step 4: Get your URL and password

sudo cat /root/meshcentral-credentials.txt

The file is readable by root only. It holds the URL, the user name, the certificate's fingerprint and the password:

# MeshCentral 1.3.2 (cloudimg) on this instance. Open MESHCENTRAL_URL in a browser and sign in as MESHCENTRAL_USERNAME / MESHCENTRAL_PASSWORD.
# The password is unique to this instance. Change it in the web UI (My Account), or: sudo meshcentral-set-password (--stdin to choose one).
# The certificate is self-signed for this instance: compare its SHA-256 fingerprint with MESHCENTRAL_TLS_SHA256.
# Set your DNS name (or a new public IP) BEFORE deploying agents: sudo cloudimg-set-public-address mesh.example.com
MESHCENTRAL_URL=https://203.0.113.25/
MESHCENTRAL_HOST=203.0.113.25
MESHCENTRAL_USERNAME=admin
MESHCENTRAL_TLS_SHA256=<64 hex digits, colon separated>
MESHCENTRAL_ADDRESS_SOURCE=azure-imds-loadbalancer
GUIDE=https://www.cloudimg.co.uk/guides/meshcentral-1-3-on-ubuntu-26-04-azure/
MESHCENTRAL_PASSWORD=<MESHCENTRAL_PASSWORD>

MESHCENTRAL_ADDRESS_SOURCE says where the address came from:

  • the VM's public IPv4 address from the Azure Instance Metadata Service (its instance or its load-balancer view);
  • the private address, when the VM has no public one.

The image includes a self test. It runs through nginx, pinned to this VM's certificate, and checks that:

  • the sign-in page loads;
  • a wrong password is refused and the admin password signs in;
  • the agent endpoint accepts a WebSocket.
sudo meshcentral-selftest
meshcentral-selftest: sign-in page ok; a wrong password refused; the admin password signs in; /agent.ashx upgrades (101)
MESHCENTRAL_SELFTEST_OK

The non-secret lines of the credentials file (the URL and host on the VM's public address, the user admin, the certificate fingerprint and the address source) and meshcentral-selftest ending in MESHCENTRAL_SELFTEST_OK

Step 5: Set your server's name before you add devices

Every agent MeshCentral builds carries two things: the server's name, and the fingerprint of MeshCentral's own server key. It connects only to that name. Agents installed while the server is known by its IP address keep looking for that address.

So, before you add your first device, point a DNS A record (for example mesh.example.com) at the VM's public IP and run:

sudo cloudimg-set-public-address <your-domain>
public address: 203.0.113.25 -> mesh.example.com
  updated /root/meshcentral-credentials.txt
meshcentral-set-domain: nginx for mesh.example.com 203.0.113.25 10.20.0.15 localhost 127.0.0.1
meshcentral-set-domain: TLS certificate for mesh.example.com (SAN DNS:mesh.example.com,IP:203.0.113.25,IP:10.20.0.15,DNS:localhost,IP:127.0.0.1)
meshcentral-set-domain: MeshCentral settings.cert = mesh.example.com (/etc/meshcentral/config.json)
meshcentral-set-domain: restarted MeshCentral and nginx
meshcentral-set-domain: https://mesh.example.com/ (also served: 203.0.113.25 10.20.0.15 localhost 127.0.0.1). Agents you deploy from now on connect to wss://mesh.example.com/agent.ashx

This command:

  • sets the name nginx accepts, keeping the previous address and the private address served too;
  • generates a new self signed certificate for them;
  • sets MeshCentral's settings.cert;
  • updates MESHCENTRAL_URL, MESHCENTRAL_HOST and MESHCENTRAL_TLS_SHA256 in the credentials file.

Run it again with a new name whenever it changes, or with no argument to go back to the public IP Azure reports. If you keep using the IP address, keep the Standard (static) public IP so it never changes.

For a certificate your browser trusts:

  1. Put the certificate chain for <your-domain> in /etc/ssl/meshcentral/meshcentral.crt.
  2. Put its private key in /etc/ssl/meshcentral/meshcentral.key (root only, mode 600).
  3. Run sudo meshcentral-set-domain --keep-cert <your-domain>.

The last command checks that the certificate covers the name and gives MeshCentral its copy of the certificate.

The endpoints your devices use, all on port 443 of <your-domain>:

Endpoint Used by
https://<your-domain>/ the web interface (administrators and users)
wss://<your-domain>/agent.ashx the agent on each device (one long lived WebSocket)
wss://<your-domain>/meshrelay.ashx remote desktop, terminal and file sessions, relayed between your browser and the device
https://<your-domain>/meshagents the agent downloads and install scripts behind Add Agent

Step 6: Sign in

Open MESHCENTRAL_URL in your browser. The certificate is self signed for your VM, so the browser warns once. To check you are talking to your VM, open the certificate details and compare its SHA-256 fingerprint with MESHCENTRAL_TLS_SHA256, then continue. Sign in as admin with MESHCENTRAL_PASSWORD. The sign-in page offers no way to create an account.

The MeshCentral sign-in page with empty Username and Password fields and a Log In button, and no link to create an account

Turn on two-factor sign-in now. Open My Account (the second icon on the left) and choose Manage authenticator app to add a time based one time password, or Manage security keys for a hardware key. Change password on the same page changes the admin password.

Step 7: Create a device group and add a device

Devices belong to device groups, and permissions are given per group. To create a group:

  1. On My Devices, choose click here to create a device group (later, Add Device Group).
  2. Give it a name and keep the type Manage using a software agent.
  3. Choose OK.

MeshCentral's New Device Group dialog: a group name, the type Manage using a software agent, and OK and Cancel

Choose Add Agent next to the group, then pick the device's operating system:

  • Windows: download the agent .exe and run it on the device.
  • Linux or BSD: copy the command and run it on the device as root.

The agent and its install script are downloaded from your server. They carry the server's name, its certificate fingerprint and the group.

The Linux command downloads the install script with wget, which refuses a certificate the device does not trust. While your server uses its self signed certificate, trust it on each Linux device first. Fetch it, check that its fingerprint equals MESHCENTRAL_TLS_SHA256 from your credentials file, and add it to the device's trust store (Debian and Ubuntu shown):

echo | openssl s_client -connect <your-domain>:443 -servername <your-domain> 2>/dev/null | openssl x509 > meshcentral.crt
openssl x509 -noout -fingerprint -sha256 -in meshcentral.crt
sudo cp meshcentral.crt /usr/local/share/ca-certificates/meshcentral.crt && sudo update-ca-certificates

Then run the Add Agent command unchanged. With a certificate from a public certificate authority (Step 5) this step is not needed.

MeshCentral's Add Mesh Agent dialog with Linux / BSD selected: a command that downloads meshinstall.sh from the server's /meshagents and runs it with the server URL and the group's identifier

Within a few seconds of installing, the device appears in its group as online:

MeshCentral's My Devices page with the new device group holding one online Linux device

Step 8: Manage a device

Click a device to open it. General shows its group, operating system, agent and the logged in user, with buttons to run commands, send a message, chat or share the device. The tabs across the top open:

  • a remote Terminal;
  • a remote Desktop, on devices with a desktop;
  • the device's Files, its installed Software and its Events;
  • its hardware Details.

MeshCentral's General page for the device hq-server-01: its group, Mesh Agent Linux 64bit, Ubuntu 26.04.1 LTS, Agent connected, the Actions, Run, Message, Chat and Share buttons, and the Terminal, Files, Software, Events, Details and Console tabs

Linux Security reports the device's own firewall: Firewall - BAD means the agent found no firewall turned on on that device; it is about the device, not your MeshCentral server.

The Terminal tab opens a shell on the device through the agent:

MeshCentral's remote Terminal connected to hq-server-01 as root, showing uname -a printing the device's Linux 7.0.0-1021-azure kernel

Remote sessions are relayed through your server on port 443 (/meshrelay.ashx): neither your browser nor the device needs any other port open.

Users. Give each person their own account rather than sharing admin:

  1. As admin, open My Users (the fifth icon) and choose Add User.
  2. Give the user rights on a device group from the group's page.

Each user signs in with their own password and can add two-factor sign-in.

Your server. My Server (the last icon) shows the server's load, memory and connected agents and sessions. It also holds Download server backup, Restore server with backup, the server's error log and its configuration.

Step 9: Change the password

Change the admin password in the web interface (My Account, Change password), or on the VM. To generate a new random password (written to the credentials file as MESHCENTRAL_PASSWORD):

sudo meshcentral-set-password

To choose your own (16 characters or more, read from standard input and not stored on the VM):

sudo meshcentral-set-password --stdin
meshcentral-set-password: the admin password was changed

meshcentral-set-password is also the way back in if you are locked out, or if admin has lost its two-factor device: it unlocks the account and removes its two-factor methods. It restarts MeshCentral, which disconnects the agents for a few seconds; they reconnect on their own.

Step 10: Configure MeshCentral

MeshCentral reads /etc/meshcentral/config.json, which is owned by root:

sudo jq -c '{settings: .settings | {cert, port, aliasPort, portBind, redirPort, mpsPort, tlsOffload, trustedProxy, WANonly, maxInvalidLogin, autoBackup}, domain: .domains[""] | {title, title2, newAccounts}}' /etc/meshcentral/config.json
{"settings":{"cert":"203.0.113.25","port":4430,"aliasPort":443,"portBind":"127.0.0.1","redirPort":0,"mpsPort":0,"tlsOffload":"127.0.0.1","trustedProxy":"127.0.0.1","WANonly":true,"maxInvalidLogin":{"time":10,"count":10,"coolofftime":10},"autoBackup":{"backupPath":"/var/lib/meshcentral/backups","backupIntervalHours":24,"keepLastDaysBackup":10}},"domain":{"title":"MeshCentral","title2":"cloudimg","newAccounts":false}}

Edit it with sudo nano /etc/meshcentral/config.json, then run sudo systemctl restart meshcentral. Every MeshCentral setting is in the configuration reference. Email (smtp), for example, lets MeshCentral send invitations and notifications. Keep newAccounts false.

nginx holds the certificate and is the only way in. So MeshCentral refuses to start when any of these is true (journalctl -u meshcentral says why):

  • cert is not your server's name (cloudimg-set-public-address sets it);
  • port is not 4430;
  • portBind or tlsOffload is not 127.0.0.1;
  • redirPort is not 0;
  • letsencrypt is set.

Step 11: Outbound connections

MeshCentral, nginx and the first boot service are refused any connection to the Azure Instance Metadata Service and the WireServer. The meshcentral and www-data accounts are also refused:

  • link-local, private, carrier grade NAT, reserved and multicast addresses;
  • your VM's own virtual network subnet, read from the metadata service on every boot;
  • all IPv6 except localhost.

Your devices connect in to MeshCentral, so it needs no internal address for normal use.

The allow list is empty by default:

sed -n '1,6p' /etc/cloudimg/meshcentral-egress-allow
# cloudimg MeshCentral egress allow-list (empty by default).
# Managed devices reach MeshCentral INBOUND (their agents connect to this server on 443), so MeshCentral needs no internal
# address for normal use. MeshCentral itself opens connections to a private network only for Intel AMT devices managed over
# the LAN (ports 16992-16995), Wake-on-LAN relays or an internal SMTP/LDAP server: list such a network here, one CIDR per line - it must lie inside 10.0.0.0/8,
# 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10 or fc00::/7 (metadata and link-local addresses can never be allowed) -
# then run:   sudo systemctl reload cloudimg-meshcentral-egress

The metadata service and the WireServer can never be allowed.

Step 12: Security checks

These checks show that:

  • self-registration is refused;
  • a sign-in or WebSocket from another site's page is refused;
  • agents connect, and the health check needs no password;
  • a host name the VM does not serve gets no answer;
  • plain HTTP redirects;
  • other local accounts cannot reach MeshCentral directly.
H=$(sudo sed -n 's/^MESHCENTRAL_HOST=//p' /root/meshcentral-credentials.txt); WRONG="not-the-password"
curl -sk -o /dev/null -w 'sign-in page: %{http_code}\n' --resolve "$H:443:127.0.0.1" "https://$H/"
curl -sk -o /dev/null -w 'create an account: %{http_code}\n' --resolve "$H:443:127.0.0.1" -X POST -H "Origin: https://$H" -d action=createaccount -d username=intruder -d email=x@example.com -d password1=Aa1-$WRONG -d password2=Aa1-$WRONG "https://$H/createaccount"
curl -sk -o /dev/null -w 'sign-in POST from another site: %{http_code}\n' --resolve "$H:443:127.0.0.1" -X POST -H 'Origin: https://evil.example' -d action=login -d username=admin -d password=x "https://$H/login"
curl -sk -o /dev/null -w 'WebSocket from another site: %{http_code}\n' --http1.1 --resolve "$H:443:127.0.0.1" -H 'Connection: Upgrade' -H 'Upgrade: websocket' -H 'Sec-WebSocket-Version: 13' -H "Sec-WebSocket-Key: $(openssl rand -base64 16)" -H 'Origin: https://evil.example' -m 5 "https://$H/control.ashx"
curl -sk -o /dev/null -w 'agent endpoint: %{http_code}\n' --http1.1 --resolve "$H:443:127.0.0.1" -H 'Connection: Upgrade' -H 'Upgrade: websocket' -H 'Sec-WebSocket-Version: 13' -H "Sec-WebSocket-Key: $(openssl rand -base64 16)" -m 5 "https://$H/agent.ashx" || true
curl -sk -o /dev/null -w 'health check: %{http_code}\n' --resolve "$H:443:127.0.0.1" "https://$H/healthz"
curl -sk -o /dev/null -w 'unknown host name: %{http_code}\n' --resolve evil.example:443:127.0.0.1 https://evil.example/ || true
curl -s -o /dev/null -w 'http: %{http_code}\n' --resolve "$H:80:127.0.0.1" "http://$H/"
curl -s -m 5 -o /dev/null -w 'MeshCentral directly, as azureuser: %{http_code}\n' http://127.0.0.1:4430/ || true
sign-in page: 200
create an account: 401
sign-in POST from another site: 403
WebSocket from another site: 403
agent endpoint: 101
health check: 200
unknown host name: 000
http: 301
MeshCentral directly, as azureuser: 000

Step 12's checks: the sign-in page 200, creating an account 401, a sign-in from another site 403, the agent endpoint 101, an unknown host name 000, plain HTTP 301, and MeshCentral refused to the administrator account on 127.0.0.1:4430

MeshCentral, nginx and the first boot service are blocked from the metadata service, the WireServer and reserved addresses:

for u in meshcentral nginx meshcentral-firstboot; do printf '%s ' "$u"; systemctl show -p IPAddressDeny --value "$u" | tr ' ' '\n' | sort | tr '\n' ' '; echo; done
sudo -u meshcentral curl -s -m 5 -o /dev/null -w 'metadata from the meshcentral account: %{http_code}\n' -H Metadata:true 'http://169.254.169.254/metadata/instance?api-version=2021-02-01' || true
sudo -u meshcentral curl -s -m 5 -o /dev/null -w 'WireServer from the meshcentral account: %{http_code}\n' http://168.63.129.16/?comp=versions || true
meshcentral 168.63.129.16/32 169.254.169.254/32 192.0.0.0/24 198.18.0.0/15 2001::/32 2002::/16 224.0.0.0/4 240.0.0.0/4 64:ff9b:1::/48 64:ff9b::/96 ::ffff:0.0.0.0/96
nginx 168.63.129.16/32 169.254.169.254/32 192.0.0.0/24 198.18.0.0/15 2001::/32 2002::/16 224.0.0.0/4 240.0.0.0/4 64:ff9b:1::/48 64:ff9b::/96 ::ffff:0.0.0.0/96
meshcentral-firstboot 168.63.129.16/32 169.254.169.254/32 192.0.0.0/24 198.18.0.0/15 2001::/32 2002::/16 224.0.0.0/4 240.0.0.0/4 64:ff9b:1::/48 64:ff9b::/96 ::ffff:0.0.0.0/96
metadata from the meshcentral account: 000
WireServer from the meshcentral account: 000

The egress backstop refuses the private ranges and your subnet. It reads the subnet on every boot:

sudo iptables -S CLOUDIMG-MESHCENTRAL-EGRESS | sed -n '1,4p'
cat /run/cloudimg/meshcentral-subnet-cidrs
-N CLOUDIMG-MESHCENTRAL-EGRESS
-A CLOUDIMG-MESHCENTRAL-EGRESS -d 127.0.0.0/8 -o lo -j RETURN
-A CLOUDIMG-MESHCENTRAL-EGRESS -d 169.254.0.0/16 -p tcp -j REJECT --reject-with tcp-reset
-A CLOUDIMG-MESHCENTRAL-EGRESS -d 169.254.0.0/16 -j REJECT --reject-with icmp-admin-prohibited
10.20.0.0/24

Your subnet is shown on the last line (10.20.0.0/24 here).

MeshCentral (its launcher and the server process it starts) runs as meshcentral, on localhost, with no Linux capabilities, and cannot gain any:

P=$(systemctl show -p MainPID --value meshcentral)
ps -o user:11=,args= --ppid "$P" -p "$P"
for p in $P $(pgrep -P "$P"); do sudo grep -E '^(CapEff|CapBnd|CapAmb|NoNewPrivs)' /proc/"$p"/status | tr '\n' ' '; echo; done
meshcentral /usr/bin/node /opt/meshcentral/node_modules/meshcentral/meshcentral.js --datapath /var/lib/meshcentral/data
meshcentral /usr/bin/node --disable-proto=delete /opt/meshcentral/node_modules/meshcentral/meshcentral.js --datapath /var/lib/meshcentral/data --launch <pid>
CapEff: 0000000000000000 CapBnd:    0000000000000000 CapAmb:    0000000000000000 NoNewPrivs:    1
CapEff: 0000000000000000 CapBnd:    0000000000000000 CapAmb:    0000000000000000 NoNewPrivs:    1

The credentials, the TLS key and MeshCentral's database are readable by their owner only:

sudo stat -c '%a %U:%G %n' /root/meshcentral-credentials.txt /etc/ssl/meshcentral/meshcentral.key /etc/meshcentral/config.json /var/lib/meshcentral/data/meshcentral.db /var/lib/meshcentral/data /var/lib/meshcentral/backups
600 root:root /root/meshcentral-credentials.txt
600 root:root /etc/ssl/meshcentral/meshcentral.key
644 root:root /etc/meshcentral/config.json
600 meshcentral:meshcentral /var/lib/meshcentral/data/meshcentral.db
700 meshcentral:meshcentral /var/lib/meshcentral/data
700 meshcentral:meshcentral /var/lib/meshcentral/backups

The meshcentral account refused the Azure metadata service and the WireServer, the subnet the egress backstop reads, both MeshCentral processes with no capabilities and NoNewPrivs set, and the credentials, TLS key and database readable by their owner only

Other notes:

  • Lockout. After 10 failed sign-ins from one IPv4 /24 range in 10 minutes, MeshCentral refuses sign-in from every address in that range for 10 minutes, even with the right password. This is MeshCentral's default iprange blocking; an IPv6 client is counted by its own address. Colleagues who share an office network therefore share the lockout. Restarting MeshCentral (sudo systemctl restart meshcentral, or sudo meshcentral-set-password) clears it at once.
  • Rate limits. The sign-in limit (30 a minute, bursts of 20) counts:
  • every request other than a page or download (GET);
  • every WebSocket;
  • any request that carries credentials: an x-meshauth header, or an auth, user or pass query parameter in any spelling (any case, bracketed or percent-encoded).

So GET /?user=...&pass=... and the browser's own remote-session relays count too. Only the agents' own connections are treated differently, and only when they carry nothing but the query parameters MeshCentral's agents use: * /agent.ashx is not limited (agents authenticate with their certificate); * the agent side of /meshrelay.ashx and /agenttransfer.ashx has its own limit of 120 a minute, bursts of 120.

The burst of 20 covers normal use: each page load opens one control channel, and each remote desktop, terminal or files session opens one relay. A script that signs in or posts in a tight loop from one address gets 429; slow it to one request every two seconds. Many administrators behind one shared address share the limit. * Client addresses. nginx replaces any X-Forwarded-For or X-Real-IP a client sends with the address it connected from. So MeshCentral's lockout, its IP filters and its logs see the real client. nginx keeps no query strings in its access log, because MeshCentral puts session tokens there. * The account database fails closed. Before MeshCentral starts, the image checks its database /var/lib/meshcentral/data/meshcentral.db. If the file is missing, unreadable, damaged or holds no account, MeshCentral stays stopped and the journal says why (journalctl -u meshcentral). It never lets the first visitor create an administrator. Restore the database from a backup (Step 13) and start it. * Program files. MeshCentral cannot write to /opt/meshcentral, so its own update button cannot change it. New versions arrive as new versions of this image (Step 14). * Intel AMT. The Intel AMT management port (4433) is off. To manage AMT devices, see the MeshCentral documentation and open the port in config.json and your Network Security Group. * Who can reach it. Keep port 22 open only to your own networks. Port 443 must be open to your devices; open it no wider than they need. * Logs. nginx logs are in /var/log/nginx. MeshCentral logs to the journal (journalctl -u meshcentral) and keeps its event log in its database (Events in the web interface).

Step 13: Back up

MeshCentral writes a backup of its database every 24 hours to /var/lib/meshcentral/backups and keeps the last 10 days. On My Server, Download server backup downloads one now, and Restore server with backup restores one. Copy the backups off the VM regularly:

ssh azureuser@<public-ip> 'sudo tar -C /var/lib/meshcentral -czf - backups' > meshcentral-backups.tar.gz

The data directory /var/lib/meshcentral/data also holds MeshCentral's own server keys, which the agents trust. So also keep an Azure Backup or a snapshot of the VM's OS disk, which is a complete backup.

Step 14: Keep it up to date

Unattended upgrades apply Ubuntu's security updates. To apply all Ubuntu updates now:

sudo apt-get update && sudo apt-get upgrade -y

New MeshCentral releases arrive as new versions of this image, built and checked the same way. Read the MeshCentral release notes before you move.

Your agents keep working across a move when the new server has the same name, the same server keys (the data directory) and the database. Restore a backup on the new version, or move the data directory.

Server components

Component Version Source
MeshCentral 1.3.2 npm package meshcentral, installed from a hash-checked lock file
Node.js 22.23.5 NodeSource's Node.js 22 repository, signing key pinned by fingerprint
nginx 1.28.3 Ubuntu 26.04 archive
Operating system Ubuntu 26.04.1 LTS Canonical

Filesystem layout

Path What it holds
/ The 30 GB OS disk (about 28 GB usable)
/opt/meshcentral MeshCentral's program files and the pinned agent files (read-only to MeshCentral)
/etc/meshcentral/config.json MeshCentral's configuration (root owned)
/var/lib/meshcentral/data MeshCentral's database, server keys and its copy of the certificate
/var/lib/meshcentral/backups The daily backups (10 days kept)
/etc/ssl/meshcentral/ nginx's certificate and key
/root/meshcentral-credentials.txt The URL, the admin password and the certificate fingerprint (root only)
/usr/share/doc/cloudimg-meshcentral/ The licences, the lock file and the agent file checksums
/mnt The Azure temporary disk: its contents are lost when the VM is deallocated

Support and licensing

MeshCentral is open source under the Apache License 2.0, installed unmodified from its npm package. /usr/share/doc/cloudimg-meshcentral holds:

  • MeshCentral's licence text and the lock file it was installed from;
  • the licence of every Node.js package it ships (MIT, ISC, BSD, BlueOak and Apache 2.0);
  • the checksums of the agent files.
ls /usr/share/doc/cloudimg-meshcentral
LICENSE.meshcentral
README.cloudimg
SOURCE.txt
dependency-licences.txt
meshagent-files.sha256
package-lock.json

MeshCentral includes two components under the GNU General Public License 3.0 or later for browser remote desktop over RDP: node-rdpjs and mstsc.js. They ship unmodified as part of its package, and README.cloudimg and SOURCE.txt say where their source is. The MeshAgent files are open source under the Apache License 2.0. The source code is at github.com/Ylianst/MeshCentral.

There is no per device or per user licence fee. cloudimg provides the build, the hardening, the first boot setup, the image maintenance and support. cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours.

Ubuntu is a registered trademark of Canonical Ltd. MeshCentral is not endorsed by or affiliated with cloudimg.

Deploy on Azure

Find MeshCentral 1.3 on Ubuntu 26.04 LTS on the Azure Marketplace, published by cloudimg, and deploy it from the Portal or the Azure CLI as shown above.

Need help?

Email support@cloudimg.co.uk for deployment help, configuration questions or licensing enquiries.