Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
laptopwiki:guides:docker:meshcentral [10/10/2024 22:01] – dustojnikhummer | laptopwiki:guides:docker:meshcentral [08/03/2025 18:58] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
* What is Nginx Proxy Manager (also known as NPM): [[https:// | * What is Nginx Proxy Manager (also known as NPM): [[https:// | ||
* What is Mesh Central: [[https:// | * What is Mesh Central: [[https:// | ||
- | * Container we will be using, including base of my docker-compose.yml: | + | * Container we will be using, including base of my docker-compose.yml: |
- | | + | |
* [[https:// | * [[https:// | ||
Line 20: | Line 19: | ||
* We will be using the official Docker container | * We will be using the official Docker container | ||
- | * Here is an example of my docker-compose.yml file | + | * Create a folder with the name meshcentral |
+ | * cd into the folder and create a docker-compose.yml file | ||
+ | * Paste the content of the following example into that file and edit whatever is necessary for you | ||
+ | * Run | ||
< | < | ||
+ | sudo docker compose up -d | ||
+ | |||
+ | </ | ||
+ | |||
+ | * Here is an example of my docker-compose.yml file | ||
+ | |||
+ | < | ||
networks: | networks: | ||
reverse_proxy: | reverse_proxy: | ||
external: true | external: true | ||
+ | |||
volumes: | volumes: | ||
files: | files: | ||
Line 47: | Line 57: | ||
restart: always | restart: always | ||
container_name: | container_name: | ||
- | image: ghcr.io/ | + | image: ghcr.io/ |
depends_on: | depends_on: | ||
- mongodb | - mongodb | ||
#ports: | #ports: | ||
# - 4433:4433 # This is used for Intel AMT, uncomment if you don't need it | # - 4433:4433 # This is used for Intel AMT, uncomment if you don't need it | ||
- | # - 443:443 # You don't need to expose the port 443 directly if MeshCentral is behind a reverse proxy | + | # - 443:443 # You don't need to expose the port 443 directly if MeshCentral is behind a reverse proxy, this is just for debugging |
environment: | environment: | ||
- TZ=Europe/ | - TZ=Europe/ | ||
Line 68: | Line 78: | ||
* In this, Mesh Central will use a MongoDB instance to store everything, instead of SQLite | * In this, Mesh Central will use a MongoDB instance to store everything, instead of SQLite | ||
* You must change: | * You must change: | ||
- | | + | |
- | - HOSTNAME - set your public FQDN | + | |
- | - REVERSE_PROXY - here put | + | |
- | * IP address of your NGINX Proxy Manager if it is on a different server than where Mesh Central will live | + | |
- | * internal docker Hostname if on the same Docker network <- My setup, " | + | |
* You can change | * You can change | ||
* TZ - timezone, so your logs have proper timestamps, follows standardized naming | * TZ - timezone, so your logs have proper timestamps, follows standardized naming | ||
- | | + | |
- | * Storage mounts (I had issues with MeshCentral Volume paths, so that is why I'm using volumes) | + | * Storage mounts (I had issues with MeshCentral Volume paths, so that is why I'm using volumes) |
* ALLOW_NEW_ACCOUNTS=false, | * ALLOW_NEW_ACCOUNTS=false, | ||
Line 82: | Line 88: | ||
* You will find the config file in the container' | * You will find the config file in the container' | ||
- | | + | |
- | * This file will have default root permissions | + | * This file will have default root permissions |
- | * The config contains some basic settings for MongoDB, examples of custom text and branding for agents. | + | * The config contains some basic settings for MongoDB, examples of custom text and branding for agents. |
- | * The branding will affect logos and text in the administrator WebUI, the MeshCentral Agent (if installed in interactive mode), Service Name of the MeshCentral agent (perfect if you need to run multiple agents on one machine, for example because of migrations to a different server or multiple MSPs managing one server) as well the MeshAssistant and Android app. | + | * The branding will affect logos and text in the administrator WebUI, the MeshCentral Agent (if installed in interactive mode), Service Name of the MeshCentral agent (perfect if you need to run multiple agents on one machine, for example because of migrations to a different server or multiple MSPs managing one server) as well the MeshAssistant and Android app. |
* Logos will need to be uploaded onto the local filesystem (a URL might work, never tried it, sorry) | * Logos will need to be uploaded onto the local filesystem (a URL might work, never tried it, sorry) | ||
* Open the config.json file with | * Open the config.json file with | ||
Line 281: | Line 287: | ||
==== So what are we changing and why? ==== | ==== So what are we changing and why? ==== | ||
- | * TLDR: | + | * TLDR: |
* Mesh Central uses a self signed certificate to talk to clients. | * Mesh Central uses a self signed certificate to talk to clients. | ||
* Since ours is behind NPM it can't communicate directly and hashes won't match. | * Since ours is behind NPM it can't communicate directly and hashes won't match. | ||
Line 289: | Line 295: | ||
- " | - " | ||
- " | - " | ||
- | - " | + | - " |
+ | |||
+ | |||
+ | ===== NGINX Proxy Manager ===== | ||
+ | | ||
+ | | ||
+ | | ||
+ | proxy_set_header X-Forwarded-Host $host: | ||
+ | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
+ | proxy_set_header X-Forwarded-Proto $scheme; | ||
+ | proxy_read_timeout 200s; | ||
+ | proxy_connect_timeout 200s; | ||
+ | proxy_send_timeout 200s; </ | ||
+ | ==== If Cloudflare Proxy ===== | ||
+ | - As of August 2023, MeshCentral no longer works through Cloudflare Proxy, see [[https:// | ||
+ | - < | ||
+ | - < | ||
+ | - < | ||
+ | ===== Issues ===== | ||
+ | ==== Unable to connect web socket ==== | ||
+ | | ||
+ | * | ||
+ | * | ||
+ | |||
+ | —- [[: | ||