PiNEXUS : Turn Your Raspberry Pi Into a Plug-and-Play AI Machine (No Internet Needed!)

by SUCHIR2004 in Circuits > Raspberry Pi

722 Views, 9 Favorites, 0 Comments

PiNEXUS : Turn Your Raspberry Pi Into a Plug-and-Play AI Machine (No Internet Needed!)

OFFLINE PI LLMS.png
WhatsApp Image 2026-04-27 at 11.11.46 PM.jpeg
Screenshot 2026-04-27 234346.png

Imagine having your own private AI assistant running at home — no internet, no subscriptions, and no powerful computer required. Just plug in a Raspberry Pi, wait a minute, and start chatting.

In this project, I built a fully autonomous, plug-and-play AI server using a Raspberry Pi that runs local language models using Ollama and provides a clean chat interface through Open WebUI. What makes this build unique is that it works completely headless — no monitor or keyboard needed.

A 16x2 LCD screen displays the system status during boot and automatically shows the device’s IP address once it’s ready. Simply type that IP into your phone or laptop browser, and you instantly get access to your own offline AI chatbot.

This project is designed to be simple, portable, and reliable — perfect for learning about local AI, self-hosted systems, or building your own smart home assistant. Whether you're a beginner or an advanced maker, this setup shows how powerful a small device like a Raspberry Pi can be.

Let’s build your own plug-and-play AI machine 🚀

Supplies

WhatsApp Image 2026-04-27 at 11.10.20 PM.jpeg
WhatsApp Image 2026-04-27 at 11.10.20 PM (1).jpeg
WhatsApp Image 2026-04-27 at 11.10.21 PM.jpeg
WhatsApp Image 2026-04-27 at 11.10.22 PM.jpeg
WhatsApp Image 2026-04-27 at 11.10.30 PM.jpeg

Required Components

  1. Raspberry Pi 4 Model B (4GB)
  2. MicroSD Card (16GB or 32GB recommended)
  3. SD Card Reader (for flashing OS)
  4. Heatsink (for cooling the Raspberry Pi)
  5. 16x2 LCD Display (I2C preferred)
  6. 4 × Female-to-Female Jumper Wires

Software & Tools

  1. Raspberry Pi OS
  2. Docker
  3. Ollama (for running local AI models)
  4. Open WebUI (web interface for chatting)

Optional but Recommended

  1. Wi-Fi Connection
  2. Laptop/PC for setup (SSH recommended)
  3. Heatsink or Cooling Fan (for better performance)

Flash Raspberry Pi OS to the SD Card

Video Project 3.gif
Video Project 3 1.gif
Screenshot 2026-04-28 004611.png
Screenshot 2026-04-28 004629.png
Screenshot 2026-04-28 004646.png
Screenshot 2026-04-28 004703.png
Screenshot 2026-04-28 004740.png
Screenshot 2026-04-28 004805.png
Screenshot 2026-04-28 004824.png
Video Project 3 1 1.gif

1. Insert the SD Card

  1. Insert your microSD card into the SD card reader
  2. Plug it into your computer/laptop

2. Download Raspberry Pi Imager

Download the official tool from:

👉 Raspberry Pi Imager

Install and open the application on your PC.

3. Select Device, OS, and Storage

Inside the Imager:

  1. Choose Device: Raspberry Pi 4
  2. Choose OS: Raspberry Pi OS lite (64-bit)
  3. Choose Storage: Select your SD card

4. Configure Settings (Important)

Click on the gear icon ⚙️ (Advanced Options) and set:

  1. Hostname: pi
  2. Enable SSH: ✔️ (Use password authentication)
  3. Username & Password: (set your own login details)
  4. Wi-Fi Setup:Enter SSID (Wi-Fi name)
  5. Enter Password
  6. Set correct country
  7. Localization:Timezone
  8. Keyboard layout

💡 This allows a completely headless setup (no monitor needed)

5. Write the OS to SD Card

  1. Click Next → Write
  2. The tool will:
  3. Download the OS
  4. Flash it to the SD card automatically

⚠️ Make sure your laptop is connected to the internet.

Step Complete

Your SD card is now:

  1. Bootable
  2. Pre-configured with Wi-Fi
  3. Ready for SSH access

Boot Raspberry Pi & Connect Via SSH

Video Project 3 1 1 1.gif

1. Power On the Raspberry Pi

  1. Insert the SD card into your Raspberry Pi
  2. Plug in the power supply
  3. Wait about 1–2 minutes for it to boot and connect to Wi-Fi

2. Open Command Prompt (CMD)

On your laptop/PC:

  1. Press Win + R → type cmd → press Enter

🌐 3. Connect via SSH

Type the following command:


ssh pi@pi.local

👉 Format:


