[How-To] Installing and Running Local AI (Ollama) on Porteus 5.01 LXDE (Low RAM)

Get help with the LXDE desktop
User avatar
Andrew0604
Black ninja
Black ninja
Posts: 35
Joined: 27 Oct 2025, 01:00
Distribution: Porteus 5.1 Es
Location: Argentina
Contact:

[How-To] Installing and Running Local AI (Ollama) on Porteus 5.01 LXDE (Low RAM)

Post#1 by Andrew0604 » 26 Aug 2026, 05:22

Hello Porteus Users,

Argentine Spanish translated by Google

# Artificial intelligence

Here is a simple guide to installing and running Ollama (a local language model engine) on Porteus 5.01 LXDE x86_64, even on systems with modest specifications (tested on a system with 4 GB of RAM).

Step 1: Download the package and convert it to .xzm format

Download the official Slackware package for Ollama from Slakfinder:

Download link: https://slackware.nl/slakfinder/index.p ... e=#results

Move the downloaded .txz file to the Porteus modules folder (e.g., /porteus/modules/).

Convert the compressed .txz package to .xzm.

Activate the module by running `activate ollama.xzm` in the terminal or by double-clicking the file in the file manager.


Step 2: Start the Ollama server

Open LXTerminal as the root user and start the service in the background using the following command:

Code: Select all

ollama serve &

Step 3: Download and run an AI model

Depending on the amount of RAM available on your system, you can choose a lightweight model from the following list:

qwen2.5:0.5b (~390 MB) — Recommended for systems with 1 GB to 4 GB of RAM.

qwen2.5:1.5b (~980 MB) — Good balance between speed and accuracy for 4 GB of RAM.

smollm2:1.7b (~1.0 GB) — Fast and optimized for low-resource processors.

llama3.2:1b (~1.3 GB) — Higher reasoning capability; ideal for 4 GB to 8 GB of RAM. To load and run the 390 MB model, enter the following command in the terminal:

Code: Select all

ollama run qwen2.5:0.5b

Step 4: Interact with the AI

Once the model download is complete, you will see the following prompt on the screen:

Code: Select all

>>> Send a message (/? for help)
Type your message directly into the console (for example: "Hello") and press the Enter key.

Basic chat commands:

Clear the screen and context: /clear

Exit the AI ​​session: /bye

To re-enter:

Code: Select all

ollama run qwen2.5:0.5b
Performance note: The first response may take a few seconds while the processor loads the model into RAM. Subsequent responses will be much faster and smoother.

Let us know in the comments how it worked for you, and try out other models on your machines!


:celebrate3:

The image shows the terminal with the AI ​​active and running.

Image

User avatar
Andrew0604
Black ninja
Black ninja
Posts: 35
Joined: 27 Oct 2025, 01:00
Distribution: Porteus 5.1 Es
Location: Argentina
Contact:

[How-To] Installing and Running Local AI (Ollama) on Porteus 5.01 LXDE (Low RAM)

Post#2 by Andrew0604 » 27 Aug 2026, 04:16

Create a Simple AI Bot for Blogger in Porteus Linux

This is how I set up a fully local AI chatbot and integrated it into my old Blogger template using Porteus Linux as the backend server. The best part is that it’s totally free and runs right on my notebook, only for testing purposes.

Prerequisites

You’ll need a few things already installed in your Porteus system. You can get them through the UsM (Unified Slackware Package Manager):

Ollama: For running the AI model.

Python 3: This comes with a built-in web server.


Step 1: Get the Ultra-Light AI Model

You need an AI model that’s smart enough but won't crash your notebook. I recommend SmollM2 360M. It’s super-fast and works great in Porteus. Open a terminal and type:

Code: Select all

ollama run smollm2:360m
The first time, it will automatically download the model (around 240 MB) and then start a chat session. You can now close that terminal window.


Step 2: Create the Local Python Server

Next, you need to create a simple Python script to bridge the gap between your blog and Ollama.

Open your favorite text editor (like Leafpad or Mousepad) in a terminal.

Paste the following code. Don't worry about understanding every line for now; it just tells Python to accept incoming questions and send them to Ollama:

Code: Select all

from http.server import HTTPServer, BaseHTTPRequestHandler
import json
import urllib.request

