matterbridge 3.2.0-dev-20250801-e5ebd91 → 3.2.0-dev-20250802-fb1e4d0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/README-DEV.md +377 -0
- package/docs/README-DOCKER.md +208 -0
- package/docs/README-NGINX.md +235 -0
- package/docs/README-PODMAN.md +109 -0
- package/docs/README-SERVICE.md +212 -0
- package/docs/README.md +618 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# <img src="frontend/public/matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px"> Matterbridge NGINX configuration
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/matterbridge)
|
|
4
|
+
[](https://www.npmjs.com/package/matterbridge)
|
|
5
|
+
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
6
|
+
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
[](https://codecov.io/gh/Luligu/matterbridge)
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/matter-history)
|
|
12
|
+
[](https://www.npmjs.com/package/node-ansi-logger)
|
|
13
|
+
[](https://www.npmjs.com/package/node-persist-manager)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Advanced configuration to use NGINX
|
|
18
|
+
|
|
19
|
+
## Run matterbridge with nginx
|
|
20
|
+
|
|
21
|
+
### Create a basic nginx configuration file that redirect to http://yourhost:8283
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
sudo nano /etc/nginx/sites-available/matterbridge
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
paste this configuration and if desired change the port to listen (here is 80) and the server_name using yours:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
server {
|
|
31
|
+
listen 80 default_server;
|
|
32
|
+
listen [::]:80 default_server;
|
|
33
|
+
server_name _;
|
|
34
|
+
|
|
35
|
+
location / {
|
|
36
|
+
# Redirect to Matterbridge frontend from http:/server_name:80
|
|
37
|
+
proxy_pass http://localhost:8283/;
|
|
38
|
+
proxy_set_header Host $host;
|
|
39
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
40
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
41
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
42
|
+
|
|
43
|
+
# WebSocket support
|
|
44
|
+
proxy_http_version 1.1;
|
|
45
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
46
|
+
proxy_set_header Connection $http_connection;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Add matterbridge to enabled sites
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
sudo ln -s /etc/nginx/sites-available/matterbridge /etc/nginx/sites-enabled/
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Create a basic nginx configuration file that redirect to http://yourhost:8283/matterbridge
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
sudo nano /etc/nginx/sites-available/matterbridge
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
paste this configuration and if desired change the port to listen (here is 80) and the server_name using yours:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
server {
|
|
67
|
+
listen 80 default_server;
|
|
68
|
+
listen [::]:80 default_server;
|
|
69
|
+
server_name _;
|
|
70
|
+
|
|
71
|
+
location /matterbridge/ {
|
|
72
|
+
# Redirect to Matterbridge frontend from http:/server_name/matterbridge:80
|
|
73
|
+
proxy_pass http://localhost:8283/;
|
|
74
|
+
proxy_set_header Host $host;
|
|
75
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
76
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
77
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
78
|
+
|
|
79
|
+
# WebSocket support
|
|
80
|
+
proxy_http_version 1.1;
|
|
81
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
82
|
+
proxy_set_header Connection $http_connection;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Add matterbridge to enabled sites
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
sudo ln -s /etc/nginx/sites-available/matterbridge /etc/nginx/sites-enabled/
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Restart nginx and test the configuration
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
sudo systemctl restart nginx
|
|
97
|
+
sudo nginx -t
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Create an advanced nginx configuration file that redirect to http://yourhost:8283 with ssl
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
sudo nano /etc/nginx/sites-available/matterbridge
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
paste this configuration adding your certificates:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
# Default server configuration
|
|
110
|
+
|
|
111
|
+
# Redirect all HTTP requests to HTTPS
|
|
112
|
+
server {
|
|
113
|
+
listen 80 default_server;
|
|
114
|
+
listen [::]:80 default_server;
|
|
115
|
+
server_name _;
|
|
116
|
+
|
|
117
|
+
return 301 https://$host$request_uri;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
# HTTPS server configuration
|
|
121
|
+
server {
|
|
122
|
+
listen 443 ssl default_server;
|
|
123
|
+
listen [::]:443 ssl default_server;
|
|
124
|
+
http2 on;
|
|
125
|
+
server_name _;
|
|
126
|
+
|
|
127
|
+
# SSL certificate paths
|
|
128
|
+
ssl_certificate /etc/nginx/certs/cert.pem;
|
|
129
|
+
ssl_certificate_key /etc/nginx/certs/key.pem;
|
|
130
|
+
|
|
131
|
+
# SSL security settings
|
|
132
|
+
ssl_protocols TLSv1.2 TLSv1.3;
|
|
133
|
+
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
134
|
+
ssl_prefer_server_ciphers on;
|
|
135
|
+
|
|
136
|
+
location / {
|
|
137
|
+
# Redirect to Matterbridge frontend from https:/server_name:443
|
|
138
|
+
proxy_pass http://localhost:8283/;
|
|
139
|
+
proxy_set_header Host $host;
|
|
140
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
141
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
142
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
143
|
+
|
|
144
|
+
# WebSocket support
|
|
145
|
+
proxy_http_version 1.1;
|
|
146
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
147
|
+
proxy_set_header Connection $http_connection;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Add matterbridge to enabled sites
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
sudo ln -s /etc/nginx/sites-available/matterbridge /etc/nginx/sites-enabled/
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Restart nginx and test the configuration
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
sudo systemctl restart nginx
|
|
162
|
+
sudo nginx -t
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Create an advanced nginx configuration file that redirect to http://yourhost/matterbridge with ssl
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
sudo nano /etc/nginx/sites-available/matterbridge
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
paste this configuration adding your certificates:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
# Redirect all HTTP requests to HTTPS
|
|
175
|
+
server {
|
|
176
|
+
listen 80 default_server;
|
|
177
|
+
listen [::]:80 default_server;
|
|
178
|
+
server_name _;
|
|
179
|
+
|
|
180
|
+
return 301 https://$host$request_uri;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
# HTTPS server configuration
|
|
184
|
+
server {
|
|
185
|
+
listen 443 ssl default_server;
|
|
186
|
+
listen [::]:443 ssl default_server;
|
|
187
|
+
http2 on;
|
|
188
|
+
server_name _;
|
|
189
|
+
|
|
190
|
+
# SSL certificate paths
|
|
191
|
+
ssl_certificate /etc/nginx/certs/cert.pem;
|
|
192
|
+
ssl_certificate_key /etc/nginx/certs/key.pem;
|
|
193
|
+
|
|
194
|
+
# SSL security settings
|
|
195
|
+
ssl_protocols TLSv1.2 TLSv1.3;
|
|
196
|
+
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
197
|
+
ssl_prefer_server_ciphers on;
|
|
198
|
+
|
|
199
|
+
root /var/www/html;
|
|
200
|
+
index index.html index.htm index.nginx-debian.html;
|
|
201
|
+
|
|
202
|
+
location / {
|
|
203
|
+
# First attempt to serve request as file, then
|
|
204
|
+
# as directory, then fall back to displaying a 404.
|
|
205
|
+
try_files $uri $uri/ =404;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
location /matterbridge/ {
|
|
209
|
+
# Redirect to Matterbridge frontend from https:/server_name/matterbridge:443
|
|
210
|
+
proxy_pass http://localhost:8283/;
|
|
211
|
+
proxy_set_header Host $host;
|
|
212
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
213
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
214
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
215
|
+
|
|
216
|
+
# WebSocket support
|
|
217
|
+
proxy_http_version 1.1;
|
|
218
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
219
|
+
proxy_set_header Connection $http_connection;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Add matterbridge to enabled sites
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
sudo ln -s /etc/nginx/sites-available/matterbridge /etc/nginx/sites-enabled/
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Restart nginx and test the configuration
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
sudo systemctl restart nginx
|
|
234
|
+
sudo nginx -t
|
|
235
|
+
```
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# <img src="frontend/public/matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px"> Matterbridge Podman configuration
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/matterbridge)
|
|
4
|
+
[](https://www.npmjs.com/package/matterbridge)
|
|
5
|
+
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
6
|
+
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
[](https://codecov.io/gh/Luligu/matterbridge)
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/matter-history)
|
|
12
|
+
[](https://www.npmjs.com/package/node-ansi-logger)
|
|
13
|
+
[](https://www.npmjs.com/package/node-persist-manager)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Advanced configuration
|
|
18
|
+
|
|
19
|
+
## Install Podman if it is not already installed
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
cd ~
|
|
23
|
+
sudo apt update
|
|
24
|
+
sudo apt install podman -y
|
|
25
|
+
podman --version
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Run matterbridge with podman
|
|
29
|
+
|
|
30
|
+
The Matterbridge Docker image, which includes a manifest list for the linux/amd64, linux/arm64 and linux/arm/v7 architectures, is published on Docker Hub and can be used with podman.
|
|
31
|
+
|
|
32
|
+
Podman handles container restarts a little differently than Docker. The --restart always flag doesn’t work exactly the same. If you want the container to automatically restart when the system reboots or if it crashes, you can create a systemd unit for the Podman container.
|
|
33
|
+
|
|
34
|
+
### First create the Matterbridge directories
|
|
35
|
+
|
|
36
|
+
This will create the required directories if they don't exist
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
cd ~
|
|
40
|
+
mkdir -p ./Matterbridge
|
|
41
|
+
mkdir -p ./.matterbridge
|
|
42
|
+
sudo chown -R $USER:$USER ./Matterbridge ./.matterbridge
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
You may need to adapt the script to your setup:
|
|
46
|
+
|
|
47
|
+
- ./Matterbridge is the position outside of the container of your matterbridge plugin directory (inside your home directory).
|
|
48
|
+
- ./.matterbridge is the position outside of the container of your matterbridge storage directory (inside your home directory).
|
|
49
|
+
|
|
50
|
+
### Run the Podman container (root mode) and start it
|
|
51
|
+
|
|
52
|
+
The container must have full access to the host network (needed for matter mdns).
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
podman run --name matterbridge \
|
|
56
|
+
-v ~/Matterbridge:/root/Matterbridge \
|
|
57
|
+
-v ~/.matterbridge:/root/.matterbridge \
|
|
58
|
+
--network host --restart always -d docker.io/luligu/matterbridge:latest
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
You may need to adapt the script to your setup:
|
|
62
|
+
|
|
63
|
+
- ~/Matterbridge is the position outside of the container of your matterbridge plugin directory.
|
|
64
|
+
- ~/.matterbridge is the position outside of the container of your matterbridge storage directory.
|
|
65
|
+
|
|
66
|
+
### Integrate the mattebridge podman container with systemd for automatic startup after reboots
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
podman generate systemd --name matterbridge --files --new
|
|
70
|
+
sudo mv container-matterbridge.service /etc/systemd/system/
|
|
71
|
+
sudo systemctl enable container-matterbridge
|
|
72
|
+
sudo systemctl start container-matterbridge
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Start the Podman container
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
podman start matterbridge
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Stop the Podman container
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
podman stop matterbridge
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Restart the Podman container
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
podman restart matterbridge
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Remove the Podman container
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
podman rm matterbridge
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Shows the logs
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
podman logs matterbridge
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Shows the logs real time (tail)
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
podman logs --tail 1000 -f matterbridge
|
|
109
|
+
```
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# <img src="frontend/public/matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px"> Matterbridge systemd configuration
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/matterbridge)
|
|
4
|
+
[](https://www.npmjs.com/package/matterbridge)
|
|
5
|
+
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
6
|
+
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
[](https://codecov.io/gh/Luligu/matterbridge)
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/matter-history)
|
|
12
|
+
[](https://www.npmjs.com/package/node-ansi-logger)
|
|
13
|
+
[](https://www.npmjs.com/package/node-persist-manager)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Advanced configuration
|
|
18
|
+
|
|
19
|
+
## Run matterbridge as a daemon with systemctl (Linux only)
|
|
20
|
+
|
|
21
|
+
The easiest way to add systemctl is to use [Matterbridge service cli for linux](https://github.com/Luligu/mb-service-linux).
|
|
22
|
+
|
|
23
|
+
If your setup is too complex or you prefer to do it manually follow this method. You can still use mb-service to manage systemd after.
|
|
24
|
+
|
|
25
|
+
### First create the Matterbridge directories
|
|
26
|
+
|
|
27
|
+
This will create the required directories if they don't exist
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
cd ~
|
|
31
|
+
mkdir -p ./Matterbridge
|
|
32
|
+
mkdir -p ./.matterbridge
|
|
33
|
+
sudo chown -R $USER:$USER ./Matterbridge ./.matterbridge
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Then create a systemctl configuration file for Matterbridge
|
|
37
|
+
|
|
38
|
+
Create a systemctl configuration file for Matterbridge
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
sudo nano /etc/systemd/system/matterbridge.service
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Add the following to this file, replacing 3 times (!) USER with your user name (e.g. WorkingDirectory=/home/pi/Matterbridge, User=pi and Group=pi):
|
|
45
|
+
|
|
46
|
+
You may need to adapt the configuration to your setup:
|
|
47
|
+
|
|
48
|
+
- execStart on some linux distribution can also be ExecStart==/usr/bin/matterbridge -service
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
[Unit]
|
|
52
|
+
Description=matterbridge
|
|
53
|
+
After=network-online.target
|
|
54
|
+
|
|
55
|
+
[Service]
|
|
56
|
+
Type=simple
|
|
57
|
+
ExecStart=matterbridge -service
|
|
58
|
+
WorkingDirectory=/home/<USER>/Matterbridge
|
|
59
|
+
StandardOutput=inherit
|
|
60
|
+
StandardError=inherit
|
|
61
|
+
Restart=always
|
|
62
|
+
User=<USER>
|
|
63
|
+
Group=<USER>
|
|
64
|
+
|
|
65
|
+
[Install]
|
|
66
|
+
WantedBy=multi-user.target
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If you use the frontend with -ssl -frontend 443 and get an error message: "Port 443 requires elevated privileges",
|
|
70
|
+
add this:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
[Service]
|
|
74
|
+
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If you use the matterbridge-bthome plugin add this:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
[Service]
|
|
81
|
+
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_NET_ADMIN
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
If you modify matterbridge.service after, then run:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
sudo systemctl daemon-reload
|
|
88
|
+
sudo systemctl restart matterbridge.service
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Start Matterbridge
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
sudo systemctl start matterbridge
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Stop Matterbridge
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
sudo systemctl stop matterbridge
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Show Matterbridge status
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
sudo systemctl status matterbridge.service
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Enable Matterbridge to start automatically on boot
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
sudo systemctl enable matterbridge.service
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Disable Matterbridge from starting automatically on boot
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
sudo systemctl disable matterbridge.service
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### View the log of Matterbridge in real time (this will show the log with colors)
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
sudo journalctl -u matterbridge.service -n 1000 -f --output cat
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Delete the logs older then 3 days (all of them not only the ones of Matterbridge!)
|
|
128
|
+
|
|
129
|
+
Check the space used
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
sudo journalctl --disk-usage
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
remove all log older then 3 days
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
sudo journalctl --rotate
|
|
139
|
+
sudo journalctl --vacuum-time=3d
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Prevent the journal logs to grow
|
|
143
|
+
|
|
144
|
+
If you want to make the setting permanent to prevent the journal logs to grow too much, run
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
sudo nano /etc/systemd/journald.conf
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
add
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
Compress=yes # Compress logs
|
|
154
|
+
MaxRetentionSec=3days # Keep logs for a maximum of 3 days.
|
|
155
|
+
MaxFileSec=1day # Rotate logs daily within the 3-day retention period.
|
|
156
|
+
ForwardToSyslog=no # Disable forwarding to syslog to prevent duplicate logging.
|
|
157
|
+
SystemMaxUse=100M # Limit persistent logs in /var/log/journal to 100 MB.
|
|
158
|
+
RuntimeMaxUse=100M # Limit runtime logs in /run/log/journal to 100 MB.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
save it and run
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
sudo systemctl restart systemd-journald
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Verify that with your distro you can run sudo npm install -g matterbridge without the password
|
|
168
|
+
|
|
169
|
+
Run the following command to verify if you can install Matterbridge globally without being prompted for a password:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
sudo npm install -g matterbridge
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
If you are not prompted for a password, no further action is required.
|
|
176
|
+
|
|
177
|
+
If that is not the case, open the sudoers file for editing using visudo
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
sudo visudo
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
verify the presence of of a line
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
@includedir /etc/sudoers.d
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
exit and create a configuration file for sudoers
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
sudo nano /etc/sudoers.d/matterbridge
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
add this line replacing USER with your user name (e.g. radxa ALL=(ALL) NOPASSWD: ALL)
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
<USER> ALL=(ALL) NOPASSWD: ALL
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
or if you prefers to only give access to npm without password try with (e.g. radxa ALL=(ALL) NOPASSWD: /usr/bin/npm)
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
<USER> ALL=(ALL) NOPASSWD: /usr/bin/npm
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
save the file and reload the settings with:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
sudo chmod 0440 /etc/sudoers.d/matterbridge
|
|
211
|
+
sudo visudo -c
|
|
212
|
+
```
|