<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>@Summitt Dweller’s Personal Blog - Paperless-Ng</title>
    <link>https://blog.summittdweller.com/tags/paperless-ng/</link>
    <description>All entries in Paperless-Ng on Personal Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
    <lastBuildDate>Thu, 07 Jan 2021 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.summittdweller.com/tags/paperless-ng/" rel="self" type="application/rss+xml" />
    
      
      <item>
        <title>Paperless-ng on CentOS7</title>
        <link>https://blog.summittdweller.com/posts/2021/01/paperless-ng-on-centos7/</link>
        <pubDate>Thu, 07 Jan 2021 00:00:00 +0000</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/posts/2021/01/paperless-ng-on-centos7/</guid>
        <description>&lt;p&gt;Over the end-of-year holiday break in 2020 I managed to ressurect my old home-office CentOS 7 development server.  I had a mind salvage and update &lt;a href=&#34;https://github.com/the-paperless-project/paperless&#34;&gt;Paperless&lt;/a&gt; on that server, and I did manage to do that.  However, along the way I discovered the &lt;em&gt;Paperless-ng&lt;/em&gt; branch of the project and I installed it, using &lt;em&gt;Docker&lt;/em&gt; as suggested, by creating a new project and configuration I&amp;rsquo;ve saved as &lt;a href=&#34;https://github.com/SummittDweller/paperless-ng-dockerfiles&#34;&gt;summittdweller/paperless-ng-dockerfiles&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;mounting-my-readynas-share&#34;&gt;Mounting my ReadyNAS Share&lt;/h2&gt;
