docs - formatting fixes
silversword411 committed
May 17, 2022 at 00:56 UTC
5737538d49bbca446ca71cdfbf681f6ebebb0f15
1 file changed
+67
-67
docs/docs/install/index.md
+67
-67
@@ -38,7 +38,7 @@ For some who want to skip this document entirely, there are quick install script
38
39
#### Amazon Linux 2
40
41
-For Amazon EC2 users, that want to manage 100 devices or less. Launch a t3.nano or t3.micro EC2 instance with Amazon Linux 2 with TCP ports 22 (SSH), 80 (HTTP), 443 (HTTPS) and 4433 (CIRA) open. Then login as “ec2-user” and enter the following commands:
41
+For Amazon EC2 users, that want to manage 100 devices or less. Launch a t3.nano or t3.micro EC2 instance with Amazon Linux 2 with TCP ports 22 (SSH), 80 (HTTP), 443 (HTTPS) and 4433 (CIRA) open. Then login as `ec2-user` and enter the following commands:
42
43
```
44
wget http://info.meshcentral.com/scripts/mc-aws-linux2.sh
@@ -58,7 +58,7 @@ After these scripts are run, try accessing the server using a browser. MeshCentr
58
59
#### Microsoft Azure
60
61
-For 100 devices or less, launch an instance of Ubuntu 18.04 using a small B1s instance. Set the username to “default” in all lower case and open ports 22, 80, 443 and 3389 using the basic network profile. Then start the instance and run the following lines.
61
+For 100 devices or less, launch an instance of Ubuntu 18.04 using a small B1s instance. Set the username to `default` in all lower case and open ports 22, 80, 443 and 3389 using the basic network profile. Then start the instance and run the following lines.
62
63
```
64
wget http://info.meshcentral.com/scripts/mc-azure-ubuntu1804.sh
@@ -78,7 +78,7 @@ There are two ways to get MeshCentral setup.
78
79
#### Windows Installation Tool
80
81
-The MeshCentral installer tool for Microsoft Windows can be downloaded at www.meshcommander.com/meshcentral2 or by clicking this link. This tool will automatically detect and install NodeJS if needed. NodeJS will be downloaded from https://nodejs.org checked and installed. We recommend the installer be run on a modern version of Windows (.e.g. Win8.1, Win10, Win Server 2012* or better)
81
+The MeshCentral installer tool for Microsoft Windows can be downloaded at <https://www.meshcommander.com/meshcentral2> or by clicking this link. This tool will automatically detect and install NodeJS if needed. NodeJS will be downloaded from <https://nodejs.org> checked and installed. We recommend the installer be run on a modern version of Windows (.e.g. Win8.1, Win10, Win Server 2012* or better)
82
83

