Pixelfed — A free and ethical photo sharing platform, shar powered by ActivityPub federation.

Main:

Official links:

Website | Documentation | Source DockerHub

Support | Community Support

Smied.net links:

Website | Documentation | DockerHub | Feedback

Support | Community Support

Minimum system requirements :

Сores1
RAM0.5gb

Use:

SystemData
Standard loginInstalled during installation
Standard passwordInstalled during installation
Standard port8080
Configurationin system docker-compose.yml && .env.docker or in container /var/www/.env.docker

Links

SystemLink
Login pagehttps://site/register
Register pagehttps://site/register
Admid Dashboardhttps://site/i/admin/dashboard

Includes

Containers:

SystemSoftware
AppPixelFed
DBmariadb
Rediscache
WorkerLaravel horizon
AppPixelFed

Path:

in container pixelfed_app_1
Media – /var/www/public/storage/m/
spatie/laravel-backup – /var/www/storage/app/Pixelfed-Prod

Features:

SystemSoftware
ServerHTTP
ServerPHP-FPM
Database serverSQL
PHP dependency managementComposer
Fetching updatesGit
In-memory caching and background task queueingRedis
Image processingGD
Optimizing JPGJPEGOptim
Lossless PNGOptiPNG
Lossy PNGPNGQuant
Generating video thumbnailsffmpeg

🛠 Install

🐳 Install Docker

Install Docker

⬇️ Download PixelFed

git clone --depth 1 --branch v0.11.2 https://github.com/pixelfed/pixelfed.git && cd pixelfed && docker build . -t pixelfed

⚙️ Fix

sed -i 's/pixelfed/pixelfed:v0.11.2/' docker-compose.yml
sed -i 's/mysql:8.0/mariadb:10.7.3/' docker-compose.yml

⚙️ Build image

docker-compose build

or

docker build . -t pixelfed:v0.11.2 -f contrib/docker/Dockerfile.apache

⬇️ Download other

docker-compose pull

⚙️ Config ENV

nano .env.docker

See #Site Settings
Every time you edit your .env file, you must run this command to have the changes take effect:

docker-compose exec app php artisan config:cache && docker-compose -f docker-compose.yml --project-name Pixelfed up -d

🚀 Start containers

docker-compose -f docker-compose.yml --project-name Pixelfed up -d

⚙️ Check docker-compose

docker-compose ps

⚙️ After install

Load tables to database

docker-compose exec app php artisan migrate --force

Config Laravel

docker-compose exec app php artisan key:generate
docker-compose exec app php artisan passport:keys
docker-compose exec app php artisan storage:link (Create the symbolic links configured for the application)
docker-compose exec app php artisan import:cities

Create 1st user (Password 6 simbols min)

docker-compose exec app php artisan user:create

Site Settings

Documentation – https://docs.pixelfed.org/technical-documentation/env.html

ENV


ENFORCE_EMAIL_VERIFICATION=true

Enable settings in Admin Dashboard (May not work, so use the config .env)

ENABLE_CONFIG_CACHE=true
docker-compose -f docker-compose.yml --project-name Pixelfed up -d
docker-compose exec worker php artisan config:cache

GUI

https://site/i/admin/settings

Also (if no enabled in .env)

Activate Federation

docker-compose exec app php artisan instance:actor

Enable Laravel horizon

docker-compose exec worker php artisan horizon:install
docker-compose exec worker php artisan horizon:publish
docker-compose restart worker

📖 Moderation

Media

1) Delete media – https://site/i/admin/media
2) Ban this media by hash – https://site/i/admin/media?layout=addbanned

Reports

Media,Chat,Comments,Stories

1) Check reports – https://site/i/admin/reports

Special

Update

When update image pixelfed:newverion in docker-compose

docker-compose exec app php artisan migrate --force
docker-compose -f docker-compose.yml --project-name Pixelfed up -d

Administration

API https://docs.pixelfed.org/technical-documentation/artisan.html
ENV https://docs.pixelfed.org/technical-documentation/env.html
ADMIN https://docs.pixelfed.org/running-pixelfed/administration.html

