How to Install PixelFed on POP! OS Latest

PixelFed is a free and open-source, privacy-focused image sharing platform that is similar to Instagram. It allows you to upload and share your images and videos with your friends and family without being tracked by ads online.

In this tutorial, we will guide you through the installation process of PixelFed on POP! OS Latest.

Prerequisites

Step 1: Update Your System

Before installing any new software, it is essential to update your system to avoid any conflicts or compatibility issues.

sudo apt-get update
sudo apt-get upgrade

Step 2: Install Required Dependencies

PixelFed requires some dependencies to be installed on your system. Run the following command to install these dependencies:

sudo apt-get install -y mysql-server imagemagick ffmpeg python3 python3-pip python3-setuptools python3-dev python3-pil python3-pil.imagetk python3-magic

Step 3: Install PixelFed

To download the latest version of PixelFed, Clone its GitHub repository on your server:

cd /var/www/
sudo git clone https://github.com/pixelfed/pixelfed.git

Now, Change the directory where you cloned the repository and Install PixelFed by using pip:

cd pixelfed/
sudo pip3 install -r requirements.txt

Before proceeding to the next step, You'll have to create a local configuration file by copying the example file:

cp .env.example .env

Step 4: Configuration

PixelFed's configuration is stored in the .env file. Edit the .env file to update your configuration details like your database settings, domain name, email, and more.

nano .env

Edit and Save the file with your desired configuration settings.

Step 5: Create MySQL Database

PixelFed requires a MySQL database to store information related to its users and their posts. Log in to the MySQL shell by typing the following command:

sudo mysql -u root -p

After that, create a new database and user account by running the following commands:

CREATE DATABASE pixelfed;
CREATE USER 'pixelfed'@'localhost' IDENTIFIED BY 'your-password';
GRANT ALL PRIVILEGES ON pixelfed.* TO 'pixelfed'@'localhost';

Remember to replace your-password with a strong password.

Exit the MySQL shell by typing EXIT;

Step 6: Setup Data

To setup PixelFed database structure, Run the following command:

./artisan migrate

Step 7: Start the Application

Finally, start the PixelFed application by running the following command:

./artisan serve

This command will start the application on the local server. You can now access the PixelFed application by navigating to http://localhost:8000 from your web browser.

To make the application public, You need to configure the web server's reverse proxy.

Bonus - Setup SSL

If you want to enable SSL for your PixelFed instance, you can use Let's Encrypt SSL certificate.

Install Certbot by running the following command:

sudo apt install certbot certbot-nginx

After that, run the following command to obtain a wildcard SSL certificate:

sudo certbot certonly --manual --preferred-challenges=dns --email your-email@example.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d *.example.com

Replace your-email and example.com with your actual email and domain name.

This command will generate a TXT record for you to add to your domain's DNS settings. It will then check to see if the record exists before issuing your certificate.

Once you complete the DNS settings, your certificate will be issued, and you can follow the instructions to configure your webserver to use SSL.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!