How to create a wifi hotspot on Debian 12 "Bookworm"

Endrit Qerreti

Endrit Qerreti

In this tutorial, you will learn how to know if your wifi card or usb dongle supports the ap mode, which allows you to create a hotspot connection, and if yes you will also learn how to create one very easily by following the steps below.

Step 1 - Check Wifi hardware support

Before we start with the tutorial, you need to check if your wifi card or wifi usb that you want to use to share the internet via a hotspot supports access point mode.  

💡
One of these usb wifi dongles does the job perfectly if you don't have a device that supports ap mode. The wifi adapter below supports linux kernel +6.2 and also ap mode.

Wifi dongle

ap mode means that your wifi hardware has the ability to share internet. To check, launch terminal and run the following command

iw list

💡
Note: If you get the error: iw : command not found when running iw, it means you don't have the iw package installed on your system. To install iw simply run the command below

sudo apt install iw

Once you run the iw command, you need to look for " Supported interface modes" of the wifi device that you will be using to share the hotspot.

If your device supports ap mode, ap should be listed on the supported interface modes. If your device doesn't support ap, then ap won't be listed there.

Step 2 - Create Hotspot

To create a hotspot on Debian 12 is easy. All you have to do is to follow the steps below.

1.Right click over the network icon on the panel, and then click to "Edit connections"

2. Click the + button to create a new connection

3.Next, you need to choose the connection type.  

4.Since we are going to create a hotspot connection, you need to click on the dropdown box and choose Wifi.

5.After selecting Wi-Fi on the dropdown box, click to the Create button

6.Next, you need to fill out the wifi connection details.

Connection name - Is the name of the hotspot that will be created(This is the connection name that will appear on your computer)

SSID - Is the SSID of the hotspot that will appear on other devices

Mode - Set this option to "Hotspot"

Band - Choose which type of band you want to use. 2.4GHz is the default band, however you can also use the 5GHz frequency band if the wifi device supports it.

Device - On this option you need to choose the wifi device that you will be using to create the hotspot connection. If you are using a secondary usb wifi dongle, then make sure to select that device.

7.Next, you need to create a password for your hotspot. This the password that other devices will need to use to connect to this hotspot.

To set a password, click to "Wi-Fi Security" tab , next click to drop down box and select "WPA/WPA2/WPA3 Personal" as shown in the image below, enter the password and move to the next step

8.After setting up the password protection, now you need to configure the "IPv4 Settings", simply go to "IPv4 Settings" tab, and choose "Shared to other computers" on the drop down box.

9.Last step, choose if you want this hotspot to share limited or unlimited internet. Go to "General" tab and set yes or no on the metered connection dropdown box.

10.Now, you should be good to save the changes.

Step 3 - Connect to hotspot

The new hotspot that you created will appear on your computer's wifi devices list. However, to make sure that the hotspot is working, try to connect to it from another device, for example from your phone.

Can't connect to hotspot

If you can't connect to the new wifi hotspot, check if the device that you are trying to connect to the hotspot, supports the frequency band you chose. Change the frequency band to automatic or simply use 2.4GHz, and see if it works.

Other things to try if you are still having issues to connect

  1. Unplug the wifi dongle and plug it again
  2. Reset the network profile if using phone
  3. Restart network manager with systemctl restart NetworkManager
  4. Restart network with systemctl restart network
  5. Re-create the hotspot again

Step 4 - Make hotspot start automatically

If you want the hotspot to start automatically once you boot your system, you can do so by using the nmcli commands.

First you need to know what is the name of the hotspot that you created, you can check the active hotspot via the command below

nmcli con show

💡
This command will list all active networks on your computer, including non hotspot connections.

For example, our wifi hotspot is called wifihotspot , to set this connection to automatically start on boot, you can do by running the command below

nmcli con mod wifihotspot connection.autoconnect yes

💡
Note: Make sure to replace wifihotspot with the name of your hotspot's connection name.

Conclusion

In this tutorial, you learned how to create a wifi hotspot on Debian 12 "Bookworm". Even though we created the wifi hotspot on Debian 12 "Bookworm", the steps of creating a wifi hotspot on other linux distros are similar, so you can follow this tutorial in that case too.