I need to install the raspberry pi at a customer location and then make the pi connect to the customer's wifi. Is there a convenient way to do this without needing a monitor, keyboard and mouse attached to the raspberry pi? Edit: I am using Pi 4 and the latest Raspberry Pi OS Full (64 Bit, Debian Bookworm). I also don't have wired (ethernet) access to the router. Ideally, I would like to provide the customer with the ability to enter the wifi credentials themselves when connecting the pi to the wifi

  • This is Pi 4 and the latest Raspberry Pi OS Full (64 Bit, Debian Bookworm). All I need is to connect the pi to the internet to set it up.
    – RSK
    Jan 17 at 7:10
  • Is this a wired connection or WiFi? If wired then you don't need to do anything except plug it in. If WiFi you need the ssid and password which can be pre-defined on the Raspberry and it should just connect. To let the customer enter their own ssid and password you'll need to write a program that collects those and stores them in /etc/NetworkManager/system-connections (in an .nmconnection file). That could be done with a bash script that runs nmcli.
    – Dougie
    Jan 18 at 0:36
  • @Dougie I found this - github.com/balena-os/wifi-connect. But I couldn't get this to install. The script they have provided errors out as mentioned in this issue - github.com/balena-os/wifi-connect/issues/411. Do you know any solution similar to this?
    – RSK
    Feb 23 at 11:31

1 Answer 1


There are many ways of doing this (depending on who is doing it and what equipment they have).

See How do I set up networking on Raspberry Pi OS - Bookworm for general pointers.

If I were doing this I would enable ssh then connect the Pi Ethernet to a router or laptop. (This is how I setup a new Pi.)
You can then setup using nmcli:-

nmcli dev wifi list will scan for wireless networks.
sudo nmcli --ask dev wifi connect ssid will connect to a network.

  • thanks! Is it possible to do this using GUI? We want this process to be as simple as possible since the pi might get disconnected from the wifi in the future when we are not around. In such a situation, we would like the clients to themselves reconnect the pi to the wifi.
    – RSK
    Feb 23 at 11:38
  • @RSK did you read the linked post? It explains all the options.
    – Milliways
    Feb 23 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.