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
4. Copy the `config.sample.php` file to `config.php` and open it in a text editor. Set the required configuration items, such as database connection details and other settings specific to your environment.
50
50
51
-
5. Run the following command to validate your configuration file. Correct any errors displayed in red.
52
-
53
-
```
54
-
tools/cli/ob check
55
-
```
56
-
57
-
6. Run the following command to install database updates. This may take a few minutes to complete.
58
-
59
-
```
60
-
tools/cli/ob updates run all
61
-
```
62
-
63
-
7. Set the password for the default admin user by running the following command. Enter a secure password when prompted.
64
-
65
-
```
66
-
tools/cli/ob passwd admin
67
-
```
68
-
69
-
8. Set up a service (or similar) to run required background tasks such as generating thumbnails and cache management. This service should ensure that `tools/cli/ob cron monitor` is running continuously.
70
-
71
-
9. To improve performance, uncomment the `OB_SENDFILE_HEADER` line appropriate for your webserver in `config.php`. Ensure your web server and site configuration supports this (see Nginx example below).
51
+
5. To improve performance, uncomment the `OB_SENDFILE_HEADER` line appropriate for your web server in `config.php`. Ensure your web server and site configuration supports this (see Nginx example below).
72
52
73
53
```
74
54
// define('OB_SENDFILE_HEADER', 'X-Sendfile'); // set appropriate SENDFILE header based on server (apache)
75
55
// define('OB_SENDFILE_HEADER', 'X-Accel-Redirect'); // set appropriate SENDFILE header based on server (nginx)
76
56
// define('OB_SENDFILE_HEADER', 'X-LIGHTTPD-send-file'); // set appropriate SENDFILE header based on server (lighttpd)
77
57
```
78
58
59
+
## Users and Permissions
60
+
61
+
1. Create a dedicated user for OpenBroadcaster. This user should be the same user the web server PHP process runs as, the background task service runs as, and any manual use of the CLI tool runs as.
62
+
63
+
2. Ensure the paths specified in `config.php` exist and are writable by this user.
64
+
79
65
80
66
## PHP Configuration
81
67
@@ -88,8 +74,26 @@ A default PHP installation is generally adequate, though you will likely want to
88
74
89
75
Note that increasing `upload_max_filesize` should not be necessary given how OpenBroadcaster handles file uploads.
90
76
91
-
Additionally, ensure that PHP runs as a user that has write access to paths specified in `config.php`.
77
+
Additionally, PHP should be configured to run as the dedicated OpenBroadcaster user. The following is an example PHP pool.d file at `/etc/php/8.3/fpm/pool.d/openbroadcaster.conf`:
78
+
79
+
```
80
+
[openbroadcaster]
81
+
user = openbroadcaster
82
+
group = openbroadcaster
83
+
listen = /run/php/php8.3-openbroadcaster-fpm.sock
84
+
listen.owner = www-data
85
+
listen.group = www-data
86
+
pm = dynamic
87
+
pm.max_children = 5
88
+
pm.start_servers = 2
89
+
pm.min_spare_servers = 1
90
+
pm.max_spare_servers = 3
91
+
92
+
php_admin_value[memory_limit] = 512M
93
+
php_admin_value[post_max_size] = 1024M
94
+
```
92
95
96
+
This assumes the dedicated OpenBroadcaster user is `openbroadcaster`, and that Nginx is running as `www-data`.
93
97
94
98
## Nginx Configuration
95
99
@@ -146,10 +150,32 @@ server {
146
150
}
147
151
```
148
152
153
+
## Verifying Install and Running Updates
154
+
155
+
1. Run the following command to validate your configuration file. Correct any errors displayed in red.
156
+
157
+
```
158
+
tools/cli/ob check
159
+
```
160
+
161
+
2. Run the following command to install database updates. This may take a few minutes to complete.
162
+
163
+
```
164
+
tools/cli/ob updates run all
165
+
```
166
+
167
+
3. Set the password for the default admin user by running the following command. Enter a secure password when prompted.
168
+
169
+
```
170
+
tools/cli/ob passwd admin
171
+
```
172
+
173
+
4. Set up a service (or similar) to run required background tasks such as generating thumbnails and cache management. This service should ensure that `tools/cli/ob cron monitor` is running continuously.
174
+
149
175
150
176
## Service Configuration
151
177
152
-
As an example for step 8, set up a service, `/etc/systemd/system/ob.service`, as follows. Be sure to update the `ExecStart` path and `User` as necessary.
178
+
The last step is to ensure `tools/cli/ob cron monitor` is running continuously in the background. To do this, you may set up a service, `/etc/systemd/system/ob.service`, as follows. Be sure to update the `ExecStart` path and `User` as necessary.
0 commit comments