Skip to content
This repository was archived by the owner on Feb 19, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/_static/Screenshot_first_logged.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/Screenshot_first_run_login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/Screenshot_upload_and_scanned.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions docs/_static/lxc-install.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions docs/examples/lxc/lxc-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!/usr/bin/env bash

# Bash script to install paperless in lxc containter
# paperless.lan
#
# Will set-up paperless, apache2 and proftpd
#
# lxc launch ubuntu: paperless
# lxc exec paperless -- sh -c "wget https://raw.githubusercontent.com/danielquinn/paperless/master/scripts/lxc/lxc-install.sh && /bin/bash lxc-install.sh"
#
#

# Add paperless user with no password
adduser --disabled-password --gecos "" paperless
# Add ftpupload
adduser --disabled-password --gecos "" ftpupload
echo "Set ftpupload password: "
passwd ftpupload
# Allow paperless group to access
adduser paperless ftpupload
chmod g+w /home/ftpupload

# Get apt up to date
apt-get update

# Needed for plain Paperless
apt-get -y install unpaper gnupg libpoppler-cpp-dev python3-pyocr tesseract-ocr imagemagick optipng

# Needed for Apache
apt-get -y install apache2 libapache2-mod-wsgi-py3

# Install ftp server and make sure all uplaoded files are owned by paperless
apt-get -y install proftpd
cat <<EOF >> /etc/proftpd/proftpd.conf
<Directory /home/ftpupload/>
UserOwner paperless
GroupOwner paperless
</Directory>
EOF
systemctl restart proftpd


#Get Paperless from git
su -c "cd /home/paperless ; git clone https://github.com/danielquinn/paperless" paperless

# Install Pip Requirements
apt-get -y install python3-pip python3-venv
cd /home/paperless/paperless
pip3 install -r requirements.txt

# Take paperless.conf.example and set consumuption dir (ftp dir)
sed -e '/PAPERLESS_CONSUMPTION_DIR=/s/=.*/=\"\/home\/ftpupload\/\"/' \
/home/paperless/paperless/paperless.conf.example >/etc/paperless.conf

# Update /etc/paperless.conf with PAPERLESS_SECRET_KEY
SECRET=$(strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo)
sed -i "s/#PAPERLESS_SECRET_KEY.*/PAPERLESS_SECRET_KEY=$SECRET/g" /etc/paperless.conf

#Initialise the SQLite database
su -c "cd /home/paperless/paperless/src/ ; ./manage.py migrate" paperless
#Create a user for your Paperless instance
su -c "cd /home/paperless/paperless/src/ ; ./manage.py createsuperuser" paperless
# 167 static files copied to '/home/paperless/paperless/static'.
su -c "cd /home/paperless/paperless/src/ ; ./manage.py collectstatic" paperless

# Set-up apache
cp /home/paperless/paperless/docs/examples/lxc/paperless.conf /etc/apache2/sites-available/
a2dissite 000-default.conf
a2ensite paperless.conf
systemctl reload apache2

sed -e "s/home\/paperless\/project\/virtualenv\/bin\/python/usr\/bin\/python3/" \
/home/paperless/paperless/scripts/paperless-consumer.service \
>/etc/systemd/system/paperless-consumer.service

sed -i "s/\/home\/paperless\/project\/src\/manage.py/\/home\/paperless\/paperless\/src\/manage.py/" \
/etc/systemd/system/paperless-consumer.service


systemctl enable paperless-consumer
systemctl start paperless-consumer

# convert-im6.q16: not authorized
# Security risk ?
# https://stackoverflow.com/questions/42928765/convertnot-authorized-aaaa-error-constitute-c-readimage-453
mv /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xmlout
18 changes: 18 additions & 0 deletions docs/examples/lxc/paperless.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VirtualHost *:80>
ServerName paperless.lan

Alias /static/ /home/paperless/paperless/static/
<Directory /home/paperless/paperless/static>
Require all granted
</Directory>

WSGIScriptAlias / /home/paperless/paperless/src/paperless/wsgi.py
WSGIDaemonProcess paperless.lan user=paperless group=paperless threads=5 python-path=/home/paperless/paperless/src
WSGIProcessGroup paperless.lan

