wifi-connect custom UI for Raspberry Pi

Hey all,
I ran into this project to setup a simple way to move a pi to a new location and connect to a nearby wifi network. It works great and it’s super simple to install! i ran the script

bash <(curl -L https://github.com/balena-io/wifi-connect/raw/master/scripts/raspbian-install.sh)

and it all works. I wanted to change the SSID, so i entered " sudo wifi-connect --portal-ssid MY_WIFI" and it comes up once, but the next time i run it, it goes back to the default ssid. Is there a way to change it permanently?

I’m also looking to change the UI. I saw the instructions to run “npm install” in the UI folder… but i can’t find a UI folder anywhere on my pi. Is there something i’m missing there?
Is there a way for this to start automatically if no known wifi network has been found? I saw the start.sh file in the scripts folder but not sure how to deploy that.


According to the docs (and sources) on github, all command line arguments have an environment variable with the same function.

sorry for my lack of knowledge here, but is there no config file that i can edit instead?
I tried “sudo wifi-connect --portal-ssid MYSSID” but that just starts wifi-connect with that ssid once. the next time it runs, the SSID is then “Wifi Connect”.
Thanks for the reply!


As far as I can tell, there is no config file for Wifi Connect.

You could however modify the environment variables in your system.
Where you would add this, depends mostly on how you intend to run wifi-connect.

If you intend to run it by hand from a bash shell, you could add export PORTAL_SSID="MY_WIFI" to your .bashrc file.
This will expose that variable to everything running in that shell session, including wifi-connect.

If you intend to run it as a systemd service (so it automatically starts up on boot for example), you could make a service file like

Description=Run a captive portal for wifi configuration

User=<some user>
ExecStart=<path to wifi connect>/wifi-connect