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: running-pixelfed/installation.md
+17-7Lines changed: 17 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ Using a Unix socket is optional, but may provide faster access since it does not
116
116
117
117
### Email variables
118
118
119
-
By default, Pixelfed will not send any emails, but will instead write messages to the Laravel log.
119
+
By default, Pixelfed will not send any emails, but will instead write messages to the Laravel log.
120
120
121
121
To setup a mailer for production deployments, you have several options for supported mail services. Pixelfed currently supports SMTP, Mailgun, Postmark, Amazon SES, and `sendmail` for sending emails to users.
122
122
@@ -220,16 +220,19 @@ php artisan migrate --force
220
220
```
221
221
222
222
If you want to enable support for location data:
223
+
223
224
```bash
224
225
php artisan import:cities
225
226
```
226
227
227
228
If you enabled ActivityPub federation:
229
+
228
230
```bash
229
231
php artisan instance:actor
230
232
```
231
233
232
234
If you enabled OAuth:
235
+
233
236
```bash
234
237
php artisan passport:keys
235
238
```
@@ -257,11 +260,12 @@ php artisan route:clear
257
260
php artisan view:clear
258
261
php artisan config:clear
259
262
```
263
+
260
264
:::
261
265
262
266
### Job queueing
263
267
264
-
Pixelfed supports both [Laravel Horizon](https://laravel.com/docs/6.x/horizon) and [Queue Workers](https://laravel.com/docs/6.x/queues) to power the job queue. The main difference between Horizon and Queue Worker is the dashboard provided by Horizon as well as advanced load balancing. We recommend using Horizon. Horizon provides a beautiful dashboard which allows you to easily monitor key metrics of your queue system such as job throughput, runtime, and job failures.
268
+
Pixelfed supports both [Laravel Horizon](https://laravel.com/docs/11.x/horizon) and [Queue Workers](https://laravel.com/docs/11.x/queues) to power the job queue. The main difference between Horizon and Queue Worker is the dashboard provided by Horizon as well as advanced load balancing. We recommend using Horizon. Horizon provides a beautiful dashboard which allows you to easily monitor key metrics of your queue system such as job throughput, runtime, and job failures.
265
269
266
270
#### Using Laravel Horizon
267
271
@@ -274,7 +278,7 @@ php artisan horizon:publish
274
278
275
279
If your user has the correct permissions to access Redis and the Pixelfed installation folder, then you can simply run `php artisan horizon` as that user in a terminal. This may be fine, but if you close the terminal then Horizon will also be terminated. Running directly is recommended only in deployments where a terminal can run uninterrupted, e.g. in a VM or using a utility such as GNU Screen or tmux.
276
280
277
-
If you are running in production, it is more ideal to create a background service for running Pixelfed's task queue. You will need to use a task manager like systemd or Supervisor. For more information, refer to the [Laravel Documentation](https://laravel.com/docs/6.x/horizon#deploying-horizon).
281
+
If you are running in production, it is more ideal to create a background service for running Pixelfed's task queue. You will need to use a task manager like systemd or Supervisor. For more information, refer to the [Laravel Documentation](https://laravel.com/docs/11.x/horizon#deploying-horizon).
278
282
279
283
Most distributions will already come with systemd, so you may set up this unit file at `/etc/systemd/system/pixelfed.service`:
280
284
@@ -307,7 +311,7 @@ The example above assumes you are using MariaDB and Nginx, that your distributio
307
311
- Replacing `nginx` with `apache`, or replacing `Requires` with `Wants` if you are not running in a production environment
308
312
- Replacing `/usr/bin/php` or `/usr/share/webapps/pixelfed/artisan` with the correct paths, e.g. `/usr/bin/php8.1` or `/path/to/pixelfed/artisan`
309
313
- Replacing `User=http` to reflect the app user, e.g. `User=pixelfed` or commenting this line in order to run in the system slice.
310
-
:::
314
+
:::
311
315
312
316
You can now use systemd to manage Pixelfed like any other background service:
Pixelfed also includes a queue worker that will process new jobs as they are pushed onto the queue. You may run the worker using the `queue:work` command. Note that once the command has started, it will continue to run until it is manually stopped or you close your terminal:
349
+
350
+
Pixelfed also includes a queue worker that will process new jobs as they are pushed onto the queue. You may run the worker using the `queue:work` command. Note that once the command has started, it will continue to run until it is manually stopped or you close your terminal. This is not recommended for production use, but can be useful to debug any issues with workers.
351
+
352
+
**Warning**
353
+
There are a large number of queues! The list of queues that horizon uses is stored in the [horizon.php](https://github.com/pixelfed/pixelfed/blob/dev/config/horizon.php#L180) configuration file. You should check that all queues in that file are listed on the worker command line, or jobs will not launch!
Again, you can use Supervisor or systemd as described above, substituting `horizon` for `queue:work`.
@@ -376,6 +385,7 @@ You may need to replace `/usr/bin/php` or `/usr/share/webapps/pixelfed/artisan`
376
385
To translate HTTPS web requests to PHP workers, you will need to configure a reverse proxy.
377
386
378
387
#### Apache
388
+
379
389
Pixelfed includes a `public/.htaccess` file that is used to provide URLs without the index.php front controller in the path. Before serving Pixelfed with Apache, be sure to enable the `mod_rewrite` module in your Apache configuration so the `.htaccess` file will be honored by the server.
380
390
381
391
If the `.htaccess` file that ships with Pixelfed does not work with your Apache installation, try this alternative:
@@ -463,7 +473,7 @@ Make sure to use the `/public` folder as your server root. For example:
463
473
```nginx
464
474
server {
465
475
root /var/www/pixelfed/public;
466
-
````
476
+
```
467
477
468
478
If you set root to the install directory (example: `root /var/www/pixelfed;`) Pixelfed will not work.
0 commit comments