User Tools

Site Tools


computing:pix3lfed

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:pix3lfed [2026/03/02 03:23] oemb1905computing:pix3lfed [2026/08/05 17:30] (current) oemb1905
Line 205: Line 205:
 First, let's create the unit file over in ''sudo nano /etc/systemd/system/pixelfed.service'' and inside that unit file, put something similar to the following: First, let's create the unit file over in ''sudo nano /etc/systemd/system/pixelfed.service'' and inside that unit file, put something similar to the following:
  
-  [Unit] +<code> 
-  Description=Pixelfed Horizon Queue Worker (Laravel Horizon) +[Unit] 
-  After=network.target apache2.service php8.4-fpm.service redis-server.service mariadb.service +Description=Pixelfed Horizon Queue Worker 
-  Wants=apache2.service php8.4-fpm.service redis-server.service mariadb.service +Documentation=https://laravel.com/docs/horizon 
-  [Service] +After=network.target apache2.service php8.4-fpm.service redis-server.service mariadb.service 
-  Type=simple +Wants=apache2.service php8.4-fpm.service redis-server.service mariadb.service 
-  User=www-data + 
-  Group=www-data +[Service] 
-  WorkingDirectory=/var/www/pixelfed +Type=simple 
-  ExecStart=/usr/bin/php artisan horizon +User=www-data 
-  Restart=on-failure +Group=www-data 
-  RestartSec=5s +WorkingDirectory=/var/www/pixelfed 
-  StandardOutput=journal +ExecStart=/usr/bin/php artisan horizon 
-  StandardError=journal +Restart=always 
-  NoNewPrivileges=yes +RestartSec=
-  PrivateTmp=true +StartLimitIntervalSec=0 
-  ProtectSystem=strict +StandardOutput=journal 
-  ProtectHome=yes +StandardError=journal 
-  ReadWritePaths=/var/www/pixelfed/storage + 
-  ReadWritePaths=/var/www/pixelfed/bootstrap/cache +# Security hardening (less restrictive than before) 
-  [Install] +NoNewPrivileges=yes 
-  WantedBy=multi-user.target+PrivateTmp=true 
 +ProtectSystem=full 
 +ProtectHome=yes 
 +ProtectKernelTunables=yes 
 +ProtectKernelModules=yes 
 +ProtectControlGroups=yes 
 +RestrictSUIDSGID=yes 
 +LockPersonality=yes 
 +RestrictRealtime=yes 
 + 
 +# Paths Horizon actually needs to write to 
 +ReadWritePaths=/var/www/pixelfed/storage 
 +ReadWritePaths=/var/www/pixelfed/bootstrap/cache 
 +ReadWritePaths=/tmp 
 + 
 +[Install] 
 +WantedBy=multi-user.target 
 +</code>
  
 After you create the unit file, let's reload the daemon, restart the service and check for any errors. Restart all services and check a web browser to see if the instance resolves after restarting the services. After you create the unit file, let's reload the daemon, restart the service and check for any errors. Restart all services and check a web browser to see if the instance resolves after restarting the services.
Line 238: Line 255:
   sudo systemctl reload apache2   sudo systemctl reload apache2
   sudo systemctl restart apache2 php8.4-fpm pixelfed.service redis-server   sudo systemctl restart apache2 php8.4-fpm pixelfed.service redis-server
 +  
 +Lastly, let's create our artisan workers so changes and updates happen automatically. Open up cron for www-data user with ''sudo crontab -u www-data -e'' and then enter the following:
 +
 +<code>
 +* * * * * cd /var/www/pixelfed && php artisan schedule:run >> /dev/null 2>&1
 +* * * * * cd /var/www/pixelfed && php artisan horizon:snapshot >> /dev/null 2>&1
 +* * * * * cd /var/www/pixelfed && php artisan horizon:terminate >> /dev/null 2>&1
 +</code>
  
 At this point, most essential lifts are done. As long as your landing page resolves, which it should by this stage, you can now move on to creating an admin user and then managing the instance via the GUI web panel: At this point, most essential lifts are done. As long as your landing page resolves, which it should by this stage, you can now move on to creating an admin user and then managing the instance via the GUI web panel:
Line 328: Line 353:
   sudo /usr/local/bin/refresh.sh   sudo /usr/local/bin/refresh.sh
      
-Once I did this, the ''passport:keys'' step no longer failed or barfed about row 19. I am worried about this lol, but at least the error is gone ;O.+Once I did this, the ''passport:keys'' step no longer failed or barfed about row 19. I am worried about this lol, but at least the error is gone ;O. To assist actor status: 
 + 
 +  https://gnulinux.pics/i/actor 
 +  https://github.com/pixelfed/support/issues/183 
 +   
 +More coming ..
  
- --- //[[alerts@haacksnetworking.org|oemb1905]] 2026/03/02 02:12//+ --- //[[alerts@haacksnetworking.org|oemb1905]] 2026/08/05 17:28//
computing/pix3lfed.1772421803.txt.gz · Last modified: by oemb1905