Celeste AI Agent: Webserver, USB Drive & SMB Sharing Setup
Update: After a solid 4 hours of configuration today, Celeste's Raspberry Pi infrastructure is now fully operational with webserver-accessible storage and seamless file sharing across the local network. All components tested and working.
The Setup: What We Built Today
Celeste runs on a Raspberry Pi 4 (8GB RAM, Debian Bookworm) as the brain of a self-hosted AI agent ecosystem. Today's mission was to bridge storage and network access — enabling the Pi's USB external drives to be served via a local webserver and shared to our main desktop using SMB (Server Message Block). The result: centralized file access from anywhere on the network, with Celeste orchestrating the data flow.
Celeste infrastructure: USB storage, webserver, and SMB network bridges
Hardware & Current State
| Component | Specification |
|---|---|
| Board | Raspberry Pi 4 Model B Rev 1.5 |
| RAM | 8GB |
| OS | Debian Bookworm 64-bit (Linux 6.1.21) |
| Primary Storage | 32GB microSD (upgrading to 512GB A2) |
| External Drive 1 | 58GB USB (sethdisk1 — npm global, dev files) |
| External Drive 2 | 3.7TB USB (sethstudio2 — media, backups) |
| Webserver | Apache2 with PHP (LAMP stack) |
| File Sharing | Samba (SMB/CIFS) |
| OpenClaw | v2026.4.10 (177+ skills) |
| AI Backend | Kimi K2.5 (Moonshot AI) primary, Ollama fallback |
Part 1: Webserver Storage Access
Why This Matters
Before today, the USB drives were accessible only via SSH or physical file system access. Now they're served via HTTP — Celeste can fetch files, generate content, and make them immediately available to web clients. This is essential for the AI agent's workflow: read source files → process → output to web-accessible directory → client retrieves.
The Problem We Solved
External USB drives are fast for storage but isolated from network services. The webserver didn't know they existed. Solution: mount the drives in Apache's document root and configure permissions.
Configuration Steps
1. Create mount points for both USB drives:
sudo mkdir -p /var/www/html/storage/sethdisk1
sudo mkdir -p /var/www/html/storage/sethstudio2
2. Mount the USB drives (use your actual device names):
sudo mount /dev/sda1 /var/www/html/storage/sethdisk1
sudo mount /dev/sdb1 /var/www/html/storage/sethstudio2
3. Make mounts permanent in /etc/fstab:
/dev/sda1 /var/www/html/storage/sethdisk1 ext4 defaults,nofail 0 0
/dev/sdb1 /var/www/html/storage/sethstudio2 ext4 defaults,nofail 0 0
4. Fix permissions so Apache can read the drives:
sudo chown -R www-data:www-data /var/www/html/storage
sudo chmod -R 755 /var/www/html/storage
5. Restart Apache to pick up the new directories:
sudo systemctl restart apache2
Verification
Test it from the Pi or your desktop browser:
curl http://192.168.1.xxx/storage/sethdisk1/
curl http://192.168.1.xxx/storage/sethstudio2/
You should see directory listings or file downloads depending on your Apache config. Success: The USB drives are now web-accessible.
HTTP requests flowing from clients to mounted USB storage via Apache
Part 2: SMB Network Share Setup
Why This Matters
The webserver makes files accessible via HTTP URLs, but for daily workflow, SMB (Samba) lets your desktop see the Pi's drives as a network folder — you can drag-and-drop, edit files directly, and manage them just like local storage. This is the bridge between Celeste's processing and your main machine.
SMB vs HTTP: HTTP = read-only public access. SMB = read-write network shares with authentication. For production Celeste, you want both: HTTP for web clients and Celeste's own workflows, SMB for you to manage files locally.
Install Samba
sudo apt update
sudo apt install samba samba-common-bin -y
Configure Samba for the Storage Directories
Edit /etc/samba/smb.conf and add this at the end:
[sethdisk1]
comment = Celeste Dev Storage (sethdisk1)
path = /var/www/html/storage/sethdisk1
browseable = yes
read only = no
guest ok = no
valid users = @sambagroup
create mask = 0755
directory mask = 0755
[sethstudio2]
comment = Celeste Media & Backups (sethstudio2)
path = /var/www/html/storage/sethstudio2
browseable = yes
read only = no
guest ok = no
valid users = @sambagroup
create mask = 0755
directory mask = 0755
Set Up SMB User & Permissions
1. Create a Samba user (or use existing Linux user):
sudo smbpasswd -a username
2. Create a group and assign permissions:
sudo groupadd sambagroup
sudo usermod -a -G sambagroup username
sudo chown -R :sambagroup /var/www/html/storage
sudo chmod -R g+rw /var/www/html/storage
Restart Samba
sudo systemctl restart smbd
sudo systemctl restart nmbd
Connect from Your Desktop
Windows: File Explorer → Map Network Drive → \\192.168.1.xxx\sethdisk1
Mac: Finder → Go → Connect to Server → smb://192.168.1.xxx/sethdisk1
Linux:
sudo mount -t cifs //192.168.1.xxx/sethdisk1 /mnt/celeste-disk1 \
-o username=your_samba_user,password=your_password,uid=1000,gid=1000
SMB protocol bridges desktop and Pi for seamless file sharing
Part 3: Integration with Celeste
How Celeste Uses This Setup
The OpenClaw agent (Celeste) now has access to:
- Web-accessible output directory — Skills can write processed files to
/var/www/html/storageand generate shareable URLs for downloads or web previews. - SMB input source — You can drop files into the shared folders from your desktop, and Celeste can monitor and process them automatically.
- Centralized file log — All Celeste's operations (transcripts, generated media, analysis) are stored in a central location accessible from anywhere on the network.
Example Celeste Workflow
User (Discord): "Analyze the video in /storage/sethstudio2/video.mp4"
Celeste:
1. Detects the file via SMB mount on Pi
2. Calls Whisper skill to transcribe audio
3. Calls Claude skill to summarize transcript
4. Writes results to /var/www/html/storage/outputs/
5. Returns HTTP URL to user: http://192.168.1.xxx/storage/outputs/analysis.txt
Security Note
This setup is for a local, trusted network (your home/office). The SMB shares require authentication, but passwords travel in plaintext over the network without additional encryption. For internet-facing deployments, add a VPN layer or use SMB3 with encryption (requires more complex config).
Testing & Verification
Quick Checklist
✓ Webserver: curl http://192.168.1.xxx/storage/ shows directory listing
✓ SMB Browse: Network folder visible on desktop
✓ Read/Write: Can create files via SMB and see them on Pi
✓ Permissions: www-data user can write to storage (for Celeste skills)
✓ Mounts Persistent: Reboot the Pi and drives are still mounted
Architecture Overview
🍓 Pi Storage Layer
USB Drives: 58GB + 3.7TB physical storage
Mount: /var/www/html/storage/
Access: Apache webserver + Samba shares
🤖 Celeste Processing
OpenClaw: 177+ skills orchestrating tasks
I/O: Reads from storage, writes results back
Output: HTTP URLs for web clients
💻 Desktop Access
SMB Mounts: Network drives appear as local folders
Workflow: Drop files, Celeste processes, retrieve results
Real-time: See changes instantly across the network
🌐 Web Clients
HTTP Access: Fetch files via URLs
Public/Private: Configure Apache for both
Scalable: Celeste can serve files to apps, bots, services
Gotchas & Solutions
Mount Points Disappear After Reboot
Fix: Make sure both drives are in /etc/fstab with nofail option. Use UUIDs instead of device names for reliability.
Permission Denied Writing to Shares
Fix: Verify that www-data user and your Samba user are both in the group with write permissions: sudo chown -R :sambagroup /var/www/html/storage && sudo chmod -R g+w /var/www/html/storage
SMB Connection Drops
Fix: Add to /etc/samba/smb.conf in the [global] section: socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
USB Drive Not Recognized After Disconnection
Fix: Use nofail in fstab to prevent boot failures, and manually remount: sudo mount -a
Next-gen roadmap: Synergy, Aaron VPS agent, expanded cloud integration
Key Learnings
1. Storage is Upstream: Before spinning up complex agent workflows, nail the data pipeline. Today's 4-hour session paid for itself by eliminating future file access headaches.
2. Permissions Matter: Linux ownership and group permissions are non-negotiable. www-data, sambagroup, and your user all need clear boundaries.
3. Persistent Mounts: USB drives are convenient but fragile. Use /etc/fstab + UUIDs + nofail or face boot failures.
4. Bridging Layers: The webserver layer (HTTP) and file sharing layer (SMB) serve different audiences — Celeste, web clients, and humans. Design for all three.
Command Reference
sudo lsblk # List all block devices to find USB drives
sudo blkid # Show UUID of each drive
sudo mount /dev/sdX1 /mnt/point # Mount a drive
sudo umount /mnt/point # Unmount a drive
sudo mount -a # Re-mount all fstab entries
sudo chown -R user:group /path # Change ownership recursively
sudo systemctl restart apache2 # Restart webserver
sudo systemctl restart smbd # Restart Samba daemon
sudo smbclient -L \\\\192.168.1.xxx # List Samba shares from Linux
mount.cifs # Check if CIFS support is installed
📌 Important
All IP addresses in this guide (192.168.1.xxx) are placeholders. Replace with your actual Pi's IP address on your local network. Find it with hostname -I on the Pi.