Paperless-ngx is a free and open-source document management system that helps you to store, organize and search your documents. In this tutorial, we will guide you through the process of installing Paperless-ngx on OpenSUSE Latest.
To install Paperless-ngx on OpenSUSE Latest we need to install some necessary packages. We can easily install them using the following command in the terminal:
sudo zypper install nginx python3-pip python3-virtualenv libjpeg8 libjpeg8-devel libpng16-16 libpng16-compat-devel libtiff5-devel python3-wheel python3-devel python3-psycopg2 python3-lxml python3-BLEACH python3-Tox python3-pycodestyle python3-jinja2 python3-cffi python3-cryptography poppler-utils tesseract-ocr unpaper
This command will install some prerequisite packages required for Paperless-ngx installation.
Now let's start installing Paperless-ngx. We will use git to download the latest version of Paperless-ngx to our local machine.
cd ~
git clone https://github.com/jonaswinkler/paperless-ng
cd paperless-ng
git checkout main
Next, create a virtual environment for Paperless-ngx:
virtualenv .venv
source .venv/bin/activate
Install all the required packages for Paperless-ngx using the following command:
pip install -r requirements.txt
Now we need to prepare the configuration file for Paperless-ngx.
First, create a configuration file by copying the example configuration file:
cp .env.example .env
Edit the .env file using your favorite editor and set the following settings:
SERVER_NAME=your-domain-name
SECRET_KEY=your-secret-key
DATABASE_URL=postgres://username:password@localhost/database
Set your domain name, a secret key, and your PostgreSQL database credentials.
We need to create a PostgreSQL database for Paperless-ngx. You can create a new database with the following command:
sudo su - postgres
createdb -O username -E UTF8 paperless
Replace username
with the username associated with your PostgreSQL database.
Let's now migrate the database schema:
python manage.py migrate
We also need to create a superuser account to manage Paperless-ngx. Use the following command to create a superuser:
python manage.py createsuperuser
We need to collect all the static files for Paperless-ngx using the below command:
python manage.py collectstatic
Finally, let's run the Paperless-ngx using the below command:
python manage.py runserver 0.0.0.0:8000
You can now access the Paperless-ngx web interface using your server's IP address or domain name at http://your-domain-name:8000/
For production use, you should set up Nginx as a reverse proxy for Paperless-ngx. Use the following configuration file /etc/nginx/conf.d/paperless-ngx.conf
:
server {
listen 80;
server_name your-domain-name;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for;
# enable the websocket
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
Reload Nginx using the following command:
sudo systemctl reload nginx
Congratulations! You have successfully installed Paperless-ngx on OpenSUSE Latest.
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!