You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-12Lines changed: 10 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,19 @@ Automatically provisions and installs locally-trusted TLS certificates for Node.
4
4
5
5
## How it works
6
6
7
-
At installation time, Auto Encrypt Localhost uses mkcert to create a local certificate authority, adds it to the various trust stores, and uses it to create locally-trusted TLS certificates that are installed in your server.
7
+
At npm package installation time, Auto Encrypt Localhost installs mkcert.
8
8
9
-
At runtime, you can reach your server via the local loopback addresses (localhost, 127.0.0.1) on the device itself and also from other devices on the local area network by using your device’s external IPv4 address(es).
9
+
At runtime, Auto Encrypt Localhost uses mkcert to create a local certificate authority and add it to the various trust stores. It then uses it to create locally-trusted TLS certificates that are automatically used by your server.
10
+
11
+
You can reach your server via the local loopback addresses (localhost, 127.0.0.1) on the device itself and also from other devices on the local area network by using your device’s external IPv4 address(es).
10
12
11
13
## System requirements
12
14
13
15
Tested and supported on:
14
16
15
-
- Linux (tested with elementary OS Hera)
17
+
- Linux (tested with elementary OS 5.x/Hera)
16
18
- macOS (tested on Big Sur)
17
-
- Windows 10 (tested in Windows Terminal with PowerShell)
19
+
- Windows 10 (tested with Windows Terminal and PowerShell)
18
20
19
21
(WSL is not supported for certificates at localhost unless you’re running your browser under WSL also).
20
22
@@ -24,11 +26,7 @@ Tested and supported on:
24
26
npm i @small-tech/auto-encrypt-localhost
25
27
```
26
28
27
-
Note that during installation, Auto Encrypt Localhost will create your local certificate authority and install it in the system root store and generate locally-trusted certificates. These actions require elevated privileges. Since [npm does not handle sudo prompts correctly in lifecycle scripts](https://github.com/npm/cli/issues/2887), you will see a graphical sudo prompt pop up to ask you for your adminstrator password. Once you’ve provided it, installation will proceed as normal.
28
-
29
-

30
-
31
-
On Windows, you will also be prompted separately to allow the installation of the certificates.
29
+
Note that during installation, Auto Encrypt Localhost will download and install the correct mkcert binary for your system.
32
30
33
31
## Usage
34
32
@@ -65,7 +63,9 @@ server.listen(443, () => {
65
63
})
66
64
```
67
65
68
-
You can now reach your server via https://localhost, https://127.0.0.1, and via its external IPv4 address(es) on your local area network. To find the list of IP addresses that your local server is reachable from, you can run the following code in the Node interpreter:
66
+
On first run, Auto Encrypt Localhost will use mkcert to create your local certificate authority and install it in the system root store and generate locally-trusted certificates. These actions require elevated privileges and you will be prompted for your password unless you have passwordless sudo set up for your system.
67
+
68
+
Once your server is up and running, you can reach it via https://localhost, https://127.0.0.1, and via its external IPv4 address(es) on your local area network. To find the list of IP addresses that your local server is reachable from, you can run the following code in the Node interpreter:
69
69
70
70
```js
71
71
Object.entries(os.networkInterfaces())
@@ -161,8 +161,6 @@ If you’re evaluating this for a “startup” or an enterprise, let us save yo
161
161
162
162
Locally-trusted certificates do not work under Firefox. Please use Edge or Chrome on this platform. This is [a mkcert limitation](https://github.com/FiloSottile/mkcert#supported-root-stores).
163
163
164
-
__Version 7.x is currently not tested under Windows.__ It may not be able to set the executable bit on the binary download if that’s necessary. __This notice will be removed once it’s been tested and confirmed to be working.__
0 commit comments