A simple template for hosting websites locally on Raspberry Pi, accessible from other devices on your network.
- Plain HTML/CSS website
- Vite development server
- Network-accessible configuration
- Lightweight and fast
git clone https://github.com/pilot2254/raspi-web.git
cd raspi-web
npm install
npm run dev
- Find your Pi's IP:
hostname -I
- Access from any device:
http://[PI_IP_ADDRESS]:5173
The template is pre-configured to accept connections from all network interfaces:
- Development:
npm run dev
(port 5173) - Production preview:
npm run preview
(port 4173) - Build:
npm run build
The vite.config.js
and package.json
are configured with:
host: '0.0.0.0'
- Binds to all network interfaces- Default ports: 5173 (dev), 4173 (preview)
- Edit
index.html
for your content - Modify
style.css
for styling - Add assets to the project root
- Update
package.json
name and details
For production use:
npm run build
npm run preview
Or serve the dist
folder with any static file server.
- Node.js 16+
- Raspberry Pi with network connection
- Devices on same network for access
MIT License - see LICENSE file for details.
Enjoy!