How to Install EveryDocs on Arch Linux

EveryDocs is a web-based document management system that allows you to store, search, and retrieve documents. In this tutorial, we will show you how to install EveryDocs on Arch Linux.

Prerequisites

Step 1: Install Prerequisites

Before we can install EveryDocs, we need to install some prerequisites. Open Terminal and run the following command:

sudo pacman -S unzip git apache php php-apache php-gd php-intl php-mbstring php-pgsql php-zip postgresql

The unzip package is required to extract the EveryDocs file, while git is required to clone the EveryDocs repository. Apache is the web server software used to run EveryDocs, while PHP is the programming language used to build EveryDocs. The php-apache, php-gd, php-intl, php-mbstring, php-pgsql, and php-zip packages are PHP modules that EveryDocs requires. Finally, PostgreSQL is the database system that EveryDocs uses.

Step 2: Clone the EveryDocs Repository

Once we have installed the prerequisites, we can clone the EveryDocs repository. Run the following command in Terminal:

sudo git clone https://github.com/jonashellmann/everydocs-core /srv/http/everydocs

This command clones the EveryDocs repository into the /srv/http/everydocs directory.

Step 3: Configure Apache

Next, we need to configure Apache to serve the EveryDocs application. To do this, we need to create a new Apache configuration file. Open Terminal and run the following command:

sudo nano /etc/httpd/conf/extra/everydocs.conf

This command opens the Nano text editor and creates a new file called everydocs.conf.

In the everydocs.conf file, paste the following configuration:

<VirtualHost *:80>
   ServerAdmin webmaster@localhost
   DocumentRoot "/srv/http/everydocs/public"
   ServerName localhost
   ErrorLog "/var/log/httpd/everydocs.error_log"
   CustomLog "/var/log/httpd/everydocs.access_log" combined

   <Directory "/srv/http/everydocs/public">
      AllowOverride All
      Require all granted
   </Directory>

   <IfModule dir_module>
      DirectoryIndex index.html index.php
   </IfModule>
</VirtualHost>

Save and close the file by pressing CTRL+X, then Y, and finally ENTER.

Now we can enable the Apache mod_rewrite module by running the following command:

sudo ln -s /etc/httpd/conf/{extra/,}httpd-everydocs.conf

This command creates a symbolic link from the httpd-everydocs.conf configuration file to the main httpd.conf configuration file.

Finally, restart Apache with the following command:

sudo systemctl restart httpd

Step 4: Configure PostgreSQL

EveryDocs uses PostgreSQL as its database system. We need to create a new database and database user for EveryDocs. Open Terminal and run the following command:

sudo -i -u postgres

This command switches to the postgres user account, which has permission to manage PostgreSQL.

Next, we need to create a new database for EveryDocs. Run the following command:

createdb everydocs

This command creates a new database called everydocs.

Now we need to create a new database user for EveryDocs. Run the following command:

createuser --interactive

This command opens an interactive prompt where we can create a new database user. Enter a username and password for the new user, then press ENTER to accept the other defaults.

Next, we need to grant the new user permission to access the everydocs database. Run the following command:

psql

This command opens the PostgreSQL command-line interface. Run the following command:

GRANT ALL PRIVILEGES ON DATABASE everydocs TO [USERNAME];

Replace [USERNAME] with the username you created in the previous step.

Exit the PostgreSQL command-line interface by pressing CTRL+D.

Step 5: Install Composer

EveryDocs uses Composer to manage its PHP dependencies. We need to install Composer before we can install EveryDocs. Run the following command:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

This command downloads the Composer installer.

Run the following command to verify the installer:

php composer-setup.php --no-ansi --install-dir=/usr/bin --filename=composer

This command installs Composer globally on your system.

Finally, run the following command to verify the installation:

composer -V

This command should output the Composer version number.

Step 6: Install EveryDocs

We are now ready to install EveryDocs. Change to the /srv/http/everydocs directory by running the following command:

cd /srv/http/everydocs

Next, run the following command to install EveryDocs:

composer install

This command installs EveryDocs and its PHP dependencies.

Step 7: Configure EveryDocs

We need to configure EveryDocs to use the PostgreSQL database we created earlier. Run the following command to create a new configuration file:

cp .env.example .env

This command creates a new configuration file called .env.

Open the .env file with your preferred text editor:

sudo nano .env

Find the following lines:

DB_CONNECTION=sqlite
# DB_DATABASE=/path/to/database.sqlite

Change them to:

DB_CONNECTION=pgsql
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=everydocs
DB_USERNAME=[USERNAME]
DB_PASSWORD=[PASSWORD]

Replace [USERNAME] and [PASSWORD] with the username and password you created earlier.

Save and close the file by pressing CTRL+X, then Y, and finally ENTER.

Step 8: Run EveryDocs

We are now ready to run EveryDocs. Run the following command to migrate the database and seed some initial data:

php artisan migrate:fresh --seed

This command creates the necessary database tables and inserts some initial data.

Finally, run the following command to start EveryDocs:

php artisan serve --host=0.0.0.0 --port=8080

This command starts the EveryDocs web server and listens on port 8080.

Step 9: Access EveryDocs

Congratulations! You have successfully installed EveryDocs on Arch Linux. To access EveryDocs, open a web browser and enter http://localhost:8080 into the address bar. You should see the EveryDocs login page.

Enter the following credentials to log in:

You can now start using EveryDocs to manage your documents.

Conclusion

In this tutorial, we have shown you how to install EveryDocs on Arch Linux. You now have a powerful document management system at your fingertips. Happy documenting!

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!