2022-06-06 13:44:13 -04:00
# Create folder-structure and files
```
| - meshcentral/ # this folder contains the persistent data
| - data/ # MeshCentral data-files
| - user_files/ # where file uploads for users live
| - web/ # location for site customization files
| - backup/ # location for the meshcentral-backups
| - .env # environment file with initial variables
| - docker-compose.yml
```
2022-12-10 02:24:01 -05:00
# Templates
## .env
2023-03-07 22:30:33 -05:00
You can place the `config.json` file directly under `./meshcentral/data/` , or use the following `.env` file instead.
2022-12-10 02:24:01 -05:00
2022-06-06 13:44:13 -04:00
```ini
NODE_ENV=production
2023-03-07 22:30:33 -05:00
USE_MONGODB=false
# set already exist mongo connection string url here
MONGO_URL=
# or set following init params for new mongodb, use it with docker-compose file with mongodb version
2022-06-06 13:44:13 -04:00
MONGO_INITDB_ROOT_USERNAME=mongodbadmin
MONGO_INITDB_ROOT_PASSWORD=mongodbpasswd
# initial meshcentral-variables
# the following options are only used if no config.json exists in the data-folder
# your hostname
HOSTNAME=my.domain.com
2023-03-07 22:30:33 -05:00
# set to your reverse proxy IP if you want to put meshcentral behind a reverse proxy
2022-06-06 13:44:13 -04:00
REVERSE_PROXY=false
REVERSE_PROXY_TLS_PORT=
# set to true if you wish to enable iframe support
IFRAME=false
# set to false if you want disable self-service creation of new accounts besides the first (admin)
ALLOW_NEW_ACCOUNTS=true
2022-08-02 08:39:44 -04:00
# set to true to enable WebRTC - per documentation it is not officially released with meshcentral and currently experimental. Use with caution
2022-06-06 13:44:13 -04:00
WEBRTC=false
# set to true to allow plugins
ALLOWPLUGINS=false
# set to true to allow session recording
LOCALSESSIONRECORDING=false
# set to enable or disable minification of json, reduces traffic
MINIFY=true
2023-09-24 11:44:34 -04:00
# set this value to add extra arguments to meshcentral on startup (e.g --debug ldap)
ARGS=
2022-06-06 13:44:13 -04:00
```
2022-12-10 02:24:01 -05:00
## docker-compose.yml
2022-06-06 13:44:13 -04:00
```yaml
version: '3'
services:
meshcentral:
restart: always
container_name: meshcentral
2022-08-02 08:21:06 -04:00
# use the official meshcentral container
image: ghcr.io/ylianst/meshcentral:latest
2022-06-06 13:44:13 -04:00
ports:
# 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
- 8086:443
env_file:
- .env
volumes:
# config.json and other important files live here. A must for data persistence
- ./meshcentral/data:/opt/meshcentral/meshcentral-data
# where file uploads for users live
- ./meshcentral/user_files:/opt/meshcentral/meshcentral-files
# location for the meshcentral-backups - this should be mounted to an external storage
2022-12-10 02:24:01 -05:00
- ./meshcentral/backup:/opt/meshcentral/meshcentral-backups
2022-06-06 13:44:13 -04:00
# location for site customization files
- ./meshcentral/web:/opt/meshcentral/meshcentral-web
```
2022-12-10 02:24:01 -05:00
## docker-compose.yml mongodb
2021-11-02 10:37:06 -04:00
```yaml
2021-12-12 16:06:56 -05:00
version: '3'
2022-06-06 13:44:13 -04:00
networks:
meshcentral-tier:
driver: bridge
2021-11-02 10:37:06 -04:00
services:
2022-06-06 13:44:13 -04:00
mongodb:
restart: always
container_name: mongodb
image: mongo:latest
env_file:
- .env
volumes:
# mongodb data-directory - A must for data persistence
- ./meshcentral/mongodb_data:/data/db
networks:
- meshcentral-tier
meshcentral:
restart: always
container_name: meshcentral
2022-08-02 08:21:06 -04:00
# use the official meshcentral container
image: ghcr.io/ylianst/meshcentral:latest
2022-06-06 13:44:13 -04:00
depends_on:
- mongodb
ports:
# 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
- 8086:443
env_file:
- .env
volumes:
# config.json and other important files live here. A must for data persistence
- ./meshcentral/data:/opt/meshcentral/meshcentral-data
# where file uploads for users live
- ./meshcentral/user_files:/opt/meshcentral/meshcentral-files
# location for the meshcentral-backups - this should be mounted to an external storage
2022-12-10 02:24:01 -05:00
- ./meshcentral/backup:/opt/meshcentral/meshcentral-backups
2022-06-06 13:44:13 -04:00
# location for site customization files
- ./meshcentral/web:/opt/meshcentral/meshcentral-web
networks:
- meshcentral-tier
2021-11-02 10:37:06 -04:00
```