EverydayTech Platform - Developer Reference
Complete Source Code Documentation - All Applications
Loading...
Searching...
No Matches
MeshCentral for EverydayTech RMM

MeshCentral deployment for DigitalOcean App Platform with PostgreSQL backend.

Features

  • ✅ PostgreSQL database backend (instead of NeDB)
  • ✅ Automatic deployments from GitHub
  • ✅ HTTPS with automatic certificates
  • ✅ WebSocket support for agents and remote desktop
  • ✅ Persistent data storage
  • ✅ Health checks and auto-restart

Setup Instructions

1. Create PostgreSQL Database

Create a new database in your existing DO managed PostgreSQL cluster:

psql "postgresql://doadmin:AVNS_J8RJAmsEwsHFG52_-F2@rmm-psa-db-do-user-28531160-0.i.db.ondigitalocean.com:25060/defaultdb?sslmode=require" -c "CREATE DATABASE meshcentral;"

2. Initialize Git Repository

cd /home/cw/Documents/IBG_HUB/rmm-psa-meshcentral
git init
git add .
git commit -m "Initial MeshCentral setup for App Platform"
git remote add origin https://github.com/Independent-Business-Group/rmm-psa-meshcentral.git
git push -u origin main

3. Deploy to App Platform

Option A: Using DigitalOcean CLI (doctl)

doctl apps create --spec .digitalocean/app.yaml

Option B: Using Web Console

  1. Go to https://cloud.digitalocean.com/apps
  2. Click "Create App"
  3. Choose GitHub and select rmm-psa-meshcentral repository
  4. Import the app.yaml configuration
  5. Update environment variables:
    • MESHCENTRAL_SESSION_KEY: Generate random string (e.g., openssl rand -hex 32)
    • Update MESHCENTRAL_DOMAIN with your actual App Platform URL or custom domain

4. Configure Custom Domain (Optional)

If using a custom domain like mesh.everydaytech.au:

  1. Add domain in App Platform settings
  2. Add DNS records:
    mesh.everydaytech.au CNAME meshcentral-xxxxx.ondigitalocean.app
  3. Update MESHCENTRAL_DOMAIN environment variable

5. Create Initial Admin Account

Once deployed, visit your MeshCentral URL and create the first admin account.

Database Schema

MeshCentral will automatically create these PostgreSQL tables:

  • meshcentral_main - Main objects (users, devices, meshes)
  • meshcentral_events - Event log
  • meshcentral_power - Power events
  • meshcentral_stats - Statistics
  • meshcentral_smbios - Hardware information

Configuration

Edit config.json to customize MeshCentral settings:

  • Domain settings
  • Authentication options
  • User permissions
  • Session timeouts
  • Agent configurations

Environment Variables

Required:

  • MESHCENTRAL_DOMAIN - Your domain (e.g., mesh.everydaytech.au)
  • MESHCENTRAL_SESSION_KEY - Random session encryption key
  • POSTGRES_HOST - Database host
  • POSTGRES_PORT - Database port (25060)
  • POSTGRES_USER - Database user (doadmin)
  • POSTGRES_PASSWORD - Database password
  • POSTGRES_DB - Database name (meshcentral)

Optional:

  • SMTP_HOST, SMTP_PORT, SMTP_FROM, SMTP_USER, SMTP_PASSWORD - Email notifications

Integrating with RMM Backend

Update your backend .env file:

MESHCENTRAL_URL=https://mesh.everydaytech.au # or your App Platform URL
MESHCENTRAL_USERNAME=apiuser
MESHCENTRAL_PASSWORD=your_password

Maintenance

Viewing Logs

doctl apps logs <app-id> --type run

Restarting

doctl apps restart <app-id>

Database Backup

pg_dump -h rmm-psa-db-do-user-28531160-0.i.db.ondigitalocean.com -p 25060 -U doadmin -d meshcentral > meshcentral_backup.sql

Troubleshooting

MeshCentral won't start

  1. Check logs: doctl apps logs <app-id>
  2. Verify PostgreSQL connection
  3. Ensure MESHCENTRAL_SESSION_KEY is set
  4. Check domain configuration

Agents can't connect

  1. Verify port 4433 is accessible
  2. Check agent configuration in MeshCentral
  3. Ensure agentPort and agentAliasPort are correct in config.json

Database connection issues

  1. Verify PostgreSQL database exists: CREATE DATABASE meshcentral;
  2. Check firewall rules allow App Platform IP
  3. Verify SSL connection settings

Migration from Docker

To migrate from your existing Docker setup:

  1. Stop the Docker container: docker stop meshcentral
  2. Export the database from Docker:
    docker exec meshcentral cat /opt/meshcentral/meshcentral-data/meshcentral.db > meshcentral_old.db
  3. Use MeshCentral's migration tool (if available) or manually recreate users in the new setup
  4. Update agents to point to the new URL

Cost Estimate

  • App Platform (Basic - XS): ~$5/month
  • PostgreSQL database: Shared with existing cluster (~$0 additional)
  • Total: ~$5/month

Support