&lt;p&gt;To successfully mount my &lt;em&gt;ReadyNAS/Paperless&lt;/em&gt; SMB share I had to do the following on &lt;em&gt;centos7&lt;/em&gt; as &lt;em&gt;root&lt;/em&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mount -t cifs -o username=mark,vers=1.0 //192.168.1.48/Paperless /mnt/paperless
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Unfortunately, this did NOT work!  Everything appeeared to be working properly except that files copied into &lt;em&gt;//ReadyNAS/Paperless/consume&lt;/em&gt; were NOT shared into the container as mapped, so no ingest was triggered.  I could only get the ingest to start if I used &lt;em&gt;docker cp&amp;hellip;&lt;/em&gt; to copy the files into the mapped &lt;em&gt;./consume&lt;/em&gt; directory.&lt;/p&gt;
&lt;h2 id=&#34;mounting-homemarkpaperless-ng-to-support-ingest&#34;&gt;Mounting &lt;em&gt;/home/mark/paperless-ng&lt;/em&gt; To Support Ingest&lt;/h2&gt;
&lt;p&gt;So, I turned to &lt;a href=&#34;https://devopspoints.com/centos-7-setting-up-samba-and-nfs-for-file-sharing.html&#34;&gt;https://devopspoints.com/centos-7-setting-up-samba-and-nfs-for-file-sharing.html&lt;/a&gt; for setup of SAMBA on &lt;em&gt;CentOS7&lt;/em&gt; at &lt;em&gt;192.168.1.22&lt;/em&gt; with hopes that I could mount &lt;em&gt;/home/mark/paperless-ng/consume&lt;/em&gt; and get Paperless auto-ingest working.&lt;/p&gt;
&lt;p&gt;It works!  In fact, it works quite well.&lt;/p&gt;
&lt;p&gt;Paperless-ng is configured to watch for changes in &lt;em&gt;/home/mark/paperless-ng/consume&lt;/em&gt; and will ingest any unique .pdf files dropped there.  Note that &lt;em&gt;Paperless-ng&lt;/em&gt; is smart enough to keep track of all the files it has ingested so it won&amp;rsquo;t knowingly ingest a duplicate.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s worth noting that there is also a &lt;em&gt;/home/mark/paperless-ng/exported&lt;/em&gt; directory where regular exports of Paperless documents can be kept before back-up to &lt;em&gt;//ReadyNAS&lt;/em&gt; storage.&lt;/p&gt;
&lt;h2 id=&#34;still-no-good&#34;&gt;Still NO Good&lt;/h2&gt;
&lt;p&gt;So, the network configuration indicated above appears to work when copying files from a Mac into the target share, &lt;em&gt;/home/mark/paperless-ng/consume&lt;/em&gt;.  Unfortunately I&amp;rsquo;ve had NO luck whatsoever getting my &lt;em&gt;Brother ADS-1500W&lt;/em&gt; scanner to network with ANYTHING.  The setup seems just fine, but whatever I scan eventually gives me a &amp;ldquo;Send Failed&amp;rdquo; message with NO other explanation.&lt;/p&gt;
&lt;p&gt;After spending many, many, many hours dealing with this I have officially given up!&lt;/p&gt;
&lt;h2 id=&#34;a-new-usb-workflow&#34;&gt;A New USB Workflow&lt;/h2&gt;
&lt;p&gt;My &lt;em&gt;Brother ADS-1500W&lt;/em&gt; scanner supports a number of transfer options including USB. There&amp;rsquo;s only one USB port on the back of the scanner so it&amp;rsquo;s relatively foolproof.&lt;/p&gt;
&lt;p&gt;To engage this workflow I formatted a USB stick as &lt;em&gt;FAT32&lt;/em&gt; and named it &lt;em&gt;PAPERLESS&lt;/em&gt;.  When this stick is inserted into the scanner a &lt;em&gt;BROTHER&lt;/em&gt; directory is created and scans named &lt;em&gt;mmddyynn.pdf&lt;/em&gt; are generated there.&lt;/p&gt;
&lt;p&gt;Once a set of documents has been scanned using the &lt;em&gt;to USB&lt;/em&gt; profile, the USB stick can be removed from the scanner and plugged in to any &lt;em&gt;CentOS7&lt;/em&gt; USB input port.  The &lt;em&gt;PAPERLESS&lt;/em&gt; volume will automatically appear on the desktop and all that one must do is copy/paste (select and drag) each of the .pdf files from &lt;em&gt;/mnt/paperless/BROTHER&lt;/em&gt; to the target &lt;em&gt;consume&lt;/em&gt; diretory at &lt;em&gt;/home/mark/paperless-ng/consume&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id=&#34;modifying-inotify-in-centos-7&#34;&gt;Modifying &lt;em&gt;inotify&lt;/em&gt; in CentOS 7&lt;/h2&gt;
&lt;p&gt;The &lt;em&gt;~/Desktop/README.md&lt;/em&gt; file on node &lt;em&gt;centos7&lt;/em&gt; documents a necessary step that I discovered as the key to making &lt;em&gt;Paperless&lt;/em&gt; consume/ingest process work.  The commands are:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cat /proc/sys/fs/inotify/max_user_watches          # default is 8192
sudo sysctl fs.inotify.max_user_watdhes=1048576    # necessary increase
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;starting-and-stopping-paperless-ng&#34;&gt;Starting and Stopping &lt;em&gt;Paperless-ng&lt;/em&gt;&lt;/h2&gt;
&lt;h3 id=&#34;starting-paperless-ng&#34;&gt;Starting &lt;em&gt;Paperless-ng&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;Simple, to start it on &lt;em&gt;CentOS7&lt;/em&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cd /home/mark/GitHub/paperless-ng-dockerfiles
docker-compose up -d
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Or, simply reboot &lt;em&gt;CentOS7&lt;/em&gt;.  See auto-start details in the section below.&lt;/p&gt;
&lt;h3 id=&#34;stopping-paperless-ng&#34;&gt;Stopping &lt;em&gt;Paperless-ng&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;Also simple, on &lt;em&gt;CentOS7&lt;/em&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cd /home/mark/GitHub/paperless-ng-dockerfiles
docker-compose down
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;auto-starting-paperless-ng&#34;&gt;Auto-Starting &lt;em&gt;Paperless-ng&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;I found and followed &lt;a href=&#34;https://www.thegeekdiary.com/centos-rhel-7-how-to-make-custom-script-to-run-automatically-during-boot/&#34;&gt;this resource&lt;/a&gt; to create a boot-time auto-start script to configure and launch &lt;em&gt;Paperless-ng&lt;/em&gt; whenever &lt;em&gt;CentOS7&lt;/em&gt; is booted.  My script is &lt;em&gt;/var/tmp/startup_script.sh&lt;/em&gt; and the process of running it echoes some output to &lt;em&gt;/var/tmp/script.out&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I saved the script as a &lt;a href=&#34;https://gist.github.com/SummittDweller/9e179f948faf0d30fe8069f684b7d762&#34;&gt;public gist&lt;/a&gt; for safe-keeping.&lt;/p&gt;
</description>
      </item>
      
    
  </channel>
</rss>
