Create a new directory
BASH
sudo mkdir -p /usr/share/webapps
cd /usr/share/webapps/
Clone the Git repository of Pixelfed
BASH
sudo git clone -b dev https://github.com/pixelfed/pixelfed.git pixelfed
Set permissions
BASH
cd pixelfed
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
Environment
Initialize PHP dependencies with Composer
BASH
sudo composer install --no-ansi --no-interaction --optimize-autoloader
Generate environment variables and edit it
BASH
sudo cp .env.example .env
sudo nano .env
INI
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="maria_db_password"
The following variables are dedicated 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.
INI
MAIL_DRIVER=smtp
MAIL_HOST=live.smtp.mailtrap.io
MAIL_PORT=587
MAIL_USERNAME=api
MAIL_PASSWORD=private_mailtrap_api_key
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=your_email_adress
MAIL_FROM_NAME="Pixelfed"
Change files ownership
BASH
sudo chown -R pixelfed:pixelfed .
Each future change of the .env file must be followed by this command
BASH
sudo php /usr/share/webapps/pixelfed/artisan config:cache