Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions ct/meshmonitor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/usr/bin/env bash
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main"
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")

# Copyright (c) 2021-2026 community-scripts ORG
# Author: clartek
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
# Source: https://meshmonitor.org/

APP="MeshMonitor"
var_tags="${var_tags:-meshtastic;meshcore;monitoring}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-10}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
#var_arm64="${var_arm64:-no}" # Native dependencies have not been tested on arm64.
var_unprivileged="${var_unprivileged:-1}"

header_info "$APP"
variables
color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources

if [[ ! -d /opt/meshmonitor ]]; then
msg_error "No MeshMonitor Installation Found!"
exit 1
fi

if check_for_gh_release "meshmonitor" "Yeraze/meshmonitor"; then
msg_info "Stopping MeshMonitor"
systemctl stop meshmonitor meshmonitor-apprise
msg_ok "Stopped MeshMonitor"

create_backup /data /etc/meshmonitor

NODE_VERSION="24" setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "meshmonitor" "Yeraze/meshmonitor" "tarball"
restore_backup

# GitHub source archives omit submodules; use the commits pinned by this release.
github_api_call "https://api.github.com/repos/Yeraze/meshmonitor/git/trees/v$(cat ~/.meshmonitor)" /tmp/meshmonitor-tree.json
protobuf_commit=$(jq -er '.tree[] | select(.path == "protobufs" and .type == "commit") | .sha' /tmp/meshmonitor-tree.json)
takpacket_commit=$(jq -er '.tree[] | select(.path == "takpacket-sdk" and .type == "commit") | .sha' /tmp/meshmonitor-tree.json)
fetch_and_deploy_from_url "https://github.com/meshtastic/protobufs/archive/${protobuf_commit}.tar.gz" /opt/meshmonitor/protobufs
fetch_and_deploy_from_url "https://github.com/meshtastic/TAKPacket-SDK/archive/${takpacket_commit}.tar.gz" /opt/meshmonitor/takpacket-sdk
rm -f /tmp/meshmonitor-tree.json

msg_info "Building MeshMonitor"
cd /opt/meshmonitor || exit 1
PUPPETEER_SKIP_DOWNLOAD=true $STD npm install --legacy-peer-deps
$STD npm run build
$STD npm run build:server
$STD npm prune --omit=dev --legacy-peer-deps
msg_ok "Built MeshMonitor"

msg_info "Updating MeshMonitor Python Dependencies"
$STD uv pip install --upgrade --python /opt/meshmonitor-venv/bin/python apprise requests "paho-mqtt<2.0" meshtastic meshcore-cli
msg_ok "Updated MeshMonitor Python Dependencies"

msg_info "Starting MeshMonitor"
systemctl start meshmonitor-apprise meshmonitor
msg_ok "Started MeshMonitor"
msg_ok "Updated MeshMonitor successfully!"
fi
exit
}

start
build_container
description

msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}MeshMonitor setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}:3001${CL}"
echo -e "${INFO}${YW}Log in as admin with password changeme, change the password, then add your node in the web UI.${CL}"
112 changes: 112 additions & 0 deletions install/meshmonitor-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#!/usr/bin/env bash

# Copyright (c) 2021-2026 community-scripts ORG
# Author: clartek
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
# Source: https://meshmonitor.org/

source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os

msg_info "Installing MeshMonitor Dependencies"
$STD apt install -y \
build-essential \
git \
python3-dev \
libsqlite3-dev \
unzip
msg_ok "Installed MeshMonitor Dependencies"

NODE_VERSION="24" setup_nodejs
setup_uv

fetch_and_deploy_gh_release "meshmonitor" "Yeraze/meshmonitor" "tarball"

# GitHub source archives omit submodules; use the commits pinned by this release.
github_api_call "https://api.github.com/repos/Yeraze/meshmonitor/git/trees/v$(cat ~/.meshmonitor)" /tmp/meshmonitor-tree.json
protobuf_commit=$(jq -er '.tree[] | select(.path == "protobufs" and .type == "commit") | .sha' /tmp/meshmonitor-tree.json)
takpacket_commit=$(jq -er '.tree[] | select(.path == "takpacket-sdk" and .type == "commit") | .sha' /tmp/meshmonitor-tree.json)
fetch_and_deploy_from_url "https://github.com/meshtastic/protobufs/archive/${protobuf_commit}.tar.gz" /opt/meshmonitor/protobufs
fetch_and_deploy_from_url "https://github.com/meshtastic/TAKPacket-SDK/archive/${takpacket_commit}.tar.gz" /opt/meshmonitor/takpacket-sdk
rm -f /tmp/meshmonitor-tree.json