ssh <hostname>@<hostname>.local

In your case:

  1. Hostname = pi
  2. So command = ssh pi@pi.local

Make sure that you are connected with the same wifi as pi do.

🔐 4. Enter Password

  1. It will ask for a password
  2. Enter the password you set during setup

⚠️ You won’t see characters while typing — this is normal.

✅ Step Complete

If successful, you’ll see a terminal like:


pi@pi:~ $

🎉 You are now connected to your Raspberry Pi remotely!

Install Required Software on Raspberry Pi (via SSH)

🔄 1. Update the System

First, make sure everything is up to date:


sudo apt update && sudo apt upgrade -y

🐳 2. Install Docker

Docker will be used to run the web interface.


curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

After installation, add your user to Docker group:


sudo usermod -aG docker $USER

Then reboot:


sudo reboot

👉 After reboot, reconnect using SSH again.

🤖 3. Install Ollama

Ollama is used to run local AI models:


curl -fsSL https://ollama.com/install.sh | sh

🧠 4. Download an AI Model

Install a lightweight model (best for Raspberry Pi):


ollama pull llama3.2:1b

💡 If your Pi is slower, use:


ollama pull qwen2.5:0.5b

➕ Download More Models

To install a new model, simply run:


ollama pull <model-name>

🔽 Examples:


ollama pull llama3.2:1b
ollama pull qwen2.5:0.5b
ollama pull mistral

👉 Each model has different:

  1. Speed ⚡
  2. Size 💾
  3. Intelligence 🧠

🌐 5. Install Open WebUI

This provides a browser-based chat interface:


sudo docker run -d -p 3000:8080 \
--add-host=host.docker.internal:host-gateway \
-v open-webui:/app/backend/data \
--name open-webui \
--restart always ghcr.io/open-webui/open-webui:main

Now your Raspberry Pi has:

  1. Docker installed
  2. AI model ready
  3. Web UI running

👉 You’ll soon be able to access your AI at:

http://<your-pi-ip>:3000

Create the LCD Display Script

WhatsApp Image 2026-04-27 at 11.10.22 PM.jpeg

🔌 1. Enable I2C on Raspberry Pi

Run:


sudo raspi-config

Go to:

Interface Options → I2C → Enable → Yes

Then reboot:


sudo reboot

Reconnect via SSH after reboot.

📦 2. Install LCD Libraries

Install required packages:


sudo apt install -y python3-pip i2c-tools
sudo pip3 install RPLCD smbus2 --break-system-packages

📝 3. Create the Script File

Create a Python file:


nano /home/pi/display_ip.py

💻 4. Paste This Code


import time
import subprocess
from RPLCD.i2c import CharLCD

# Initialize LCD (try common I2C addresses)
try:
lcd = CharLCD(i2c_expander='PCF8574', address=0x27, port=1,
cols=16, rows=2, dotsize=8)
except:
try:
lcd = CharLCD(i2c_expander='PCF8574', address=0x3f, port=1,
cols=16, rows=2, dotsize=8)
except:
print("LCD not found. Check wiring!")
exit()

# --- PHASE 1: Booting ---
lcd.clear()
lcd.cursor_pos = (0, 0)
lcd.write_string('Booting up...'.center(16))
time.sleep(5)

# --- PHASE 2: WiFi ---
lcd.clear()
lcd.cursor_pos = (0, 0)
lcd.write_string('Connecting WiFi'.center(16))
lcd.cursor_pos = (1, 0)
lcd.write_string('Please wait...'.center(16))
time.sleep(3)

# --- PHASE 3: Loading AI ---
lcd.clear()
lcd.cursor_pos = (0, 0)
lcd.write_string('Preparing AI...')

for i in range(60, 0, -1):
lcd.cursor_pos = (1, 0)
lcd.write_string(f'Wait: {i}s'.ljust(16))
time.sleep(1)

# --- PHASE 4: Show IP ---
lcd.clear()

while True:
try:
IP = subprocess.check_output(
"hostname -I | cut -d' ' -f1", shell=True
).decode("utf-8").strip()

if not IP:
IP = "No WiFi"
except:
IP = "Error"

lcd.cursor_pos = (0, 0)
lcd.write_string('Server IP:'.center(16))
lcd.cursor_pos = (1, 0)
lcd.write_string(IP.center(16))

time.sleep(5)

💾 5. Save the File

  1. Press CTRL + O → Enter
  2. Press CTRL + X


Connect the 16x2 LCD to Raspberry Pi

WhatsApp Image 2026-04-27 at 11.10.22 PM.jpeg
WhatsApp Image 2026-04-27 at 11.10.31 PM.jpeg
Video Project 3 1 1 1 1.gif

🧷 LCD Pin → Raspberry Pi Pin

