Installation

After checking that the system is up to date, create a new directory:

sudo mkdir -p /usr/share/webapps
cd /usr/share/webapps/

Clone Git Pixelfed repository:

sudo git clone -b dev https://github.com/pixelfed/pixelfed.git pixelfed

Set permissions:

cd pixelfed
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;

Basic configuration

Initialize PHP dependencies with Composer:

sudo composer install --no-ansi --no-interaction --optimize-autoloader

Generate environment variables and edit it:

sudo cp .env.example .env
sudo nano .env

For the moment, only change the underlined settings:

APP_NAME="Pixelfed Demo"
APP_ENV="production"
APP_KEY=
APP_DEBUG="false"
# Instance URL Configuration
APP_URL="https://pixelfed.fediverse.ovh"
APP_DOMAIN="pixelfed.fediverse.ovh"
ADMIN_DOMAIN="pixelfed.fediverse.ovh"
SESSION_DOMAIN="pixelfed.fediverse.ovh"
TRUST_PROXIES="*"

# Database Configuration
DB_CONNECTION="mysql"
DB_HOST="127.0.0.1"
DB_PORT="3306"
DB_DATABASE="pixelfed_fediverse_ovh"
DB_USERNAME="user_pixelfed"
DB_PASSWORD="user-password"

Save and exit Nano.
Change files ownership:

sudo chown -R pixelfed-user:pixelfed-user .
Each future change of the .env file must be followed by this command:
sudo php /usr/share/webapps/pixelfed/artisan config:cache