On my Archlinux I'm currently connecting to the internet via WiFi using iwctl. Everytime I boot, I run iwctl and then station wlan0 connect WIFINAME.

How can I have the connection happen automatically?

This answer suggests to create a systemd service which basically runs the command I wrote above. (It also runs dhclient, but I have to look up what it does.)

However the Archlinux wikipage on iwd reads

iwd automatically stores network passphrases in the /var/lib/iwd directory and uses them to auto-connect in the future. See #Network configuration.

which seems to mean that the auto-connection feature should be automatic. However it isn't for me.

  • What might be preventing the autoconnection to work?
  • Is setting a systemd service the only way to get it working?

1 Answer 1


I found some help on ArchLinux' IRC channel, and I'm sharing it in this self answer.

To make iwd automatically connect to WiFis, is enough to have


in the /etc/iwd/main.conf file, as long as the config file specific to the WiFi we want to automatically connect to, e.g. /var/lib/iwd/whatever.psk, doesn't override that with AutoConnect=false.

The AutoConnect=true setting should be the default; I don't know why, but it was not the case for me, as all /var/lib/iwd/*.psk files had AutoConnect=false in them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .