This is a setup using an Ubuntu 18.04 Droplet at DigitalOcean. These are just my instructions for myself after trying to get PixelFed running a few times – and finally getting it running in decent shape. It’s not very clean, it relied on a lot of Googling for stuff.
For the most part, this creates a running PixelFed instance, the only thing that I found that is still broken is the registration. When I register my first user, after clicking register, it results in an error. Reloading the page gets me to the page to send the email confirmation.
Since I am bringing this up as a new droplet, I run (yes, bad habit) everything as root unless specified.
The files needed can be found in this git repo: https://github.com/ultramookie/pixelfed-confs
apt-get -y install php7.2-fpm php7.2-gd php7.2-mbstring php-imagick php7.2-mysql mysql-server-5.7 redis-server graphicsmagick php-json php-services-json jpegoptim nginx-full optipng pngquant gifsicle composer php7.2-bcmath zip unzip
mysql -e 'create database pixels'
mysql -e "grant all on pixels.* to 'pixels'@'localhost' identified by 'INSERT_PASSWORD'"
This SSL certificate stuff will depend on you and if you have certs. I use origin certs from Cloudflare and have Cloudflare do SSL termination for me.
mv yourcert.pem /etc/ssl/certs/
mv yourcert.key /etc/ssl/private/
You’ll need to edit the pixelfed-site.conf file to adjust the SSL certificate lines in there before doing the next step.
mv pixelfed-site.conf /etc/nginx/sites-available/
ln -s /etc/nginx/sites-available/pixelfed-site.conf /etc/nginx/sites-enabled/pixelfed-site.conf
service nginx restart
mv pixelfed-fpm.conf /etc/php/7.2/fpm/pool.d/
service php7.2-fpm restart
usermod -aG pixelfed www-data
git clone https://github.com/dansup/pixelfed.git
Run as pixelfed (sudo - pixelfed)
cp .env.example .env
Changed to production
Change to your domain
The default config has mail going to log. Need to change that.
Run this stuff as pixelfed (sudo - pixelfed)
php artisan key:generate
php artisan storage:link
php artisan migrate
mv pixelfed-horizon.service /etc/systemd/system/
systemctl enable pixelfed-horizon
service pixelfed-horizon start
Becoming an Admin
I cheated and need to find out if there’s a better way of doing this. But, I made my user (the first one registered) and admin by connecting to the mysql database directly and setting the is_admin to 1.
update users set is_admin='1' where id='1';