LCD SDA - GPIO 2 (SDA)

LCD SCL - GPIO 3 (SCL)

LCD VCC - 5V + (Pin number 02)

LCD GND - GND - (Pin number 06)

⚠️ Important Notes

  1. Do NOT swap VCC and GND (can damage the LCD)
  2. Use I2C version of LCD (with backpack module)
  3. If screen is blank, adjust the small contrast potentiometer on the back

🧪 Test I2C Connection

After connecting, run this command:


i2cdetect -y 1

You should see an address like:

  1. 0x27 or 0x3f

👉 This confirms your LCD is properly connected

Test the Script and LCD

Run:


python3 /home/pi/display_ip.py

If everything is correct:

  1. LCD will show boot messages
  2. Then display your Raspberry Pi IP 🎉


Run the LCD Script Automatically on Boot

📝 1. Open Crontab

In your SSH terminal, type:


crontab -e

If prompted, select:

  1. 1 (Nano editor)

➕ 2. Add Auto-Start Command

Scroll to the bottom and add this line:


@reboot /usr/bin/python3 /home/pi/display_ip.py &

💾 3. Save and Exit

  1. Press CTRL + O → Enter (to save)
  2. Press CTRL + X (to exit)

🔁 4. Reboot to Test

Run:


sudo reboot

🎉 What Happens Now

After reboot:

  1. Raspberry Pi powers on
  2. LCD shows:
  3. Boot message
  4. Wi-Fi status
  5. Loading timer
  6. Finally → shows IP address

👉 You can open:

http://<your-ip>:3000

to access your AI server 🎯

Prepare the Server Enclosure & Cooling

Video Project 3 1 1 1 1 1.gif
Video Project 3 1 1 1 1 1 2.gif
WhatsApp Image 2026-04-27 at 11.11.03 PM.jpeg
WhatsApp Image 2026-04-27 at 11.11.46 PM.jpeg
Video Project 3 1 1 1 1 1 1.gif

✂️ 1. Prepare the Acrylic Base

  1. I laser cut two rectangular acrylic sheets:
  2. Size: 15.5 cm × 10 cm
  3. These act as the base and top cover of the enclosure

💡 You can also drill holes manually if you don’t have a laser cutter.

❄️ 2. Attach the Heatsinks

  1. Peel off the adhesive backing from the heatsinks
  2. Place them on:
  3. CPU (main chip)
  4. RAM
  5. USB controller

👉 This helps keep the Pi cool while running AI models.

🔩 3. Mount the Raspberry Pi

  1. Place the Raspberry Pi on the bottom acrylic sheet
  2. Align the mounting holes
  3. Use M3 screws and spacers (standoffs) to secure it

🧰 4. Assemble the Enclosure

  1. Place the second acrylic sheet on top
  2. Fix it using screws (with spacers for height)

Make sure:

  1. Ports (USB, HDMI, power) are accessible
  2. Enough space is left for airflow and wiring

⚠️ Tips

  1. Don’t overtighten screws
  2. Keep space for LCD wires
  3. Ensure nothing touches the GPIO pins


Boot Up and Use Your Offline AI

Video Project 3 1 1 1 1 1 1 1 1 1.gif
Video Project 3 1 1 1 1 1 1 1 1 1 1.gif
Screenshot 2026-04-27 234346.png
Screenshot 2026-04-27 234817.png
Screenshot 2026-04-27 234355.png

🔌 Power On the Raspberry Pi

Now that everything is assembled:

  1. Plug in the power supply
  2. The Raspberry Pi will start automatically

The LCD screen will guide you through:

  1. Booting process
  2. Wi-Fi connection
  3. AI loading (countdown timer)

⏳ Wait about 2 minute for everything to initialize.

📟 Get the IP Address

Once the setup is complete, the LCD will display:

Server IP: xxx.xxx.xxx.xxx

This is your access point to the chatbot.

🌐 Open the Chat Interface

On any device connected to the same Wi-Fi:

  1. Open a web browser
  2. Enter:

http://<your-pi-ip>:3000

example : http://192.168.4.1:3000

💬 Start Chatting

You’ll now see the interface powered by Open WebUI running local models via Ollama.

  1. Create an account (first time only)
  2. Select your model
  3. Start chatting instantly 🎉

⚡ What You Built

You now have:

  1. A plug-and-play AI server
  2. Fully offline chatbot
  3. LCD-based status system
  4. Accessible from any device

By building this plug-and-play AI server, you’ve created a system that is not only portable and easy to use, but also private, reliable, and independent. It gives you full control over your data and how you interact with AI.

More importantly, this project is about understanding technology instead of just using it. As AI continues to evolve, having the ability to build and control your own systems will become increasingly valuable.