Erase the server and restart a fresh instance.
Stop cron jobs
Edit Cron jobs for the Pixelfed user
BASH
sudo crontab -u pixelfed -e
Comment the last line
TXT
#* * * * * /usr/bin/php8.5 /usr/share/webapps/pixelfed/artisan schedule:run >> /dev/null 2>&1
Stop Pixelfed
BASH
sudo systemctl stop pixelfed
sudo systemctl disable pixelfed
Keep previous files
BASH
sudo mv /usr/share/webapps/pixelfed /usr/share/webapps/pixelfed-old
Delete and re-create database
BASH
sudo mariadb
SQL
DROP DATABASE pixelfeddb;
SQL
CREATE DATABASE pixelfeddb;
SQL
GRANT ALL PRIVILEGES ON pixelfeddb.* TO 'pixelfed'@'localhost';
SQL
FLUSH PRIVILEGES;
quit
Reinstall Pixelfed
BASH
cd /usr/share/webapps/
sudo git clone -b dev https://github.com/pixelfed/pixelfed.git pixelfed
cd pixelfed
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
sudo composer install --no-ansi --no-interaction --optimize-autoloader
Restore previous setup
BASH
sudo cp /usr/share/webapps/pixelfed-old/.env /usr/share/webapps/pixelfed/
sudo chown -R pixelfed:pixelfed .
sudo -u pixelfed php /usr/share/webapps/pixelfed/artisan config:cache
sudo -u pixelfed php artisan key:generate
sudo -u pixelfed php artisan storage:link
sudo -u pixelfed php artisan migrate --force
sudo -u pixelfed php artisan import:cities
sudo -u pixelfed php artisan instance:actor
sudo -u pixelfed php artisan passport:keys
sudo -u pixelfed php artisan horizon:install
sudo -u pixelfed php artisan horizon:publish
sudo chown pixelfed:pixelfed /usr/share/webapps/pixelfed/storage/*.key
sudo chmod 600 /usr/share/webapps/pixelfed/storage/*.key
sudo systemctl daemon-reload
sudo systemctl enable --now pixelfed
sudo -u pixelfed cp /usr/share/webapps/pixelfed-old/config/app.php /usr/share/webapps/pixelfed/config/
sudo -u pixelfed cp /usr/share/webapps/pixelfed-old/config/instance.php /usr/share/webapps/pixelfed/config/
sudo -u pixelfed cp /usr/share/webapps/pixelfed-old/config/pixelfed.php /usr/share/webapps/pixelfed/config/
Reactivate cron jobs
BASH
sudo crontab -u pixelfed -e
Uncomment the last line
TXT
* * * * * /usr/bin/php8.5 /usr/share/webapps/pixelfed/artisan schedule:run >> /dev/null 2>&1
Reboot and start over
BASH
sudo reboot
And follow again the initialization guide to create the first user.