Pixelfed Install

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 Stuff

mysql -e “grant all on pixels.* to ‘pixels’@‘localhost’ identified by ‘INSERT_PASSWORD’”```

nginx Stuff

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.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.

ln -s /etc/nginx/sites-available/pixelfed-site.conf /etc/nginx/sites-enabled/pixelfed-site.conf```

service nginx restart```

php Stuff

service php7.2-fpm restart```

Get Ready

usermod -aG pixelfed www-data```

cd pixelfed```

Run as pixelfed (sudo - pixelfed)

cp .env.example .env```

Conf Editing

Changed to production

Change to your domain



The default config has mail going to log. Need to change that.

## Running Init
Run this stuff as pixelfed (sudo - pixelfed)

php artisan key:generate```

php artisan migrate```

Horizon Service

systemctl enable pixelfed-horizon```

## 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’;```