How to Install Grocy on EndeavourOS Latest

Grocy is an open-source software that helps you manage your household groceries and keep track of their expiration dates. This tutorial will guide you through the process of installing Grocy on your EndeavourOS system.

Prerequisites

Installing Apache2

Grocy requires a web server to function properly. In this tutorial, we will be using Apache2 as our web server.

To install Apache2 on your EndeavourOS system, open a terminal and run the following command:

sudo pacman -S apache

Installing PHP and related modules

Grocy is built using the PHP programming language. To install PHP and its related modules, run the following command in your terminal:

sudo pacman -S php php-apache php-gd php-intl php-pdo php-mysql php-sqlite

After installing the packages, you need to enable the Apache2 module for PHP. To do so, run the following command:

sudo nano /etc/httpd/conf/httpd.conf

Find the line that says:

#LoadModule php_module modules/libphp.so

And uncomment it by removing the # character at the beginning of the line.

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

Creating a Database

Grocy utilizes a database to store and manage data. We will be using SQLite as our database for this tutorial.

To install the SQLite database on your EndeavourOS system, run the following command:

sudo pacman -S sqlite

After installing SQLite, create a new directory for your Grocy installation and navigate to it. Run the following command to create a new SQLite database file:

touch grocy.db

Installing Grocy

Now that we have installed the prerequisites, we can proceed to install Grocy. Run the following commands in your terminal:

cd /var/www/html
sudo git clone https://github.com/grocy/grocy.git grocy
cd grocy
sudo chmod -R 755 data public temp
mv config-dist.php config.php

The first command will navigate to the directory where we will be installing Grocy. The second command will clone the Grocy repository from GitHub to your system. cd grocy will bring you to the newly created grocy directory. The next command will set some necessary permissions on certain directories within the installation. Lastly, mv config-dist.php config.php will rename the configuration file and make it ready for editing.

Now, edit the configuration file using the text editor of your choice. Change the following variables to the appropriate values:

define('BASE_URL', 'http://{your-domain-name-or-IP-address}/grocy/');
define('DB_SYSTEM', 'sqlite');
define('DB_DATABASE', '/var/www/html/grocy/grocy.db');

Save and exit the file.

Final Steps

Restart Apache2 by running the following command:

sudo systemctl restart httpd

Now you can access your Grocy installation by typing in your web browser http://{your-domain-name-or-IP-address}/grocy/.

Follow the on-screen instructions to complete the installation process.

Congratulations, you have successfully installed Grocy on your EndeavourOS system!

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!