<Directory /home/paperless/paperless/src/paperless>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ Contents
troubleshooting
contributing
scanners
screenshots
changelog
4 changes: 4 additions & 0 deletions docs/scanners.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ that works right for you based on recommentations from other Paperless users.
+---------+----------------+-----+-----+-----+----------------+
| Brother | `MFC-J6930DW`_ | yes | | | `ayounggun`_ |
+---------+----------------+-----+-----+-----+----------------+
| Brother | `MFC-J5910DW`_ | yes | | | `bmsleight`_ |
+---------+----------------+-----+-----+-----+----------------+
| Fujitsu | `ix500`_ | yes | | yes | `eonist`_ |
+---------+----------------+-----+-----+-----+----------------+

.. _ADS-1500W: https://www.brother.ca/en/p/ads1500w
.. _MFC-J6930DW: https://www.brother.ca/en/p/MFCJ6930DW
.. _MFC-J5910DW: https://www.brother.co.uk/printers/inkjet-printers/mfcj5910dw
.. _ix500: http://www.fujitsu.com/us/products/computing/peripheral/scanners/scansnap/ix500/

.. _danielquinn: https://github.com/danielquinn
.. _ayounggun: https://github.com/ayounggun
.. _bmsleight: https://github.com/bmsleight
.. _eonist: https://github.com/eonist
16 changes: 16 additions & 0 deletions docs/screenshots.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. _screenshots:

Screenshots
===========

Once everything is set-up login to paperless using the web front-end

.. image:: ./_static/Screenshot_first_run_login.png

Nice clean interface

.. image:: ./_static/Screenshot_first_logged.png

Some documents loaded in via ftp or using the scanners ftp.

.. image:: ./_static/Screenshot_upload_and_scanned.png
49 changes: 48 additions & 1 deletion docs/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,22 @@ You can go multiple routes with setting up and running Paperless:

* The `bare metal route`_
* The `docker route`_
* A suggested `linux containers route`_


The `docker route`_ is quick & easy.

The `bare metal route`_ is a bit more complicated to setup but makes it easier
should you want to contribute some code back.

The `linux containers route`_ is quick, but makes alot of assumptions on the
set-up, on the other hand the script could be used to install on a base
debian or ubuntu server.

.. _docker route: setup-installation-docker_
.. _bare metal route: setup-installation-bare-metal_
.. _Docker Machine: https://docs.docker.com/machine/

.. _linux containers route: setup-installation-linux-containers_

.. _setup-installation-bare-metal:

Expand Down Expand Up @@ -484,3 +489,45 @@ If you're using Docker, you can set a restart-policy_ in the
Docker daemon.

.. _restart-policy: https://docs.docker.com/engine/reference/commandline/run/#restart-policies-restart


.. _setup-installation-linux-containers:

Suggested way for Linux Container Method
++++++++++++++++++++++++++++++++++++++++

This method uses some rigid assumptions, for the best set-up:-

* Ubuntu lts as the container
* Apache as the webserver
* proftpd as ftp server
* ftpupload as the ftp user
* paperless as the main user for website
* http://paperless.lan is the desired lan url
* LXC set to give ip addresses on your lan

This could also be used as an install on a base debain/ubuntu server,
if the above assumptions are acceptable.

1. Install lxc


2. Lanch paperless container

.. code:: bash

$ lxc launch ubuntu: paperless

3. Run install script within container

.. code:: bash

$ lxc exec paperless -- sh -c "wget https://raw.githubusercontent.com/danielquinn/paperless/master/docs/examples/lxc/lxc-install.sh && /bin/bash lxc-install.sh"

The script will ask you for an ftpupload password.
As well as the super-user for paperless web front-end.
After around 10 mins, http://paperless.lan is ready and
ftp://paperless.lan with user: ftpupload

See the `Installation recording <_static/lxc-install.svg>`_.

11 changes: 11 additions & 0 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,14 @@ For more information on this and situations like it, you should take a look
at `Issue #118`_ as that's where this tip originated.

.. _Issue #118: https://github.com/danielquinn/paperless/issues/118


.. _troubleshooting-consumerlogs


Viewing Consumer logs
---------------------

.. code:: bash

$ sudo journalctl -u paperless-consumer