msg_info "Building MeshMonitor"
cd /opt/meshmonitor || exit 1
# The lockfile uses SSH for a public dependency; installation must not require SSH keys.
$STD git config --global url."https://github.com/".insteadOf "ssh://git@github.com/"
PUPPETEER_SKIP_DOWNLOAD=true $STD npm install --legacy-peer-deps
$STD npm run build
$STD npm run build:server
$STD npm prune --omit=dev --legacy-peer-deps
msg_ok "Built MeshMonitor"

msg_info "Installing MeshMonitor Python Dependencies"
$STD uv venv --seed /opt/meshmonitor-venv
$STD uv pip install --python /opt/meshmonitor-venv/bin/python apprise requests "paho-mqtt<2.0" meshtastic meshcore-cli
msg_ok "Installed MeshMonitor Python Dependencies"

msg_info "Configuring MeshMonitor"
mkdir -p /etc/meshmonitor /data/{apprise-config,scripts,logs}
cat <<EOF >/etc/meshmonitor/meshmonitor.env
NODE_ENV=production
PORT=3001
DATABASE_PATH=/data/meshmonitor.db
SESSION_SECRET=$(random_password 64)
COOKIE_SECURE=false
ALLOWED_ORIGINS=http://${LOCAL_IP}:3001
APPRISE_URL=http://127.0.0.1:8000
APPRISE_HOST=127.0.0.1
APPRISE_CONFIG_DIR=/data/apprise-config
APPRISE_STATEFUL_MODE=simple
EOF
chmod 600 /etc/meshmonitor/meshmonitor.env
msg_ok "Configured MeshMonitor"

msg_info "Creating MeshMonitor Services"
cat <<EOF >/etc/systemd/system/meshmonitor-apprise.service
[Unit]
Description=MeshMonitor Apprise Notification Service
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/meshmonitor
EnvironmentFile=/etc/meshmonitor/meshmonitor.env
ExecStart=/opt/meshmonitor-venv/bin/python /opt/meshmonitor/docker/apprise-api.py
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/meshmonitor.service
[Unit]
Description=MeshMonitor
After=network.target meshmonitor-apprise.service
Wants=meshmonitor-apprise.service

[Service]
Type=simple
User=root
WorkingDirectory=/opt/meshmonitor
EnvironmentFile=/etc/meshmonitor/meshmonitor.env
Environment=PATH=/opt/meshmonitor-venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ExecStart=/usr/bin/node /opt/meshmonitor/dist/server/server.js
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now meshmonitor-apprise meshmonitor
msg_ok "Created MeshMonitor Services"

motd_ssh
customize
cleanup_lxc
47 changes: 47 additions & 0 deletions json/meshmonitor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "MeshMonitor",
"slug": "meshmonitor",
"categories": [9, 18],
"date_created": "2026-10-20",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 3001,
"documentation": "https://meshmonitor.org/deployment/PROXMOX_LXC_GUIDE.html",
"website": "https://meshmonitor.org/",
"repository": "https://github.com/Yeraze/meshmonitor",
"logo": "https://raw.githubusercontent.com/Yeraze/meshmonitor/main/public/logo.png",
"description": "MeshMonitor is a web application for monitoring and managing Meshtastic and MeshCore networks. It provides maps, messaging, telemetry, and notifications for connected mesh nodes.",
"install_methods": [
{
"type": "default",
"script": "ct/meshmonitor.sh",
"config_path": "/etc/meshmonitor/meshmonitor.env",
"resources": {
"cpu": 2,
"ram": 4096,
"hdd": 10,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": "admin",
"password": "changeme"
},
"notes": [
{
"text": "Change the default admin password immediately after the first login.",
"type": "warning"
},
{
"text": "Add your Meshtastic or MeshCore node through the web UI. The container must be able to reach your node over the network.",
"type": "info"
},
{
"text": "When using a reverse proxy or a different access URL, update ALLOWED_ORIGINS in /etc/meshmonitor/meshmonitor.env and restart MeshMonitor.",
"type": "info"
}
]
}
Loading