84
@@ -98,7 +98,7 @@ During installation, the installation tool will prompt for the following setting
98
99
`LAN mode`: Recommended for small installation within a local network. Server host does not need a fixed IP address or DNS record to operate.
100
101
- `WAN or Hybrid modes`: Server host will require a fixed IP address or DNS record to function correctly. If selected, user will need to enter server’s DNS name or static IP address in the “Server Name” field. This name or IP address will be used by browsers and agents to connect back to the server, this name MUST be correct or the server will not work. If you do not have a fixed name, select LAN mode to get started.
101
+ `WAN or Hybrid modes`: Server host will require a fixed IP address or DNS record to function correctly. If selected, user will need to enter server’s DNS name or static IP address in the `Server Name` field. This name or IP address will be used by browsers and agents to connect back to the server, this name MUST be correct or the server will not work. If you do not have a fixed name, select LAN mode to get started.
102
103
Acquiring a static IP or DNS record is beyond the scope of this document. Please seek advice or consult your network administrator if unsure. If unsure, leave the settings as default (as-is) and proceed setup in LAN mode to manage computers that reside within the same network.
104
@@ -112,7 +112,7 @@ By default, MeshCentral will use TCP ports 80 (HTTP), 443 (HTTPS) and 4433 (Inte
112
113
### NPM Installation for Advanced Users
114
115
-For advanced users or administrators, MeshCentral can be installed with NPM, a NodeJS package manager that can be accessed via web browser (https://www.npmjs.com/) or command line tool, “npm”.
115
+For advanced users or administrators, MeshCentral can be installed with NPM, a NodeJS package manager that can be accessed via web browser (https://www.npmjs.com/) or command line tool, `npm`.
116
117

118
@@ -120,15 +120,15 @@ For advanced users or administrators, MeshCentral can be installed with NPM, a N
120
As a prerequisite, NodeJS and NPM must be installed on host OS and HTTP/HTTPS proxy settings maybe required if server host resides behind a HTTP proxy server.
121
122
1. To begin, start a command line terminal (Windows Command Prompt or Linux Terminal) and type the following to verify if nodeJS and npm has been installed correctly as shown below
123
- a. To check on nodeJS installed version, type “node –v” and hit “enter” key
124
- b. To check on npm installed version, type “npm –v” and hit “enter” key
123
+ a. To check on nodeJS installed version, type `node –v` and hit `enter` key
124
+ b. To check on npm installed version, type `npm –v` and hit `enter` key
125
126
2. If MeshCentral installation is performed on a server host that resides behind a HTTP proxy, NPM’s proxy settings must be updated with respective proxy settings associated with the network environment. Skip this step if not applicable.
127
```
128
- .e.g. for http proxy “npm config set proxy http://proxy.com:88”
129
- .e.g. for https proxy “npm config set https-proxy http://proxy.com:88”
128
+ .e.g. for http proxy `npm config set proxy http://proxy.com:88`
129
+ .e.g. for https proxy `npm config set https-proxy http://proxy.com:88`
130
```
131
-3. Create a new directory “MeshCentral” and run the NPM install command as shown below:
131
+3. Create a new directory `MeshCentral` and run the NPM install command as shown below:
132
```
133
mkdir meshcentral
134
cd meshcentral
@@ -139,7 +139,7 @@ npm install meshcentral
139
```
140
node node_modules/meshcentral [arguments]
141
```
142
- **Warning**: Do not run MeshCentral by going into the “node_modules/meshcentral” folder as this may cause auto-install and self-update features to fail. Instead, go into the directory above “node_modules” and run “node node_modules/meshcentral”.
142
+ **Warning**: Do not run MeshCentral by going into the `node_modules/meshcentral` folder as this may cause auto-install and self-update features to fail. Instead, go into the directory above `node_modules` and run `node node_modules/meshcentral`.
143

144
**Note**: If MeshCentral is started without any arguments, default settings in LAN-only mode will be in effect and user/administrator will only be able to manage computers that reside within the local network.
145
5. To manage computers over the internet, the server needs to have static IP settings or a DNS record that resolves back to the right server. The mesh agents will be using the mechanism to call home to MeshCentral server. For WAN or Hybrid mode, run one of the commands below
@@ -154,7 +154,7 @@ node node_modules/meshcentral --cert 1.2.3.4
154
!!!Note
155
At this point, no user account will be created or available for the user hence 1st user account will be the most privileged user with Administrator rights
156
157
-- User is advised to create an “admin” account immediately by navigating to https://127.0.0.1 with a web browser.
157
+- User is advised to create an `admin` account immediately by navigating to https://127.0.0.1 with a web browser.
158
159
**Note**: To run MeshCentral as a service, run it using `--install` argument. Once running, start a web browser and access MeshCentral application with respective URL.
160
@@ -162,21 +162,21 @@ node node_modules/meshcentral --cert 1.2.3.4
162
163
On Windows, the built-in firewall will need to be configured to allow TCP ports 80, 443 and 4433 and sometimes UDP port 16990. The MeshCentral Windows Installer will add incoming rules for these ports automatically. If using the advanced NPM installation or when changing the default ports, it may be needed to add or edit these firewall rules. In this section we look at how to do this.
164
165
-To get started, we need to go in the control panel, click “System and Security” then “Windows Defender Firewall” and “Advanced Settings” on the left side then click on “Inbound rules”. This will get us on the right place to add or edit firewall rules.
165
+To get started, we need to go in the control panel, click `System and Security` then `Windows Defender Firewall` and `Advanced Settings` on the left side then click on `Inbound rules`. This will get us on the right place to add or edit firewall rules.
166
167

168
169
-If the MeshCentral Windows Installer was used, the “MeshCentral Server TCP ports” and optionally “MeshCentral Server UDP ports” rules should already be present.
169
+If the MeshCentral Windows Installer was used, the `MeshCentral Server TCP ports` and optionally `MeshCentral Server UDP ports` rules should already be present.
170
171
#### Editing the existing rules
172
173
-To edit an existing rule, simply double click on it. To change the allowed inbound ports, go to the “Protocols and Ports” tab and change the local ports.
173
+To edit an existing rule, simply double click on it. To change the allowed inbound ports, go to the `Protocols and Ports` tab and change the local ports.
174
175

176
177
#### Add new firewall rules
178
179
-To add a new firewall rule, click on the “New Rule…” then select “Port” and ok. TCP or UDP and enter the specific local ports needed and ok. Then click ok twice, enter the rule name and ok again.
179
+To add a new firewall rule, click on the `New Rule…` then select `Port` and ok. TCP or UDP and enter the specific local ports needed and ok. Then click ok twice, enter the rule name and ok again.
180
181

182
@@ -184,11 +184,11 @@ Typically, inbound TCP ports 80, 443 and 4433 are used, but the rule can be adde
184
185
### Amazon Linux 2
186
187
-In this section, we will look at installing MeshCentral on Amazon AWS with “Amazon Linux 2”. This is a low cost instance and a free tier is available so you can experiment or run a small instance of MeshCentral and it will work perfectly fine.
187
+In this section, we will look at installing MeshCentral on Amazon AWS with `Amazon Linux 2`. This is a low cost instance and a free tier is available so you can experiment or run a small instance of MeshCentral and it will work perfectly fine.
188
189
#### Getting the AWS instance setup
190
191
-On AWS EC2, you can launch an instance and select “Amazon Linux 2”. In this case, it’s the first option available.
191
+On AWS EC2, you can launch an instance and select `Amazon Linux 2`. In this case, it’s the first option available.
192
193

194
@@ -196,11 +196,11 @@ When launching a new instance, you are asked to use or create a security group w
196
197

198
199
-All security group rules should have a source of “0.0.0.0/0” and “::/0”. The last rule for port 8080 is only needed if migrating from a MeshCentral1 server, most people don’t need it and should not be added.
199
+All security group rules should have a source of `0.0.0.0/0` and `::/0`. The last rule for port 8080 is only needed if migrating from a MeshCentral1 server, most people don’t need it and should not be added.
200
201
If you are not going to be managing Intel AMT computers, you can remove port 4433. One can also remove port 80, however it’s needed to get a Let’s Encrypt certificate and useful to route users from the HTTP to the HTTPS web page.
202
203
-For all the following sections, we assume that we are in the “ec2-user” home path. You can do:
203
+For all the following sections, we assume that we are in the `ec2-user` home path. You can do:
204
205
```
206
cd ~
@@ -232,7 +232,7 @@ If we are going to run a large instance, it’s best to use MongoDB as the datab
232
233
If you want to use MongoDB, we can install MongoDB Community Edition. More information on how to do this can be found here.
234
235
-Using “nano” create the file “/etc/yum.repos.d/mongodb-org-4.0.repo”:
235
+Using `nano` create the file `/etc/yum.repos.d/mongodb-org-4.0.repo`:
236
237
```
238
sudo nano /etc/yum.repos.d/mongodb-org-4.0.repo
@@ -273,7 +273,7 @@ This is useful to know if you want to make a backup of the database file.
273
274
#### Port permissions
275
276
-On Linux, ports below 1024 are reserved for the “root” user. This is a security feature. In our case MeshCentral will need to listen to ports 80 and 443. To allow this, we need to allow node to listen to ports below 1024 like this:
276
+On Linux, ports below 1024 are reserved for the `root` user. This is a security feature. In our case MeshCentral will need to listen to ports 80 and 443. To allow this, we need to allow node to listen to ports below 1024 like this:
277
278
```
279
whereis node
@@ -282,7 +282,7 @@ node: /home/ec2-user/.nvm/versions/node/v8.11.3/bin/node
282
sudo setcap cap_net_bind_service=+ep /home/ec2-user/.nvm/versions/node/v8.11.3/bin/node
283
```
284
285
-We first locate the node binary, using “whereis node”, we then use the “setcap” command to add permissions to node. Note that we take the path given by whereis and place it in the setcap command. The “setcap” command will set permissions allowing node to use ports 1024 and below. This permission may be lost when updating the Linux kernel, so this command may need to be applied again in some case.
285
+We first locate the node binary, using `whereis node`, we then use the `setcap` command to add permissions to node. Note that we take the path given by whereis and place it in the setcap command. The `setcap` command will set permissions allowing node to use ports 1024 and below. This permission may be lost when updating the Linux kernel, so this command may need to be applied again in some case.
286
287
#### Installing MeshCentral
288
@@ -306,9 +306,9 @@ Now, we can use the node package manager (NPM) to install MeshCentral.
306
npm install meshcentral
307
```
308
!!!warning
309
- Do not use “sudo” in front of “npm install meshcentral”.
309
+ Do not use `sudo` in front of `npm install meshcentral`.
310
311
-After that, we can run MeshCentral for the first time. We want to run in WAN-only mode since we will not be managing any computers on the same local network at this server. We also want to create a server with a certificate name that is the same at the AWS instance name. So, we will use “--wanonly” and “--cert [name]” arguments to get the server started. For example:
311
+After that, we can run MeshCentral for the first time. We want to run in WAN-only mode since we will not be managing any computers on the same local network at this server. We also want to create a server with a certificate name that is the same at the AWS instance name. So, we will use `--wanonly` and `--cert [name]` arguments to get the server started. For example:
312
313
```
314
node ./node_modules/meshcentral --wanonly --cert ec2-1-2-3-4.us-west-2.compute.amazonaws.com
@@ -383,7 +383,7 @@ Once you are done, we can stop the server again using CTRL-C and in the next sec
383
384
#### Manually starting the server
385
386
-We can manually start and stop the MeshCentral server in the background in different ways. In this section, we are going to create two commands “mcstart” and “mcstop” to take care of this. Type this to create the two commands:
386
+We can manually start and stop the MeshCentral server in the background in different ways. In this section, we are going to create two commands `mcstart` and `mcstop` to take care of this. Type this to create the two commands:
387
388
```
389
echo "node ./node_modules/meshcentral > stdout.txt 2> stderr.txt &" > mcstart
@@ -393,11 +393,11 @@ echo "pkill –f node_modules/meshcentral" > mcstop
393
chmod 755 mcstop
394
```
395
396
-You can now run the “./mcstart” command to launch the server in the background and stop it using the “./mcstop” to stop it. This should work pretty well, but if the AWS instance is ever stopped and started again, the server will not automatically launch.
396
+You can now run the `./mcstart` command to launch the server in the background and stop it using the `./mcstop` to stop it. This should work pretty well, but if the AWS instance is ever stopped and started again, the server will not automatically launch.
397
398
#### Automatically starting the server
399
400
-Since Amazon Linux 2 supports systemd, we are going to use that to auto-start MeshCentral in the background. First, we need to know our own username and group. If we do “ls -l” in our home folder we get for example:
400
+Since Amazon Linux 2 supports systemd, we are going to use that to auto-start MeshCentral in the background. First, we need to know our own username and group. If we do `ls -l` in our home folder we get for example:
401
402
```
403
drwxr-xr-x 2 default default 4096 Jul 20 00:03 Desktop
@@ -406,7 +406,7 @@ drwxr-xr-x 2 default default 4096 Jul 20 00:03 Downloads
406
…
407
```
408
409
-Note the username and group name, in this example it’s “default” for both. We need this information to create the system service description file. To create this file type:
409
+Note the username and group name, in this example it’s `default` for both. We need this information to create the system service description file. To create this file type:
410
411
```
412
sudo pico /etc/systemd/system/meshcentral.service
@@ -458,11 +458,11 @@ In this section, we will look at installing MeshCentral on the famous Raspberry
458
459

460
461
-For this installation, we are going to use the Raspbian operating system. You can use the NOOBS version to install this operating system on your Raspberry Pi and install Raspbian. For best performance you can use the “Raspbian Stretch Lite” image which is much smaller and does not have the X desktop interface. To keep things even smaller, we are not going to be installing MongoDB, instead we are just going to be using NeBD as a database that comes by default with MeshCentral.
461
+For this installation, we are going to use the Raspbian operating system. You can use the NOOBS version to install this operating system on your Raspberry Pi and install Raspbian. For best performance you can use the `Raspbian Stretch Lite` image which is much smaller and does not have the X desktop interface. To keep things even smaller, we are not going to be installing MongoDB, instead we are just going to be using NeBD as a database that comes by default with MeshCentral.
462
463
#### Installing NodeJS
464
465
-Start by opening a terminal. For all of the installation, we will assume we are the default “pi” user and we are in the home (~) folder. Let’s get started by installing NodeJS.
465
+Start by opening a terminal. For all of the installation, we will assume we are the default `pi` user and we are in the home (~) folder. Let’s get started by installing NodeJS.
466
467
```
468
sudo apt-get update
@@ -481,7 +481,7 @@ If all goes well, we can now move on to port permissions and installing MeshCent
481
482
#### Port permissions
483
484
-On Linux, ports below 1024 are reserved for the “root” user. This is a security feature. In our case MeshCentral will need to listen to ports 80 and 443. To allow this, we need to allow node to listen to ports below 1024 like this:
484
+On Linux, ports below 1024 are reserved for the `root` user. This is a security feature. In our case MeshCentral will need to listen to ports 80 and 443. To allow this, we need to allow node to listen to ports below 1024 like this:
485
486
```
487
whereis node
@@ -490,7 +490,7 @@ node: /usr/bin/node /usr/include/node /usr/share/man/man1/node.1.gz
490
sudo setcap cap_net_bind_service=+ep /usr/bin/node
491
```
492
493
-We first locate the node binary, using “whereis node”, we then use the “setcap” command to add permissions to node. Note that we take the path given by whereis and place it in the setcap command. The “setcap” command will set permissions allowing node to use ports 1024 and below. This permission may be lost when updating the Linux kernel, so this command may need to be applied again in some case.
493
+We first locate the node binary, using `whereis node`, we then use the `setcap` command to add permissions to node. Note that we take the path given by whereis and place it in the setcap command. The `setcap` command will set permissions allowing node to use ports 1024 and below. This permission may be lost when updating the Linux kernel, so this command may need to be applied again in some case.
494
495
496
#### Installing MeshCentral
@@ -502,9 +502,9 @@ npm install meshcentral
502
```
503
504
!!!warning
505
- Do not use “sudo” in front of “npm install meshcentral”.
505
+ Do not use `sudo` in front of `npm install meshcentral`.
506
507
-After that, we can run MeshCentral for the first time. We want to run in WAN-only mode since we will not be managing any computers on the same local network at this server. We also want to create a server with a certificate name that is the same at the AWS instance name. So, we will use “--wanonly” and “--cert [name]” arguments to get the server started. For example:
507
+After that, we can run MeshCentral for the first time. We want to run in WAN-only mode since we will not be managing any computers on the same local network at this server. We also want to create a server with a certificate name that is the same at the AWS instance name. So, we will use `--wanonly` and `--cert [name]` arguments to get the server started. For example:
508
509
```
510
node node_modules/meshcentral --lanonly --fastcert
@@ -525,7 +525,7 @@ MeshCentral HTTPS web server running on port 443.
525
Server has no users, next new account will be site administrator.
526
```
527
528
-The next step is to get the IP address of the Raspberry Pi. Use “ipconfig”:
528
+The next step is to get the IP address of the Raspberry Pi. Use `ipconfig`:
529
530
```
531
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
@@ -575,11 +575,11 @@ Then, make the start of the file look like this:
575
}
576
```
577
578
-While we are at it, we can put “FastCert” to true so that RSA2048 certificates are created instead of RSA3072. This is less secure but runs much faster on small processors like the Raspberry Pi. This is the same as specifying “--fastcert" in the prior section.
578
+While we are at it, we can put `FastCert` to true so that RSA2048 certificates are created instead of RSA3072. This is less secure but runs much faster on small processors like the Raspberry Pi. This is the same as specifying `--fastcert" in the prior section.
579
580
#### Manually starting the server
581
582
-We can manually start and stop the MeshCentral server in the background in different ways. In this section, we are going to create two commands “mcstart” and “mcstop” to take care of this. Type this to create the two commands:
582
+We can manually start and stop the MeshCentral server in the background in different ways. In this section, we are going to create two commands `mcstart` and `mcstop` to take care of this. Type this to create the two commands:
583
584
```
585
echo "node ./node_modules/meshcentral > stdout.txt 2> stderr.txt &" > mcstart
@@ -589,11 +589,11 @@ echo "pkill -f node_modules/meshcentral" > mcstop
589
chmod 755 mcstop
590
```
591
592
-You can now run the “./mcstart” command to launch the server in the background and stop it using the “./mcstop” to stop it. This should work pretty well, but if the AWS instance is ever stopped and started again, the server will not automatically launch.
592
+You can now run the `./mcstart` command to launch the server in the background and stop it using the `./mcstop` to stop it. This should work pretty well, but if the AWS instance is ever stopped and started again, the server will not automatically launch.
593
594
#### Automatically starting the server
595
596
-Since Raspbian OS supports systemd, we are going to use that to auto-start MeshCentral in the background. First, we need to know our own username and group. If we do “ls -l” in our home folder we
596
+Since Raspbian OS supports systemd, we are going to use that to auto-start MeshCentral in the background. First, we need to know our own username and group. If we do `ls -l` in our home folder we
597
598
```
599
drwxr-xr-x 2 pi pi 4096 Jul 19 21:23 Desktop
@@ -602,7 +602,7 @@ drwxr-xr-x 2 pi pi 4096 Jun 26 18:23 Downloads
602
…
603
```
604
605
-Note the username and group name, in this example it’s “pi” for both. We need this information to create the system service description file. To create this file type:
605
+Note the username and group name, in this example it’s `pi` for both. We need this information to create the system service description file. To create this file type:
606
607
```
608
sudo nano /etc/systemd/system/meshcentral.service
@@ -649,7 +649,7 @@ Once the server is launched, you can access it using a web browser as before. Fr
649
650
### Ubuntu 18.04
651
652
-In this section, we will look at installing MeshCentral on Ubuntu 18.04 LTS. This is a long term support of Ubuntu freely available for download at <https://www.ubuntu.com>. Both the desktop and server versions of Ubuntu will work. If this is a remote server and the desktop will not be needed, the server version of Ubuntu can be used. This section will describe a way to install MeshCentral in a user’s home folder, however there is a more secure way to do it, see “Increased Security Installation” at the end of this section.
652
+In this section, we will look at installing MeshCentral on Ubuntu 18.04 LTS. This is a long term support of Ubuntu freely available for download at <https://www.ubuntu.com>. Both the desktop and server versions of Ubuntu will work. If this is a remote server and the desktop will not be needed, the server version of Ubuntu can be used. This section will describe a way to install MeshCentral in a user’s home folder, however there is a more secure way to do it, see `Increased Security Installation` at the end of this section.
653
654
In all cases, MeshCentral must not be installed as root user. It’s not secure and the instructions below will not work correctly.
655
@@ -707,7 +707,7 @@ This is useful to know if you want to make a backup of the database file.
707
708
#### Port permissions
709
710
-On Linux, ports below 1024 are reserved for the “root” user. This is a security feature. In our case MeshCentral will need to listen to ports 80 and 443. To allow this, we need to allow node to listen to ports below 1024 like this:
710
+On Linux, ports below 1024 are reserved for the `root` user. This is a security feature. In our case MeshCentral will need to listen to ports 80 and 443. To allow this, we need to allow node to listen to ports below 1024 like this:
711
712
```
713
whereis node
@@ -716,7 +716,7 @@ node: /usr/bin/node /usr/include/node /usr/share/man/man1/node.1.gz
716
sudo setcap cap_net_bind_service=+ep /usr/bin/node
717
```
718
719
-We first locate the node binary, using “whereis node”, we then use the “setcap” command to add permissions to node. Note that we take the path given by whereis and place it in the setcap command. The “setcap” command will set permissions allowing node to use ports 1024 and below. This permission may be lost when updating the Linux kernel, so this command may need to be applied again in some case.
719
+We first locate the node binary, using `whereis node`, we then use the `setcap` command to add permissions to node. Note that we take the path given by whereis and place it in the setcap command. The `setcap` command will set permissions allowing node to use ports 1024 and below. This permission may be lost when updating the Linux kernel, so this command may need to be applied again in some case.
720
721
#### Installing MeshCentral
722
@@ -727,7 +727,7 @@ npm install meshcentral
727
```
728
729
!!!warning
730
- Do not use `sudo` in front of “npm install meshcentral”.
730
+ Do not use `sudo` in front of `npm install meshcentral`.
731
732
After that, we can run MeshCentral for the first time. For example:
733
@@ -799,7 +799,7 @@ Then, make the start of the file look like this:
799
}
800
```
801
802
-If you start with the default config.json created by MeshCentral, you will need to remove some “_” characters in front of settings, mongodb and wanonly. You can also add a “_” to other values. For details on all of the config.json options, including the “WANonly” option, refer to the MeshCentral User’s Guide.
802
+If you start with the default config.json created by MeshCentral, you will need to remove some `_` characters in front of settings, mongodb and wanonly. You can also add a `_` to other values. For details on all of the config.json options, including the `WANonly` option, refer to the MeshCentral User’s Guide.
803
804
You can then save the config.json file and run MeshCentral again. This time, you don’t need to specify the certificate name. You just need to run it like this:
805
@@ -813,7 +813,7 @@ Once you are done, we can stop the server again using CTRL-C and in the next sec
813
814
#### Manually starting the server
815
816
-We can manually start and stop the MeshCentral server in the background in different ways. In this section, we are going to create two commands “mcstart” and “mcstop” to take care of this. Type this to create the two commands:
816
+We can manually start and stop the MeshCentral server in the background in different ways. In this section, we are going to create two commands `mcstart` and `mcstop` to take care of this. Type this to create the two commands:
817
818
```
819
echo "node ./node_modules/meshcentral > stdout.txt 2> stderr.txt &" > mcstart
@@ -823,11 +823,11 @@ echo "pkill –f node_modules/meshcentral" > mcstop
823
chmod 755 mcstop
824
```
825
826
-You can now run the “./mcstart” command to launch the server in the background and stop it using the “./mcstop” to stop it. This should work pretty well, but if the AWS instance is ever stopped and started again, the server will not automatically launch.
826
+You can now run the `./mcstart` command to launch the server in the background and stop it using the `./mcstop` to stop it. This should work pretty well, but if the AWS instance is ever stopped and started again, the server will not automatically launch.
827
828
#### Automatically starting the server
829
830
-Since Ubuntu 18.04 supports systemd, we are going to use that to auto-start MeshCentral in the background. First, we need to know our own username and group. If we do “ls -l” in our home folder we get for example:
830
+Since Ubuntu 18.04 supports systemd, we are going to use that to auto-start MeshCentral in the background. First, we need to know our own username and group. If we do `ls -l` in our home folder we get for example:
831
832
```
833
drwxr-xr-x 2 default default 4096 Jul 20 00:03 Desktop
@@ -836,7 +836,7 @@ drwxr-xr-x 2 default default 4096 Jul 20 00:03 Downloads
836
…
837
```
838
839
-Note the username and group name, in this example it’s “default” for both. We need this information to create the system service description file. To create this file type:
839
+Note the username and group name, in this example it’s `default` for both. We need this information to create the system service description file. To create this file type:
840
841
```
842
sudo pico /etc/systemd/system/meshcentral.service
@@ -866,7 +866,7 @@ AmbientCapabilities=cap_net_bind_service
866
WantedBy=multi-user.target
867
```
868
869
-Note that the user and group values have to be set correctly for your specific situation. Also, the ExecStart and WorkingDirectory lines includes the path to the user’s home folder which includes the username in it. Make sure that is set correctly. Lastly the path to node may need to be changed. Type “whereis node” to find the correct path.
869
+Note that the user and group values have to be set correctly for your specific situation. Also, the ExecStart and WorkingDirectory lines includes the path to the user’s home folder which includes the username in it. Make sure that is set correctly. Lastly the path to node may need to be changed. Type `whereis node` to find the correct path.
870
871
Once this is done, you can now start, enable, stop and disable using the following commands:
872
@@ -883,13 +883,13 @@ Once the server is launched, you can access it using a web browser as before. Fr
883
884
#### Increased Security Installation
885
886
-On Debian based Linux distributions like Ubuntu, a better and more secure way to install MeshCentral is to have it run within a user account this restricted privileges. When installed like this, the self-update capability of MeshCentral will not work. Instead of installing MeshCentral in the user’s home folder, we install it in /opt/meshcentral and we create a meshcentral user that does not have rights to login or change any of the MeshCentral files. To do this, start by creating a new user called “meshcentral”
886
+On Debian based Linux distributions like Ubuntu, a better and more secure way to install MeshCentral is to have it run within a user account this restricted privileges. When installed like this, the self-update capability of MeshCentral will not work. Instead of installing MeshCentral in the user’s home folder, we install it in /opt/meshcentral and we create a meshcentral user that does not have rights to login or change any of the MeshCentral files. To do this, start by creating a new user called `meshcentral`
887
888
```
889
sudo useradd -r -d /opt/meshcentral -s /sbin/nologin meshcentral
890
```
891
892
-We can then create the installation folder, install and change permissions of the files so that the “meshcentral” account gets read-only access to the files.
892
+We can then create the installation folder, install and change permissions of the files so that the `meshcentral` account gets read-only access to the files.
893
894
```
895
sudo mkdir /opt/meshcentral
@@ -916,13 +916,13 @@ sudo chown -R meshcentral:meshcentral /opt/meshcentral
916
917
This will perform the update to the latest server on NPM and re-set the permissions so that the meshcentral user account has read-only access again. You can then use systemctl to make the server run again.
918
919
-MeshCentral allows users to upload and download files stores in the server’s “meshcentral-files” folder. In an increased security setup, we still want the server to be able to read and write files to this folder and we can allow this with:
919
+MeshCentral allows users to upload and download files stores in the server’s `meshcentral-files` folder. In an increased security setup, we still want the server to be able to read and write files to this folder and we can allow this with:
920
921
```
922
sudo chmod 755 –R /opt/meshcentral/meshcentral-files
923
```
924
925
-If you plan on using the increased security installation along with MeshCentral built-in Let’s Encrypt support you will need to type the following commands to make the “letsencrypt” folder in “meshcentral-data” writable.
925
+If you plan on using the increased security installation along with MeshCentral built-in Let’s Encrypt support you will need to type the following commands to make the `letsencrypt` folder in `meshcentral-data` writable.
926
927
```
928
sudo mkdir /opt/meshcentral/meshcentral-data
@@ -930,11 +930,11 @@ sudo mkdir /opt/meshcentral/meshcentral-data/letsencrypt
930
sudo chmod 755 –R /opt/meshcentral/meshcentral-data/letsencrypt
931
```
932
933
-This will allow the server to get and periodically update its Let’s Encrypt certificate. If this is not done, the server will generate an “ACCES: permission denied” exception.
933
+This will allow the server to get and periodically update its Let’s Encrypt certificate. If this is not done, the server will generate an `ACCES: permission denied` exception.
934
935
### Microsoft Azure
936
937
-In this section, we will look installing MeshCentral on Microsoft Azure. Microsoft Azure offers many operating system options and we will be selecting “Ubuntu Server” as our choice. From the Azure portal, we select “Virtual machines” on the left and “Add”.
937
+In this section, we will look installing MeshCentral on Microsoft Azure. Microsoft Azure offers many operating system options and we will be selecting `Ubuntu Server` as our choice. From the Azure portal, we select `Virtual machines` on the left and `Add`.
938
939

940
@@ -942,7 +942,7 @@ Once you click on Ubuntu Server, you will see a list of available versions. In t
942
943

944
945
-Next is the type of instance to launch. Any instance will do including the “B1s” which is the smallest possible instance. Of course, as you manage more computers, using an instance that is a bit more powerful is a good idea.
945
+Next is the type of instance to launch. Any instance will do including the `B1s` which is the smallest possible instance. Of course, as you manage more computers, using an instance that is a bit more powerful is a good idea.
946
947

948
@@ -964,11 +964,11 @@ In this section, we will look installing MeshCentral on Google Cloud. You can si
964
965

966
967
-Once you have create an account, you can go to the main console and on the left side, go to “Compute Engine” and create a new VM instance. For our demonstration, we are going to create the smallest instance possible which is a single shared CPU and only 0.6 gigs of RAM.
967
+Once you have create an account, you can go to the main console and on the left side, go to `Compute Engine` and create a new VM instance. For our demonstration, we are going to create the smallest instance possible which is a single shared CPU and only 0.6 gigs of RAM.
968
969

970
971
-We select the proper settings and select “Ubuntu 18.04 LTS Minimal” as the boot operating system. This is convenient as we already covered how to install MeshCentral on this operating system.
971
+We select the proper settings and select `Ubuntu 18.04 LTS Minimal` as the boot operating system. This is convenient as we already covered how to install MeshCentral on this operating system.
972
973

974
@@ -980,7 +980,7 @@ The new instance will take a few minutes to start up. An interesting feature of
980
981

982
983
-If will log you in automatically, no additional credentials needed. We can then follow the “Ubuntu 18.04 LTS” section above to complete the installation. If you opt for a very small instance, it’s probably a good idea to skip installing MongoDB. Just to get started quickly, we can use the following commands:
983
+If will log you in automatically, no additional credentials needed. We can then follow the `Ubuntu 18.04 LTS` section above to complete the installation. If you opt for a very small instance, it’s probably a good idea to skip installing MongoDB. Just to get started quickly, we can use the following commands:
984
985
```
986
sudo apt update
@@ -992,19 +992,19 @@ node ./node_modules/meshcentral --fastcert –wanonly --cert 35.227.45.84
992
```
993
994
!!!warning
995
- Do not use “sudo” in front of “npm install meshcentral”.
995
+ Do not use `sudo` in front of `npm install meshcentral`.
996
997
-This will install node and npm. Will allow non-root access to ports 80 and 443 and install and start MeshCentral. Because this example uses a very small server instance, we opted to use the “fastcert” option to create RSA 2048 certificates (the default is RSA 3072 which is more secure).
997
+This will install node and npm. Will allow non-root access to ports 80 and 443 and install and start MeshCentral. Because this example uses a very small server instance, we opted to use the `fastcert` option to create RSA 2048 certificates (the default is RSA 3072 which is more secure).
998
999
-We use the “wantonly” option because MeshCentral will not be managing computers on a local network, and for this demonstration just used the external IP address of the instance as the server name.
999
+We use the `wantonly` option because MeshCentral will not be managing computers on a local network, and for this demonstration just used the external IP address of the instance as the server name.
1000
1001
-If you plan on using an instance without the Intel AMT CIRA port being open (TCP 4433), it’s recommended to add “--mpsport 0” so to inform MeshCentral that this port is not open and to not offer Intel AMT CIRA features.
1001
+If you plan on using an instance without the Intel AMT CIRA port being open (TCP 4433), it’s recommended to add `--mpsport 0` so to inform MeshCentral that this port is not open and to not offer Intel AMT CIRA features.
1002
1003
Of course, this set of commands is just to get the server started quickly. Follow the Ubuntu 18.04 instructions to setup the server to automatically start using system.
1004
1005
### Ubuntu 16.04
1006
1007
-In this section, we will look at installing MeshCentral on Ubuntu 16.04 LTS. This is the same installation at Ubuntu 18.04 LTS, however you need to install NodeJS in a special way. If you use “apt install node”, you will get an older version 4.x of NodeJS that will not work with MeshCentral.
1007
+In this section, we will look at installing MeshCentral on Ubuntu 16.04 LTS. This is the same installation at Ubuntu 18.04 LTS, however you need to install NodeJS in a special way. If you use `apt install node`, you will get an older version 4.x of NodeJS that will not work with MeshCentral.
1008
1009
#### Installing NodeJS
1010
@@ -1084,7 +1084,7 @@ chown -R _meshcentral:_meshcentral /usr/local/meshcentral
1084
1085
Configuring for MongoDB and adjusting some other settings such as the network port. Open up the following config in an editor then, make the start of the file look like below. If the setting does not exist yet, just add it below one of the ones we are adjusting in the main settings block.
1086
1087
-If you start with the default config.json created by MeshCentral, you will need to remove some underscore character in front of settings to enable the setting, such as mongodb and wanonly. You can also add an underscore to other values. For details on all of the config.json options, including the “WANonly” option, refer to the MeshCentral User’s Guide.
1087
+If you start with the default config.json created by MeshCentral, you will need to remove some underscore character in front of settings to enable the setting, such as mongodb and wanonly. You can also add an underscore to other values. For details on all of the config.json options, including the `WANonly` option, refer to the MeshCentral User’s Guide.
1088
1089
Before you can edit the configuration, start the Meshcentral briefly so it generates the default configurations and certificates. Once you see that it says "MeshCentral HTTPS server running...", Ctrl-C to exit then edit the configuration file next.
1090