See artisan commands

docker-compose exec app php artisan list

Users

docker-compose exec app php artisan user:show admin2
docker-compose exec app php artisan user:table

Clear/fixes system

docker-compose exec app php artisan fix:usernames
docker-compose exec app php artisan media:gc (Delete media uploads not attached to any active statuses)
docker-compose exec app php artisan story:gc (Clear expired Stories)

Storage check

docker exec -ti pixelfed_app_1 bash
du --max-depth=1 -h /var/www/public/storage/m/

Clear cache

docker-compose exec app php artisan route:cache
docker-compose exec app php artisan view:cache
docker-compose exec app php artisan config:cache
docker-compose exec app php artisan cache:clear
docker-compose exec app php artisan optimize:clear
docker-compose exec app php artisan optimize

Backup (spatie/laravel-backup)

docker-compose exec app php artisan backup:list
docker-compose exec app php artisan backup:monitor
docker-compose exec app php artisan backup:clean

Restore

Restore Database

Enter in app container

docker exec -t -i pixelfed_app_1 bash

Unzip Backup Database

unzip -o /var/www/storage/app/Pixelfed-Prod/2022-03-13-13-00-30.zip -d /var/www/storage/app/Pixelfed-Prod/unzip
/var/www/storage/app/Pixelfed-Prod/unzip/db-dumps/mysql-pixelfed_prod.sql.gz
gunzip -c /var/www/storage/app/Pixelfed-Prod/unzip/db-dumps/mysql-pixelfed_prod.sql.gz > /var/www/storage/app/Pixelfed-Prod/unzip/db-dumps/mysql-pixelfed_prod.sql

Exit from container

exit

Transfer Database Backup from pixelfed_app_1 to pixelfed_db_1 for restore

docker cp pixelfed_app_1:/var/www/storage/app/Pixelfed-Prod/unzip/db-dumps/mysql-pixelfed_prod.sql /root/mysql-pixelfed_prod.sql
docker cp /root/mysql-pixelfed_prod.sql pixelfed_db_1:/

Enter in database container

docker exec -t -i pixelfed_db_1 bash

Enter in mysql
mysql –user=pixelfed –password=pixelfed_db_pass
connect pixelfed_prod

Dump

mysqldump --user=pixelfed --password=pixelfed_db_pass pixelfed_prod > /mysql-pixelfed_prod.sql

Drop mysql database

mysqldump --user=pixelfed --password=pixelfed_db_pass --add-drop-table --no-data pixelfed_prod | grep ^DROP | mysql --user=pixelfed --password=pixelfed_db_pass pixelfed_prod

Restore database

mysql --user=pixelfed --password=pixelfed_db_pass pixelfed_prod < /mysql-pixelfed_prod.sql

Delete temp files

docker exec -ti pixelfed_app_1 rm -r /var/www/storage/app/Pixelfed-Prod/unzip
docker exec -ti pixelfed_db_1 rm mysql-pixelfed_prod.sql

Restore Files

Enter in app container

docker exec -t -i pixelfed_app_1 bash

Transfer Files Backup from pixelfed_app_1 (/var/www/storage/app/Pixelfed-Prod/unzip/var/www) to (/var/www/) for restore

mv /var/www/storage/app/Pixelfed-Prod/unzip/var/www /restore
rm -r /var/www/storage/app/Pixelfed-Prod/unzip
mv /restore /var/www/

⚙️ Uninstall

docker container rm --force pixelfed_redis_1 && docker container rm --force pixelfed_db_1 && docker container rm --force pixelfed_worker_1 && docker container rm --force pixelfed_app_1
docker volume rm --force pixelfed_redis-data && docker volume rm --force pixelfed_app-storage && docker volume rm --force  pixelfed_app-bootstrap && docker volume rm --force pixelfed_db-data

⚠️ Issues

IssueSolution
Sorry, this page isnt available.Set APP_URL and APP_DOMAIN on domain (not ip)
Cant change settings in web GUI?docker-compose exec app php artisan passport:keys


If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

Scroll up

Spelling error report

The following text will be sent to our editors: