version: '3' networks: reverse_proxy: external: true volumes: data: files: services: mongodb: container_name: meshcentral_db restart: always image: mongo:latest expose: - 27017 volumes: - '/docker/containers/meshcentral/database:/data/db' networks: - reverse_proxy meshcentral: restart: always container_name: meshcentral depends_on: - 'mongodb' image: typhonragewind/meshcentral:mongodb-latest ports: - 8786:443 #MeshCentral will moan and try everything not to use port 80, but you can also use it if you so desire, just change the config.json according to your needs environment: - HOSTNAME=meshcentral.laptopwiki.eu #your hostname - REVERSE_PROXY=nginx-proxy-manager #set to your reverse proxy IP if you want to put meshcentral behind a reverse proxy - REVERSE_PROXY_TLS_PORT=443 #internal https port, only change if you don't use 443 for your incoming HTTPS for some reason - IFRAME=false #set to true if you wish to enable iframe support - ALLOW_NEW_ACCOUNTS=false #set to false if you want disable self-service creation of new accounts besides the first (admin) - WEBRTC=false #set to true to enable WebRTC - per documentation it is not offically released with meshcentral, but is solid enough to work with. Use with caution - NODE_ENV=production - TZ=Europe/Prague volumes: - data:/opt/meshcentral/meshcentral-data - files:/opt/meshcentral/meshcentral-files networks: - reverse_proxy
sudo nano /var/lib/docker/volumes/meshcentral_data/_data/config.json
{ "$schema": "http://info.meshcentral.com/downloads/meshcentral-config-schema.json", "settings": { "cert": "meshcentral.laptopwiki.eu", "_WANonly": true, "_LANonly": true, "_sessionKey": "generate_password_here", "port": 443, "_aliasPort": 443, "redirPort": 80, "_redirAliasPort": 80, "AgentPong": 300, "TLSOffload": "nginx-proxy-manager", "_ignoreAgentHashCheck": false, "SelfUpdate": false, "AllowFraming": "false", "mongodb": "mongodb://mongodb:27017/mesh", "mongodbcol": "mesh", "WebRTC": "false" }, "domains": { "": { "_title": "Mesh Central", "_title2": "Mesh Central", "_minify": true, "NewAccounts": "false", "_userNameIsEmail": true, "certUrl": "https://meshcentral.laptopwiki.eu:443" } }, "_letsencrypt": { "__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before>", "_email": "[email protected]", "_names": "myserver.mydomain.com", "production": false } }
proxy_set_header CF-Connecting-IP $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;
— dustojnikhummer 30/07/2023 00:11