How to Install Papermerge on POP! OS

In this tutorial, we are going to guide you on how to install Papermerge on POP! OS latest version. Papermerge is an open-source tool that helps you manage and organize your documents easily. It allows you to import, store, and search for documents with ease.

Prerequisites

Before you begin, ensure that you have the following requirements:

Step 1: Update your system

The first thing you should do before installing any software package on your system is to update your system to the latest version. Use the following command to update your system:

sudo apt update && sudo apt upgrade

Step 2: Install PostgreSQL

Papermerge requires a PostgreSQL database to operate. To install PostgreSQL on your system, run the following command:

sudo apt install postgresql postgresql-contrib

Once the installation is complete, enable and start the PostgreSQL service using the following command:

sudo systemctl enable postgresql && sudo systemctl start postgresql

Step 3: Install Dependencies

Next, we need to install some prerequisites packages required to run Papermerge. Use the following command to install them:

sudo apt install git python3 python3-dev python3-pip python3-venv libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev libpq-dev curl

Step 4: Create a system user for Papermerge

Next, we need to create a system user for Papermerge. Use the following command to create it:

sudo useradd -m papermerge

Now, switch to the papermerge user using the following command:

sudo su -l papermerge

Step 5: Clone Papermerge Repository

We will now clone the Papermerge repository to the user's home directory. Use the following command to clone it:

git clone https://github.com/ciur/papermerge.git

Once the repository is cloned, change to the Papermerge directory using the following command:

cd papermerge

Step 6: Create a virtual environment for Papermerge

Next, we need to create a virtual environment for Papermerge. The virtual environment helps in managing dependencies for different projects. Use the following command to create the virtual environment:

python3 -m venv venv

Now, activate the virtual environment using the following command:

source venv/bin/activate

Step 7: Install Papermerge

Finally, we can install Papermerge on the system. Use the following command to install it:

pip install -r requirements/production.txt

Once the installation is complete, initialize the database:

python manage.py migrate

Step 8: Create a superuser for Papermerge

We need to create a superuser for Papermerge. The superuser will be used to access and manage Papermerge through the web interface. Use the following command to create it:

python manage.py createsuperuser

Follow the instructions to create a superuser.

Step 9: Configure Papermerge

Finally, we need to configure Papermerge. Go to the Papermerge directory and copy the example configuration file:

cp contrib/production/example.env .env

Now, open the .env file and modify it according to your needs:

nano .env

Step 10: Run Papermerge

You can now start Papermerge using the following command:

python manage.py runserver

Visit Papermerge at http://localhost:8000/ in your web browser.

Congratulations! You successfully installed Papermerge on POP! OS latest version.

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!