Configuration

The active terminal directory should still be /usr/share/webapps/pixelfed

Initialize Pixelfed services

TXT
sudo php artisan key:generate
TXT
sudo php artisan storage:link
TXT
sudo php artisan migrate --force
TXT
sudo php artisan import:cities
TXT
sudo php artisan instance:actor
TXT
sudo php artisan passport:keys
TXT
sudo php artisan horizon:install
TXT
sudo php artisan horizon:publish

Set up background service

Create the systemd service file

TXT
sudo nano /etc/systemd/system/pixelfed.service

And paste

TXT
[Unit]
Description=Pixelfed task queueing via Laravel Horizon
After=network.target mysql.service php8.5-fpm.service redis-server.service apache2.service
Requires=mysql.service php8.5-fpm.service redis-server.service apache2.service

[Service]
Type=simple
User=pixelfed
WorkingDirectory=/usr/share/webapps/pixelfed
ExecStart=/usr/bin/php8.5 artisan horizon
Restart=always
RestartSec=5
Environment=QUEUE_CONNECTION=redis

[Install]
WantedBy=multi-user.target

Reload systemctl daemon

TXT
sudo systemctl daemon-reload

And start Pixelfed

TXT
sudo systemctl enable --now pixelfed

Create a Cron job for the Pixelfed user

TXT
sudo crontab -u pixelfed -e

At the end of the file, paste this line

TXT
* * * * * /usr/bin/php8.5 /usr/share/webapps/pixelfed/artisan schedule:run >> /dev/null 2>&1

Modify configuration files

TXT
sudo nano config/app.php
TXT
    'name' => env('APP_NAME', 'Pixelfed.cogip.be'),
TXT
    'url' => env('APP_URL', 'https://pixelfed.cogip.be'),
TXT
    'locale' => env('APP_LOCALE', 'fr_BE'),

 

TXT
sudo nano config/instance.php
TXT
    'description' => env('INSTANCE_DESCRIPTION', 'Un serveur Pixelfed vraiment très intéressant'),

 

TXT
sudo nano config/pixelfed.php
TXT
    'domain' => [
        'admin' => env('ADMIN_DOMAIN'),
        'app' => env('APP_DOMAIN', 'pixelfed.cogip.be'),
    ],

Create the first user

TXT
sudo php artisan user:create
Creating a new user...

Name:
> Yves LeGuellec

Username:
> leguellec

Email:
> leguellec@cogip.be

Password:
> admin-password

Confirm password:
> admin-password

Make this user an admin? (yes/no) [no]:
> yes

Manually verify email address? (yes/no) [no]:
> no

Are you sure you want to create this user? (yes/no) [no]:
> yes

Manually verify the user

TXT
sudo php artisan user:verify leguellec

Visit https://pixelfed.cogip.be/i/actor to activate cache.

And visit the instance pixelfed.cogip.be.