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 [06/01/2025 10:09] – 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 24: | Line 24: | ||
* Run | * Run | ||
< | < | ||
+ | |||
sudo docker compose up -d | sudo docker compose up -d | ||
Line 34: | Line 35: | ||
reverse_proxy: | reverse_proxy: | ||
external: true | external: true | ||
+ | |||
volumes: | volumes: | ||
files: | files: | ||
Line 55: | 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 75: | Line 77: | ||
* 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 | + | * You can change |
- | * internal docker Hostname if on the same Docker network <- My setup, " | + | * TZ - timezone, so your logs have proper timestamps, follows standardized naming |
- | * You can change | + | * For example, TZ=Europe/ |
- | * For example, TZ=Europe/ | + | * 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, | + | |
===== Config File ===== | ===== Config File ===== | ||
- | * 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 | + | |
- | * The config contains some basic settings for MongoDB, examples of custom text and branding for agents. | + | * This file will have default root permissions |
+ | * The config contains some basic settings for MongoDB, examples of custom text and branding for agents. | ||
+ | | ||
* 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 284: | Line 287: | ||
==== So what are we changing and why? ==== | ==== So what are we changing and why? ==== | ||
- | * TLDR: * Mesh Central uses a self signed certificate to talk to clients. | + | * TLDR: |
+ | * 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. | ||
* We need to tell it to instead use NPM's certificate | * We need to tell it to instead use NPM's certificate | ||
Line 291: | Line 295: | ||
- " | - " | ||
- " | - " | ||
- | - " | + | - " |
- | '' | + | |
===== NGINX Proxy Manager ===== | ===== NGINX Proxy Manager ===== | ||
- | - Add a new Proxy host as you would with any other Docker container | + | - Add a new Proxy host as you would with any other Docker container \\ {{: |
- | - The following screenshot has an error - **SCHEME = https** | + | - Check Cache Assets, Block Common Exploits and Websockets Support - In SSL, select your certificate, |
- | - Check Cache Assets, Block Common Exploits and Websockets Support | + | - In the **Advanced** |
- | | + | |
- | - In the **Advanced** | + | |
proxy_set_header X-Forwarded-Host $host: | proxy_set_header X-Forwarded-Host $host: | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
Line 304: | Line 307: | ||
proxy_read_timeout 200s; | proxy_read_timeout 200s; | ||
proxy_connect_timeout 200s; | proxy_connect_timeout 200s; | ||
- | proxy_send_timeout 200s;</ | + | proxy_send_timeout 200s; </ |
- | + | ==== If Cloudflare Proxy ===== | |
- | ===== If Cloudflare Proxy ===== | + | - As of August 2023, MeshCentral no longer works through Cloudflare Proxy, see [[https:// |
- | - As of August 2023, MeshCentral no longer works through Cloudflare Proxy, see [[https:// | + | |
- < | - < | ||
- < | - < | ||
Line 313: | Line 316: | ||
==== Unable to connect web socket ==== | ==== Unable to connect web socket ==== | ||
* If you get this error after logging into the Mesh Central WebUI do: | * If you get this error after logging into the Mesh Central WebUI do: | ||
- | | + | |
+ | * | ||
+ | |||
+ | —- [[: | ||
- | ---- | ||
- | [[: |