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!)
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
Required Components
- Raspberry Pi 4 Model B (4GB)
- MicroSD Card (16GB or 32GB recommended)
- SD Card Reader (for flashing OS)
- Heatsink (for cooling the Raspberry Pi)
- 16x2 LCD Display (I2C preferred)
- 4 × Female-to-Female Jumper Wires
Software & Tools
- Raspberry Pi OS
- Docker
- Ollama (for running local AI models)
- Open WebUI (web interface for chatting)
Optional but Recommended
- Wi-Fi Connection
- Laptop/PC for setup (SSH recommended)
- Heatsink or Cooling Fan (for better performance)
Flash Raspberry Pi OS to the SD Card
1. Insert the SD Card
- Insert your microSD card into the SD card reader
- Plug it into your computer/laptop
2. Download Raspberry Pi Imager
Download the official tool from:
Install and open the application on your PC.
3. Select Device, OS, and Storage
Inside the Imager:
- Choose Device: Raspberry Pi 4
- Choose OS: Raspberry Pi OS lite (64-bit)
- Choose Storage: Select your SD card
4. Configure Settings (Important)
Click on the gear icon ⚙️ (Advanced Options) and set:
- Hostname: pi
- Enable SSH: ✔️ (Use password authentication)
- Username & Password: (set your own login details)
- Wi-Fi Setup:Enter SSID (Wi-Fi name)
- Enter Password
- Set correct country
- Localization:Timezone
- Keyboard layout
💡 This allows a completely headless setup (no monitor needed)
5. Write the OS to SD Card
- Click Next → Write
- The tool will:
- Download the OS
- Flash it to the SD card automatically
⚠️ Make sure your laptop is connected to the internet.
Step Complete
Your SD card is now:
- Bootable
- Pre-configured with Wi-Fi
- Ready for SSH access
Boot Raspberry Pi & Connect Via SSH
1. Power On the Raspberry Pi
- Insert the SD card into your Raspberry Pi
- Plug in the power supply
- Wait about 1–2 minutes for it to boot and connect to Wi-Fi
2. Open Command Prompt (CMD)
On your laptop/PC:
- Press Win + R → type cmd → press Enter
🌐 3. Connect via SSH
Type the following command:
👉 Format:
In your case:
- Hostname = pi
- So command = ssh pi@pi.local
Make sure that you are connected with the same wifi as pi do.
🔐 4. Enter Password
- It will ask for a password
- 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:
🎉 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:
🐳 2. Install Docker
Docker will be used to run the web interface.
After installation, add your user to Docker group:
Then reboot:
👉 After reboot, reconnect using SSH again.
🤖 3. Install Ollama
Ollama is used to run local AI models:
🧠 4. Download an AI Model
Install a lightweight model (best for Raspberry Pi):
💡 If your Pi is slower, use:
➕ Download More Models
To install a new model, simply run:
🔽 Examples:
👉 Each model has different:
- Speed ⚡
- Size 💾
- Intelligence 🧠
🌐 5. Install Open WebUI
This provides a browser-based chat interface:
Now your Raspberry Pi has:
- Docker installed
- AI model ready
- Web UI running
👉 You’ll soon be able to access your AI at:
Create the LCD Display Script
🔌 1. Enable I2C on Raspberry Pi
Run:
Go to:
Interface Options → I2C → Enable → Yes
Then reboot:
Reconnect via SSH after reboot.
📦 2. Install LCD Libraries
Install required packages:
📝 3. Create the Script File
Create a Python file:
💻 4. Paste This Code
💾 5. Save the File
- Press CTRL + O → Enter
- Press CTRL + X
Connect the 16x2 LCD to Raspberry Pi
🧷 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
- Do NOT swap VCC and GND (can damage the LCD)
- Use I2C version of LCD (with backpack module)
- If screen is blank, adjust the small contrast potentiometer on the back
🧪 Test I2C Connection
After connecting, run this command:
You should see an address like:
- 0x27 or 0x3f
👉 This confirms your LCD is properly connected
Test the Script and LCD
Run:
If everything is correct:
- LCD will show boot messages
- Then display your Raspberry Pi IP 🎉
Run the LCD Script Automatically on Boot
📝 1. Open Crontab
In your SSH terminal, type:
If prompted, select:
- 1 (Nano editor)
➕ 2. Add Auto-Start Command
Scroll to the bottom and add this line:
💾 3. Save and Exit
- Press CTRL + O → Enter (to save)
- Press CTRL + X (to exit)
🔁 4. Reboot to Test
Run:
🎉 What Happens Now
After reboot:
- Raspberry Pi powers on
- LCD shows:
- Boot message
- Wi-Fi status
- Loading timer
- Finally → shows IP address
👉 You can open:
to access your AI server 🎯
Prepare the Server Enclosure & Cooling
✂️ 1. Prepare the Acrylic Base
- I laser cut two rectangular acrylic sheets:
- Size: 15.5 cm × 10 cm
- 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
- Peel off the adhesive backing from the heatsinks
- Place them on:
- CPU (main chip)
- RAM
- USB controller
👉 This helps keep the Pi cool while running AI models.
🔩 3. Mount the Raspberry Pi
- Place the Raspberry Pi on the bottom acrylic sheet
- Align the mounting holes
- Use M3 screws and spacers (standoffs) to secure it
🧰 4. Assemble the Enclosure
- Place the second acrylic sheet on top
- Fix it using screws (with spacers for height)
Make sure:
- Ports (USB, HDMI, power) are accessible
- Enough space is left for airflow and wiring
⚠️ Tips
- Don’t overtighten screws
- Keep space for LCD wires
- Ensure nothing touches the GPIO pins
Boot Up and Use Your Offline AI
🔌 Power On the Raspberry Pi
Now that everything is assembled:
- Plug in the power supply
- The Raspberry Pi will start automatically
The LCD screen will guide you through:
- Booting process
- Wi-Fi connection
- 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:
- Open a web browser
- Enter:
example : http://192.168.4.1:3000
💬 Start Chatting
You’ll now see the interface powered by Open WebUI running local models via Ollama.
- Create an account (first time only)
- Select your model
- Start chatting instantly 🎉
⚡ What You Built
You now have:
- A plug-and-play AI server
- Fully offline chatbot
- LCD-based status system
- 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.