Prepare Pixelfed location
Create a new directory
sudo mkdir -p /usr/share/webapps
cd /usr/share/webapps/
Clone the entire Git repository of Pixelfed and set permissions
sudo git clone -b dev https://github.com/pixelfed/pixelfed.git pixelfed
cd pixelfed
sudo chown -R pixelfed:pixelfed .
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
Choose a release (optional)
List the last 10 Pixelfed releases
git ls-remote --tags --refs --sort="-v:refname" https://github.com/pixelfed/pixelfed.git | head -10 | awk '{print $2}' | sed 's|refs/tags/||'
Select the desired version, i.e. v0.13.0
sudo -u pixelfed git checkout v0.13.0
The latest non-rc release will be set if no tag is chosen
Enable the environment
Initialize PHP dependencies with Composer
sudo -u pixelfed composer install --no-ansi --no-interaction --optimize-autoloader
Generate environment variables and edit it
sudo -u pixelfed cp .env.example .env
sudo -u pixelfed nano .env
Change those paragraphs:
APP_NAME="PIXELFED.COGIP.BE"
APP_ENV="production"
APP_KEY=
APP_DEBUG="false"
APP_LOCALE="fr-FR" # https://github.com/pixelfed/pixelfed/issues/7561
# Instance Configuration
OPEN_REGISTRATION="false"
ENFORCE_EMAIL_VERIFICATION="false"
PF_MAX_USERS="64"
OAUTH_ENABLED="true"
OAUTH_PAT_ENABLED="false"
ENABLE_CONFIG_CACHE="true"
INSTANCE_DISCOVER_PUBLIC="true"
# Instance URL Configuration
APP_URL="https://pixelfed.cogip.be"
APP_DOMAIN="pixelfed.cogip.be"
ADMIN_DOMAIN="pixelfed.cogip.be"
SESSION_DOMAIN="pixelfed.cogip.be"
TRUST_PROXIES="*"
# Database Configuration
DB_CONNECTION="mysql"
DB_HOST="127.0.0.1"
DB_PORT="3306"
DB_DATABASE="pixelfeddb"
DB_USERNAME="pixelfed"
DB_PASSWORD="maria_db_password"
# Redis Configuration
REDIS_CLIENT="phpredis" # https://github.com/pixelfed/pixelfed/issues/3633
REDIS_SCHEME="unix"
REDIS_HOST="/var/run/redis/redis-server.sock"
REDIS_PASSWORD="null"
REDIS_PORT="null"
# Laravel Configuration
SESSION_DRIVER="database"
CACHE_STORE="redis"
QUEUE_DRIVER="redis"
BROADCAST_DRIVER="log"
LOG_CHANNEL="daily" # v0.12.10 trick
HORIZON_PREFIX="horizon-"
# ActivityPub Configuration
ACTIVITY_PUB="true"
AP_REMOTE_FOLLOW="true"
AP_INBOX="true"
AP_OUTBOX="true"
AP_SHAREDINBOX="true"
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.
## Mail Configuration (Post-Installer)
MAIL_DRIVER=smtp
MAIL_HOST=live.smtp.mailtrap.io
MAIL_PORT=587
MAIL_USERNAME=api
MAIL_PASSWORD=private_mailtrap_api_key
MAIL_ENCRYPTION=true
MAIL_FROM_ADDRESS="webmaster@cogip.be"
MAIL_FROM_NAME="PIXELFED.COGIP.BE Webmaster"
MAIL_AUTO_TLS=true # STARTTLS (false to bypass)