Local Food Nodes is a web server application that provides a platform for local food producers to connect with consumers in their area. This tutorial will guide you through the process of installing Local Food Nodes on EndeavourOS, a Linux distribution based on Arch.
Before you can start installing Local Food Nodes, you need to ensure you have the following:
Launch the terminal and update your system using the following command:
sudo pacman -Syu
Install the required dependencies:
sudo pacman -S go postgresql nodejs npm
Create a new user for Local Food Nodes and set a password:
sudo useradd -m -s /bin/bash lfuser
sudo passwd lfuser
Create a new database and grant the user permission to access it:
sudo -u postgres createuser -P lfuser
sudo -u postgres createdb -O lfuser lfdb
Clone the Local Food Nodes repository:
git clone https://github.com/localfoodnodes/LFN.git ~/lfn
Navigate to the LFN directory and install the Node.js dependencies:
cd ~/lfn
npm install
Build the application:
npm run build
Rename the example configuration file:
cp .env.example .env
Edit the configuration file and configure the following:
DB_DRIVER=postgres
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=lfuser
DB_PASSWORD=<INSERT THE PASSWORD YOU CREATED>
DB_DATABASE=lfdb
Modify your Apache virtual host configuration to include the following:
ProxyPass /api/ http://localhost:5000/api/
ProxyPassReverse /api/ http://localhost:5000/api/
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
Start the Node.js server:
npm run start:server
In a separate terminal, start the React front-end:
npm run start:client
With the installation complete, you can now access Local Food Nodes by navigating to your server's IP address in your web browser. The first time you visit the site, you will be prompted to create a new user account.
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!