Pixelfed install

Create a new directory

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

Clone the Git repository of Pixelfed

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 {} \;

Environment

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

Change these lines

APP_NAME="Pixelfed.cogip.be"
APP_URL="https://pixelfed.cogip.be"
APP_DOMAIN="pixelfed.cogip.be"
ADMIN_DOMAIN="pixelfed.cogip.be"
SESSION_DOMAIN="pixelfed.cogip.be"
DB_DATABASE="pixelfeddb"
DB_USERNAME="pixelfed"
DB_PASSWORD="mariadb-password"

To be able to send invites and password recovery emails, create and verify a Mailtrap account. Setup the domain and the DNS zones entries in your domain name registrar. Mailtrap will then display an private API token for SMTP integration.

MAIL_DRIVER=smtp
MAIL_HOST=live.smtp.mailtrap.io
MAIL_PORT=587
MAIL_USERNAME=api
MAIL_PASSWORD=private-api-key
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="account-email"
MAIL_FROM_NAME="Pixelfed"

Change files ownership

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