Modern WiFi configuration tool for Raspberry Pi.
Remotely manage IoT projects without physical access to the device.
Works with Bookworm using NetworkManager.
Tested on Raspberry Pi: 2B, Zero W, Zero 2 W, 4 and 5.
- Web Interface for simple management
- API for programmatic access
- Supports automatically managing offline devices
A web service that allows you to configure the WiFi settings of your Raspberry Pi.
- Connect to the same network as your device running PiFi
- Navigate directly to
http://<device-ip>:8088
You can interact with PiFi programmatically using its API.
- Use HTTP requests to get and set WiFi configurations
- Returns JSON format for easy integration
| Method | Endpoint | Description | Request Body |
|---|---|---|---|
GET |
/api/status |
Get current network status | - |
POST |
/api/mode |
Set WiFi mode (client/ap) | {"mode": "client"} |
GET |
/api/networks/available |
List nearby WiFi networks | - |
GET |
/api/networks/configured |
List saved connections | - |
POST |
/api/networks/modify |
Add/modify network | {"ssid": "MyWiFi", "password": "secret", "autoConnect": true} |
DELETE |
/api/networks/remove |
Remove saved network | {"ssid": "MyWiFi"} |
POST |
/api/networks/autoconnect |
Set auto-connect | {"ssid": "MyWiFi", "autoConnect": true} |
POST |
/api/networks/connect |
Connect to network | {"ssid": "MyWiFi"} |
Run PiFi as a systemd service for automatic network management on boot.
When configured as a service, PiFi automatically enables access point mode if no network connection is detected:
- Connect to the
PiFi-AP-<1234>access point - Navigate to
http://10.42.0.1:8088 - Select your WiFi network and connect
Create the service file:
sudo nano /etc/systemd/system/pifi.serviceAdd the following configuration (update paths to match your installation):
[Unit]
Description=PiFi Service
After=network.target
[Service]
ExecStart=/usr/local/bin/pifi
Environment="PATH=/usr/bin:/usr/sbin"
WorkingDirectory=/usr/local/bin
User=root
Restart=always
[Install]
WantedBy=multi-user.targetAfter modifying the service file, reload and restart:
sudo systemctl daemon-reload
sudo systemctl restart pifi.serviceEnable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable pifi.service
sudo systemctl start pifi.service
sudo systemctl status pifi.servicePiFi supports the following command-line flags:
| Flag | Default | Description |
|---|---|---|
-auto |
true |
Enable automatic AP mode when no internet connection is detected |
-timeout |
30 |
Seconds to wait offline before enabling AP mode |