class ChatHandler(BaseHTTPRequestHandler):
    def do_OPTIONS(self):
        # Permite la conexión desde el navegador
        self.send_response(200)
        self.send_header('Access-Control-Allow-Origin', '*')
        self.send_header('Access-Control-Allow-Headers', 'Content-Type')
        self.end_headers()

    def do_POST(self):
        length = int(self.headers['Content-Length'])
        body = json.loads(self.rfile.read(length))
        
        # Consulta directa a Ollama
        ollama_req = urllib.request.Request(
            'http://localhost:11434/api/generate',
            data=json.dumps({"model": "smollm2:360m", "prompt": body['prompt'], "stream": False}).encode(),
            headers={'Content-Type': 'application/json'}
        )
        
        with urllib.request.urlopen(ollama_req) as res:
            ollama_res = json.loads(res.read().decode())
        
        # Respuesta al navegador
        self.send_response(200)
        self.send_header('Access-Control-Allow-Origin', '*')
        self.send_header('Content-Type', 'application/json')
        self.end_headers()
        self.wfile.write(json.dumps({"text": ollama_res.get('response', '')}).encode())

print("Servidor activo en http://localhost:5000")
HTTPServer(('0.0.0.0', 5000), ChatHandler).serve_forever()

Save this file as server.py in a new folder (e.g., ~/ai_bot/). (home/guest) for testing

To start the server, open a terminal in that same folder and run:

Code: Select all

python3 server.py

Step 3: Add the Bot Widget to Your Blog

Now, you just need to add the chatbot's interface to your website.

Log in to your Blogger dashboard and go to Theme (or Plantilla).

Click on Edit HTML.

Add the following HTML/JavaScript code wherever you want the chatbot to appear (a good place is usually near the top of the <body> tag):

Code: Select all

<div style="font-family: sans-serif; max-width: 280px; padding: 10px; border: 1px solid #ccc;">
  <div id="log" style="height: 100px; overflow-y: auto; font-size: 13px; margin-bottom: 8px;"></div>
  <input type="text" id="msg" style="width: 65%;" placeholder="Escribí un mensaje..." />
  <button onclick="bot()">Enviar</button>
</div>

<script>
async function bot() {
  let txt = document.getElementById('msg').value;
  let log = document.getElementById('log');
  if (!txt) return;

  log.innerHTML += `<div><b>Vos:</b> ${txt}</div>`;
  document.getElementById('msg').value = '';

  try {
    let res = await fetch('http://localhost:5000', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ prompt: txt })
    });
    let data = await res.json();
    log.innerHTML += `<div style="color: blue;"><b>Bot:</b> ${data.text}</div>`;
  } catch (e) {
    log.innerHTML += `<div style="color: red;">Error de conexión.</div>`;
  }
}
</script>
Click Save.

Testing It Out

Open your blog in the same notebook that’s running the server.py and Ollama. You should now see the "Asistente IA" widget. Ask a simple question and you should get a direct response in English or Spanish!

Image

User avatar
Andrew0604
Black ninja
Black ninja
Posts: 35
Joined: 27 Oct 2025, 01:00
Distribution: Porteus 5.1 Es
Location: Argentina
Contact:

[How-To] Installing and Running Local AI (Ollama) on Porteus 5.01 LXDE (Low RAM)

Post#3 by Andrew0604 » 02 Sep 2026, 01:02

Hi admins and Portesusers,

I’ve been testing local LLM inference on Porteus LXDE using Ollama with Meta's Llama 3.2 1B model (~1.3 GB). It offers impressive technical accuracy while remaining very fast on low-spec hardware.

Would it be feasible to build a small, native GUI helper app (Bash + Yad/Zenity) backed by a local porteus_help.txt knowledge base, packaged as an optional .xzm module?

Key benefits for Porteus:

Instant Offline Terminal Support: Helps new users look up exact Porteus/Slackware commands (dir2xzm, activate, usm) without internet access.

Near-Zero System Overhead: Using a native Bash/Yad GUI keeps memory footprint under 10 MB, leaving RAM free for the model.

No Hallucinations: Injecting local documentation as context ensures accurate syntax instead of guessed commands.

Showcase for Modular Efficiency: Demonstrates how Porteus handles modern offline AI tools seamlessly.

What do you think about this proof-of-concept? B)

Post Reply