{"id":7127,"date":"2018-10-22T21:01:56","date_gmt":"2018-10-22T18:01:56","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/ubuntu-paperwork-document-management-system-installation\/"},"modified":"2018-10-22T21:01:56","modified_gmt":"2018-10-22T18:01:56","slug":"how-to-install-paperwork-dms-on-ubuntu-18-04-lts","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts\/","title":{"rendered":"How to install Paperwork DMS on Ubuntu 18.04 LTS"},"content":{"rendered":"<p>Paperwork is a free, open-source and self-hosted personal document manager that can be used to manages scanned documents and PDFs. It is alternate solutions to other services like Evernote, Microsoft OneNote and Google Keep. It comes with lots of features including, Automatic detection of page orientation, Scan, OCR, Document labels, Search, Keyword suggestions, Quick edit of scans and much more.<\/p>\n<p>In this tutorial, we will install Paperwork on Ubuntu 18.04 server.<\/p>\n<h2 id=\"requirements\">Requirements<\/h2>\n<ul>\n<li>A server running Ubuntu 18.04 server.<\/li>\n<li>A non-root user with sudo privileges.<\/li>\n<li>A static IP address 192.168.0.235 configure on your server.<\/li>\n<\/ul>\n<h2 id=\"install-lamp-server\">Install LAMP Server<\/h2>\n<p>First, you will need to install Apache, MariaDB, PHP and other required packages to your server. You can install all of them by running the following command:<\/p>\n<p class=\"command\">sudo apt-get install apache2 mariadb-server php7.2 libapache2-mod-php7.2 php7.2-cli php7.2-gd php7.2-mysql php7.2-curl php7.2-xml php7.2-mbstring php-pear php7.2-zip php-dev git wget npm libmcrypt-dev nodejs -y<\/p>\n<p>Once all the packages are installed, you will need to install the mcrypt PHP extension to your system. You can install it with the pecl command:<\/p>\n<p class=\"command\">sudo pecl channel-update pecl.php.net<br \/>sudo pecl install mcrypt-1.0.1<\/p>\n<p>Next, add the extension mcrypt.so to php.ini file with the following command:<\/p>\n<p class=\"command\">sudo nano \/etc\/php\/7.2\/cli\/php.ini<\/p>\n<p>Add the following lines:<\/p>\n<pre>extension=mcrypt.so&#13;\n<\/pre>\n<p>Save and close the file. Then, start Apache and MariaDB service and enable them to start on boot with the following command:<\/p>\n<p class=\"command\">sudo systemctl start apache2<br \/>sudo systemctl start mysql<br \/>sudo systemctl enable apache2<br \/>sudo systemctl enable mysql<\/p>\n<h2 id=\"configure-database\">Configure Database<\/h2>\n<p>By default, MariaDB is not secured. So you will need to secure it first. You can secure it by running the following script:<\/p>\n<p class=\"command\">sudo mysql_secure_installation<\/p>\n<p>Answer all the questions as shown below:<\/p>\n<pre> Enter current password for root (enter for none):&#13; Set root password? [Y\/n]: N&#13; Remove anonymous users? [Y\/n]: Y&#13; Disallow root login remotely? [Y\/n]: Y&#13; Remove test database and access to it? [Y\/n]: Y&#13; Reload privilege tables now? [Y\/n]: Y&#13;\n<\/pre>\n<p>Once the MariaDB is secured, log in to MariaDB shell:<\/p>\n<p class=\"command\">mysql -u root -p<\/p>\n<p>Enter your root password, then create a database and user for Paperwork:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; CREATE DATABASE paperwork DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br \/>MariaDB [(none)]&gt;GRANT ALL PRIVILEGES ON paperwork.* TO &#8216;paperwork&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;paperwork&#8217; WITH GRANT OPTION;<\/p>\n<p>Next, Flush the privileges with the following command:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; FLUSH PRIVILEGES;<\/p>\n<p>Next, exit from the MariaDB console with the following command:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; EXIT<\/p>\n<h2 id=\"download-and-install-paperwork\">Download and Install Paperwork<\/h2>\n<p>First, download the latest version of Paperwork by running the following command:<\/p>\n<p class=\"command\">cd \/var\/www\/html<br \/>git clone -b 1 https:\/\/github.com\/twostairs\/paperwork.git<\/p>\n<p>Next, instruct PHP to ignore the &#8220;mcrypt_get_iv_size has been deprecated&#8221; message by running the following command:<\/p>\n<p class=\"command\">cd paperwork\/frontend\/<br \/>sudo sed -i.bak &#8216;3ierror_reporting(E_ALL ^ E_DEPRECATED);&#8217; app\/config\/app.php<\/p>\n<p>Next, populate the database with the following command:<\/p>\n<p class=\"command\">sudo php artisan migrate<\/p>\n<p>Output:<\/p>\n<pre>PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0&#13;\n**************************************&#13;\n* Application In Production! *&#13;\n**************************************&#13;\n&#13;\nDo you really wish to run this command? y&#13;\nMigration table created successfully.&#13;\nMigrated: 2014_07_22_194050_initialize&#13;\nMigrated: 2014_07_24_103915_create_password_reminders_table&#13;\nMigrated: 2014_10_08_203732_add_visibility_to_tags_table&#13;\nMigrated: 2015_01_21_034728_add_admin_to_users&#13;\nMigrated: 2015_05_05_094021_modify_tag_user_relation&#13;\nMigrated: 2015_05_22_220540_add_version_user_relation&#13;\nMigrated: 2015_06_15_224221_add_tag_parent&#13;\nMigrated: 2015_06_30_125536_add_sessions_table&#13;\nMigrated: 2015_07_29_130508_alter_versions&#13;\nMigrated: 2016_10_21_224100_fix_timestamps_for_postgres_again&#13;\n<\/pre>\n<p>Next, you will need to install Composer to your system. Composer is a dependency Manager for PHP that can be used to install dependencies required by PHP. You can install Composer with the following command:<\/p>\n<p class=\"command\">curl -sS https:\/\/getcomposer.org\/installer | php<br \/>sudo mv composer.phar \/usr\/local\/bin\/composer<\/p>\n<p>Next, install PHP dependencies through composer with the following command:<\/p>\n<p class=\"command\">sudo composer install<\/p>\n<p>Next, install npm and bower dependencies:<\/p>\n<p class=\"command\">sudo npm install -g gulp bower<br \/>sudo npm install<br \/>sudo bower install &#8211;allow-root<br \/>sudo gulp<\/p>\n<p>Next, give proper permissions to the paperwork directory:<\/p>\n<p class=\"command\">sudo chown www-data:www-data -R \/var\/www\/html\/paperwork<br \/>sudo chmod -R 755 -R \/var\/www\/html\/paperwork<\/p>\n<h2 id=\"configure-apache-for-paperwork\">Configure Apache for paperwork<\/h2>\n<p>Next, you will need to create an Apache virtual host for paperwork:<\/p>\n<p>You can do this with the following command:<\/p>\n<p class=\"command\">sudo nano \/etc\/apache2\/sites-available\/paperwork.conf<\/p>\n<p>Add the following lines:<\/p>\n<pre>&lt;VirtualHost *:80&gt;&#13; ServerAdmin <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"bedfdad3d7d0fedbc6dfd3ced2db90ddd1d3\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>&#13; DocumentRoot \/var\/www\/html\/paperwork\/frontend\/public&#13; ServerName example.com&#13;\n&#13; &lt;Directory \/var\/www\/html\/paperwork\/frontend\/public&gt;&#13; Options FollowSymlinks&#13; AllowOverride All&#13; Require all granted&#13; &lt;\/Directory&gt;&#13;\n&#13; ErrorLog ${APACHE_LOG_DIR}\/error.log&#13; CustomLog ${APACHE_LOG_DIR}\/access.log combined&#13;\n&lt;\/VirtualHost&gt;&#13;\n<\/pre>\n<p>Save and close the file. Then, enable apache virtual host with the following command:<\/p>\n<p class=\"command\">sudo a2ensite paperwork<\/p>\n<p>Finally, restart Apache service to apply all the changes:<\/p>\n<p class=\"command\">sudo systemctl restart apache2<\/p>\n<h2 id=\"access-paperwork-web-interface\">Access Paperwork Web Interface<\/h2>\n<p>Paperwork is now installed and configured, it&#8217;s time to access it through a web browser.<\/p>\n<p>Open your web browser and type the URL http:\/\/example.com. You will be redirected to the Paperwork welcome page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_paperwork_on_ubuntu_1804\/big\/page1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts.png\" alt=\"Paperwork installer\" width=\"550\" height=\"288\" title=\"\"><\/a><\/p>\n<p>Click on the <strong>Next<\/strong> button to continue. You should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page2\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_paperwork_on_ubuntu_1804\/big\/page2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-1.png\" alt=\"Dependency check\" width=\"550\" height=\"270\" title=\"\"><\/a><\/p>\n<p><a class=\"fancybox\" id=\"img-page2_1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_paperwork_on_ubuntu_1804\/big\/page2_1.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-2.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p>Make sure all the required dependencies have been installed. Then, click on the <strong>Next<\/strong> button, you should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page3\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_paperwork_on_ubuntu_1804\/big\/page3.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-3.png\" alt=\"Set database details\" width=\"550\" height=\"291\" title=\"\"><\/a><\/p>\n<p>Here, provide your database details like, database name, username, password and port. Then, click on the <strong>Next<\/strong> button. You should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page4\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_paperwork_on_ubuntu_1804\/big\/page4.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-4.png\" alt=\"Customize paperwork\" width=\"550\" height=\"287\" title=\"\"><\/a><\/p>\n<p>Here, customize Paperwork as per your need. Then, click on the <strong>Next<\/strong> button. You should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page5\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_paperwork_on_ubuntu_1804\/big\/page5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-5.png\" alt=\"Create first account\" width=\"550\" height=\"287\" title=\"\"><\/a><\/p>\n<p>Here, provide your admin user details. Then, click on the <strong>Register and Finish Installation<\/strong> button. you should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page6\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_paperwork_on_ubuntu_1804\/big\/page6.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-6.png\" alt=\"Installation finished\" width=\"550\" height=\"289\" title=\"\"><\/a><\/p>\n<p>Now, click on the <strong>Go to Paperwork<\/strong> button. You will be redirected to the Paperwork Login page as shown below:<\/p>\n<p><a class=\"fancybox\" id=\"img-page7\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_paperwork_on_ubuntu_1804\/big\/page7.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-7.png\" alt=\"Sign in to Paperwork\" width=\"550\" height=\"299\" title=\"\"><\/a><\/p>\n<p>Here, provide your admin email address and password. Then click on the <strong>Sign In<\/strong> button. You should see the Paperwork dashboard in the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page8\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_paperwork_on_ubuntu_1804\/big\/page8.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-8.png\" alt=\"Paperwork Dashboard\" width=\"550\" height=\"290\" title=\"\"><\/a><\/p>\n<h2 id=\"links\">Links<\/h2>\n<div class=\"authorbox\" readability=\"30\">\n<img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts.jpg\" alt=\"Hitesh Jethva\" title=\"\"> <\/p>\n<p><strong>About Hitesh Jethva<\/strong><\/p>\n<p>Over 8 years of experience as a Linux system administrator. My skills include a depth knowledge of Redhat\/Centos, Ubuntu Nginx and Apache, Mysql, Subversion, Linux, Ubuntu, web hosting, web server, Squid proxy, NFS, FTP, DNS, Samba, LDAP, OpenVPN, Haproxy, Amazon web services, WHMCS, OpenStack Cloud, Postfix Mail Server, Security etc.<\/p>\n<\/div>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<p>\n<a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-paperwork-document-management-system-installation%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-9.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-paperwork-document-management-system-installation%2F&amp;text=How+to+install+Paperwork+DMS+on+Ubuntu+18.04+LTS&amp;via=howtoforgecom&amp;related=howtoforgecom\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-10.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/howtoforgecom\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-11.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-paperwork-document-management-system-installation%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-paperwork-dms-on-ubuntu-18-04-lts-12.png\" height=\"20\" alt=\"\" title=\"\"><\/a>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Paperwork is a free, open-source and self-hosted personal document manager that can be used to manages scanned documents and PDFs. It is alternate solutions to other services like Evernote, Microsoft OneNote and Google Keep. It comes with lots of features including, Automatic detection of page orientation, Scan, OCR, Document labels, Search, Keyword suggestions, Quick edit [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-7127","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/7127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=7127"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/7127\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=7127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=7127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=7127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}