How to Install Mealie on Clear Linux Latest

Mealie is a self-hosted recipe manager, grocery list and meal planner. In this tutorial, we will guide you on how to install Mealie on Clear Linux Latest.

Prerequisites

Before you start, make sure you have:

Step 1: Install Required Packages

The first step is to install the required packages for Mealie on Clear Linux. At the terminal type:

sudo swupd bundle-add nginx git python3-basic ninja-build

Step 2: Clone Mealie Repository

Now, clone the Mealie repository to your Clear Linux system. At the terminal, type:

git clone https://github.com/hay-kot/mealie.git

Once the cloning is completed, you can navigate inside the Mealie directory.

cd mealie

Step 3: Create Python Virtual Environment

Create a Python virtual environment before installing Mealie.

python3 -m venv venv

To activate the virtual environment type:

source venv/bin/activate

Step 4: Installing Requirements

Install Mealie requirements using pip:

pip install --upgrade pip setuptools wheel
pip install -r requirements.txt

Step 5: Create Configuration File

Mealie requires a configuration file to work. Copy the example.env file and rename it to .env. Run the following commands:

cp example.env .env

Step 6: Prepare Database

Mealie requires a database to store recipe information. Use the following command to create a database:

python3 manage.py makemigrations
python3 manage.py migrate

Step 7: Collect Static Files

Collect static files that are used in the administration UI:

python3 manage.py collectstatic

Step 8: Test Mealie

Test Mealie to make sure it is working:

python3 manage.py runserver

If everything worked correctly, you should see a message similar to the following output:

Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

To access the Mealie web interface, open a web browser, and go to http://localhost:8000.

Step 9: Use Nginx as a Reverse Proxy (Optional)

It is recommended to use Nginx as a reverse proxy in front of Mealie, especially if you want to access it from outside your network.

To use Nginx, you need to create a configuration file in the /etc/nginx/conf.d/ directory. For example, let's create a configuration file called mealie.conf.

Use your favorite text editor to create the file:

sudo nano /etc/nginx/conf.d/mealie.conf

Add the following content to the file:

server {
    listen 80; # Change this to the desired port

    location / {
        proxy_pass http://127.0.0.1:8000; # Change this to the IP and port of Mealie
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Save and close the file by pressing Ctrl + X, followed by Y, then Enter.

Test the Nginx configuration by running the following command:

sudo nginx -t

If there are no errors, reload the Nginx service:

sudo systemctl reload nginx

You should now be able to access Mealie from your web browser using the IP address of your machine.

Conclusion

Congratulations! You have now installed Mealie on Clear Linux Latest. You can now enjoy the benefits of a self-hosted recipe manager, grocery list, and meal planner.

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!