Skip to content

Commit 4d1dc85

Browse files
authored
Update INSTALL.md
1 parent 45438c4 commit 4d1dc85

1 file changed

Lines changed: 46 additions & 25 deletions

File tree

INSTALL.md

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# OpenBroadcaster - Server Installation Instructions
22

3+
34
## Dependencies
45

56
- A web server with a web environment available (e.g., Apache, Nginx)
@@ -8,6 +9,7 @@
89
- Composer (PHP dependency manager)
910
- Node.js and npm (Node Package Manager)
1011

12+
1113
## Required PHP Modules
1214

1315
Make sure the following PHP modules are installed and enabled (listed as Ubuntu/Debian packages):
@@ -19,6 +21,7 @@ Make sure the following PHP modules are installed and enabled (listed as Ubuntu/
1921
- php-curl (for making HTTP requests)
2022
- php-imagick (for advanced image processing)
2123

24+
2225
## Required Packages
2326

2427
Install the following Ubuntu/Debian packages, or the equivalent for your operating system.
@@ -30,6 +33,7 @@ Install the following Ubuntu/Debian packages, or the equivalent for your operati
3033
- libavfilter-extra (extra filters for ffmpeg)
3134
- vorbis-tools (for Ogg Vorbis audio encoding)
3235

36+
3337
## Installation Steps
3438

3539
1. Copy the OpenBroadcaster Server files to your web server's document root directory.
@@ -64,41 +68,28 @@ tools/cli/ob passwd admin
6468

6569
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.
6670

67-
9. To improve performance, set one of the OB_SENDFILE_HEADER following values in `config.php`. Ensure your web server and site configuration supports this (see Nginx example below).
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).
6872

6973
```
70-
define('OB_SENDFILE_HEADER', 'X-Sendfile'); // set appropriate SENDFILE header based on server (apache)
71-
define('OB_SENDFILE_HEADER', 'X-Accel-Redirect'); // set appropriate SENDFILE header based on server (nginx)
72-
define('OB_SENDFILE_HEADER', 'X-LIGHTTPD-send-file'); // set appropriate SENDFILE header based on server (lighttpd)
74+
// define('OB_SENDFILE_HEADER', 'X-Sendfile'); // set appropriate SENDFILE header based on server (apache)
75+
// define('OB_SENDFILE_HEADER', 'X-Accel-Redirect'); // set appropriate SENDFILE header based on server (nginx)
76+
// define('OB_SENDFILE_HEADER', 'X-LIGHTTPD-send-file'); // set appropriate SENDFILE header based on server (lighttpd)
7377
```
7478

75-
## Example Service
7679

77-
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.
80+
## PHP Configuration
7881

79-
```
80-
[Unit]
81-
Description=OB Background Tasks
82-
After=network.target
82+
A default PHP installation is generally adequate, though you will likely want to increase these values:
8383

84-
[Service]
85-
Type=simple
86-
User=obuser
87-
ExecStart=/path/to/ob/tools/cli/ob cron monitor
88-
Restart=always
89-
RestartSec=10
84+
| Name | Value | Description |
85+
| - | - | - |
86+
| memory_limit | 512M | Increase memory allowed per request |
87+
| post_max_size | 1024M | Increase max post size to handle file uploads |
9088

91-
[Install]
92-
WantedBy=multi-user.target
93-
```
89+
Note that increasing `upload_max_filesize` should not be necessary given how OpenBroadcaster handles file uploads.
9490

95-
Then enable and start the service (as root or with sudo):
91+
Additionally, ensure that PHP runs as a user that has write access to paths specified in `config.php`.
9692

97-
```
98-
systemctl daemon-reload
99-
systemctl enable ob
100-
systemctl start ob
101-
```
10293

10394
## Nginx Configuration
10495

@@ -150,6 +141,36 @@ server {
150141
}
151142
152143
# allow larger data posts and file uploads
144+
# this should have the same value as PHP's post_max_size
153145
client_max_body_size 1024M;
154146
}
155147
```
148+
149+
150+
## Service Configuration
151+
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.
153+
154+
```
155+
[Unit]
156+
Description=OB Background Tasks
157+
After=network.target
158+
159+
[Service]
160+
Type=simple
161+
User=obuser
162+
ExecStart=/path/to/ob/tools/cli/ob cron monitor
163+
Restart=always
164+
RestartSec=10
165+
166+
[Install]
167+
WantedBy=multi-user.target
168+
```
169+
170+
Then enable and start the service (as root or with sudo):
171+
172+
```
173+
systemctl daemon-reload
174+
systemctl enable ob
175+
systemctl start ob
176+
```

0 commit comments

Comments
 (0)