Local Food Nodes is a web application that allows you to create a local food network within your community. In this tutorial, we will guide you through the process of installing Local Food Nodes on Elementary OS, so you can start building your own local food network.
Before we begin, make sure that you have the following:
Local Food Nodes requires a web server to run. We will be using Apache web server, which can be installed using the following command in Terminal:
sudo apt-get install apache2
Local Food Nodes is built using PHP, so we need to install PHP on our system. You can install PHP and its dependencies using the following command in Terminal:
sudo apt-get install php libapache2-mod-php php-mysql
Local Food Nodes requires a database to store its data. We will be using MySQL as our database server. You can install MySQL and its dependencies using the following command in Terminal:
sudo apt-get install mysql-server
During the installation process, you will be prompted to set a root password for MySQL.
We need to create a database for Local Food Nodes to store its data. To do so, open Terminal and enter the following commands:
sudo mysql -u root -p
This command opens the MySQL command prompt. Type in your MySQL root password when prompted.
Next, we need to create a new database. Type the following command into the MySQL command prompt:
CREATE DATABASE localfoodnodes;
This creates a new database called "localfoodnodes".
You can download the latest version of Local Food Nodes from their website, https://localfoodnodes.org/. Once you have downloaded the package, extract it to your web server's root directory, which is typically located at /var/www/html/
.
We need to create a MySQL user with privileges to access the "localfoodnodes" database we created earlier. To do so, enter the following commands into the MySQL command prompt:
GRANT ALL PRIVILEGES ON localfoodnodes.* TO 'localfoodnodesuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
This creates a new MySQL user called "localfoodnodesuser" with the password "password", and grants it full privileges to access the "localfoodnodes" database.
Next, we need to configure Local Food Nodes to use our newly created database and MySQL user. Open the Local Food Nodes configuration file located at /var/www/html/localfoodnodes/.env
.
Edit the following lines to match the database and MySQL user information we created earlier:
DB_DATABASE=localfoodnodes
DB_USERNAME=localfoodnodesuser
DB_PASSWORD=password
Save the changes and close the file.
We need to restart Apache web server to apply the changes we made to our system. Enter the following command in Terminal:
sudo service apache2 restart
We need to set file permissions for Local Food Nodes to work properly. Enter the following commands in Terminal:
cd /var/www/html
sudo chown -R www-data:www-data localfoodnodes
sudo chmod -R 755 localfoodnodes/storage
sudo chmod -R 755 localfoodnodes/bootstrap/cache
Open your web browser and go to http://localhost/localfoodnodes/public/
. You should see the Local Food Nodes login page.
Congratulations, you have successfully installed Local Food Nodes on Elementary OS. Now you can start building your own local food network!
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!