How to Install Paperless-ngx on Fedora Server Latest
Paperless-ngx is a open-source application for managing and organizing documents. In this tutorial, we will guide you on how to install Paperless-ngx on a Fedora server latest.
Prerequisites
- A Fedora server latest
- A non-root user with sudo privilege
Step 1 - Update System
It's important to update your system packages to their latest versions using the following command:
sudo dnf update
Step 2 - Install Dependencies
Paperless-ngx requires some dependencies which we will need to install using the command below:
sudo dnf install -y redis mariadb mariadb-server ffmpeg poppler-utils pdftoppm unpaper
Step 3 - Install Python
You'll also need to ensure that Python is installed, as Paperless-ngx is written in Python. Use the following command to install:
sudo dnf install -y python3 python3-pip python3-devel python3-setuptools python3-wheel python3-cffi python3-pillow python3-dateutil python3-pytz python3-boto3 python3-wand python3-future python3-reportlab python3-ldap python3-ldap3 python3-gunicorn python3-cryptography python3-rsa
Step 4 - Install Paperless-ngx
With all dependencies installed, we can now install Paperless-ngx itself. To do this, we will use pip to install the latest version of Paperless-ngx:
sudo pip3 install --user paperless
Now that Paperless-ngx is installed, we can continue with the configuration.
Step 5 - Configure Paperless-ngx
Now that we have Paperless-ngx installed, we need to configure it. First, copy the sample environment file from the Paperless-ngx directory to the same location with the filename .env:
cp ~/.local/bin/paperless/.env.dist ~/.local/bin/paperless/.env
Next, open the new .env file and edit it to fit your needs. For example, update the database credentials, email settings, and local file paths as required.
Step 6 - Create Database
With the configuration file updated, let's create the database. Log in to the MariaDB terminal as the root user:
sudo mysql -u root
Once you are logged in to the MariaDB terminal, create a new user and database with the following commands:
CREATE USER 'paperless'@'localhost' IDENTIFIED BY 'your_password';
CREATE DATABASE paperless;
GRANT ALL PRIVILEGES ON paperless.* TO paperless@localhost;
FLUSH PRIVILEGES;
EXIT;
Step 7 - Migrate Database
Now that the database has been created, we can create the initial tables by running the following command:
paperless migrate
If the migration is successful, the output should end with:
INFO:paperless.cli:Applied 0010_auto_20210125_1454
OK
Step 8 - Start Services
At this point, all that's left to do is start the Redis server, the Gunicorn application server, and the Celery worker:
sudo systemctl start redis
paperless runserver
You can then access Paperless-ngx in your browser by visiting http://your_server_ip:8000.
Conclusion
In this tutorial, you have learned how to install Paperless-ngx on a Fedora server latest. You can now start adding documents to the system and organizing them as needed.