A Raspberry Pi wireless access point is a great way to extend the length of your Wi-Fi coverage and provide additional access to your network.
This tutorial will show you how to set up a Wi-Fi access point using your Raspberry Pi. A wireless access point sometimes goes by “hotspot”, but it is essentially the same thing.
The process of setting up your Pi as a Wi-Fi hotspot has been made simple thanks to the Pi’s usage of the Network Manager. Older methods used to require you to configure several pieces of software that could prove quite unstable.
One crucial thing to remember is that your Raspberry Pi’s inbuilt Wi-Fi or a Wi-Fi dongle will most likely not be able to handle as much traffic as a regular router. This means you should avoid allowing too many connections to the device to prevent it from becoming overburdened and slow.
While you can use any Wi-Fi dongle that supports being enabled as an access point, our tutorial will directly focus on how to set this up for the Raspberry Pi’s built-in Wi-Fi module. If you are using an early model of the Raspberry Pi, you can purchase a Wi-Fi adapter that supports being utilized as an access point from numerous websites. Make sure you research before buying to make sure it works on the Pi.
Additionally, the newer the Raspberry Pi, the better experience you will have with setting up an access point. Newer Pi’s have better processing power and have had improvements to how it’s networking works at a hardware level.
This tutorial can be combined well with our VPN Access Point tutorial. The VPN access point tutorial will show how to set up an OpenVPN client and redirect all traffic through that client.
Equipment List
Below are all the bits and pieces we used for this Raspberry Pi Wireless Access Point tutorial. You will not need anything super special to complete this guide.
Recommended
- Raspberry Pi ( Amazon )
- Micro SD Card ( Amazon )
- Power Supply ( Amazon )
- Wi-Fi ( Amazon )
- Ethernet Cable ( Amazon )
Optional
- Raspberry Pi Case ( Amazon )
This tutorial was last tested on a Raspberry Pi 5, running the latest version of Raspberry Pi OS Bookworm.
Setting up a Wi-Fi Access Point using your Raspberry Pi
In this section, we will walk you through the super simple method of setting up your Raspberry Pi’s Wi-Fi as an access point.
Thanks to the new versions of Raspberry Pi OS using Network Manager to manage the network stack, setting up a hotspot from your Raspberry Pi is as simple as running a couple of commands. If you are running a version of Pi OS without Network Manager, follow our instructions for installing it.
Before proceeding, you will want to have your Pi plugged into an ethernet connection. This will offer you the best performance, and we expect you to have your Pi set up this way for the following steps.
If you want to extend an existing Wi-Fi network using your Pi, we recommend checking out our Raspberry Pi Wi-Fi extender guide.
Preparing your Pi
1. Before we set up the Raspberry Pi as a Wi-Fi access point, you will want to ensure that you are running an updated operating system. This ensures that we have the latest version of Network Manager.
Use the following two commands to update the package list cache and upgrade any out-of-date packages.
sudo apt update
sudo apt upgrade -y
The first command updates the package list cache. This cache contains a list of the packages you can install, their version, and where apt can download them.
The second command uses the updated package list cache to find and update any out-of-date packages.
Getting the Wi-Fi Device to Hotspot from on your Raspberry Pi
2. With your Raspberry Pi now up to date, you will need to get the name of your Wi-Fi device so you can hotspot from it.
Your Wi-Fi adapter will need to support access point mode, which luckily for us, all the Pi’s built-in Wi-Fi supports.
Use the following command to get a list of Wi-Fi capable devices available on your Raspberry Pi. Typically, on most setups your wireless device will use the name “wlan0
“.
iwconfig
Below you can see a list of network devices this tool found on our Pi. We only have one Wi-Fi adapter available to us which is “wlan0
“. There is a chance your adapter might use a different name.
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
Configuring a Wi-Fi Access Point on your Raspberry Pi
4. Once you know the device name for your Wi-Fi adapter, we can configure your Raspberry Pi to act as a wireless access point.
Luckily, the Network Manager tool, which was discussed earlier in this guide, will handle most of the hard work.
To change your Raspberry Pi’s Wi-Fi into hotspot/access point mode, use the following command.
While typing out this command, there are a few details that you must replace with your own.
<DEVICE>
: This is the device name assigned to your Raspberry Pi’s Wi-Fi adapter. In the vast majority of cases, this should be “wlan0
“.<SSID>
: Replace this placeholder with the name you want broadcast by your access point. It is the ID that will be used by others when connecting to your hotspot.<PASSWORD>
: The last value you must replace is the password that will be used to secure your Raspberry Pi’s Wi-Fi access point.
sudo nmcli d wifi hotspot ifname <DEVICE> ssid <SSID> password <PASSWORD>
5. We can verify that the Wi-Fi hotspot has been created using the “nmcli
” tool to output all connections.
nmcli con show
Below is a list of connections that exist on our Pi. At the top, you can see that we now have a connection called “Hotspot
” with the device set to “wlan0
“.
NAME UUID TYPE DEVICE
Hotspot 59f9160c-b49f-47a2-ac54-87987f743df2 wifi wlan0
Wired connection 1 9d27eb3e-7657-3a54-ad8a-344cb4bb56e3 ethernet eth0
lo a54edcc4-0ffa-4090-a2b3-081905aee1c5 loopback lo
preconfigured 6e07c33c-9764-4145-af3f-49875c8a9342 wifi --
6. Another cool feature of the Network Manager tool is that it can generate QR codes that you can use to access your Wi-Fi hotspot easily.
All you need to do to get the “nmcli
” tool to generate this code is to use the following command.
nmcli dev wifi show-password
Troubleshooting your Wireless Access Point
7. You should now have a Wi-Fi hotspot broadcasting from your Raspberry Pi. Hopefully, everything is working correctly, but you should test the internet connection before proceeding.
If you need help connecting to this access point, move on to the next section.
8. If you have issues connecting to your access point despite entering the correct password, you may have to disable the network stack’s protected management frames functionality.
While this functionality helps with security, it can cause issues with certain Wi-Fi adapters and clients.
Disabling this functionality is as simple as using the following command within the terminal.
sudo nmcli con modify Hotspot wifi-sec.pmf disable
Hopefully, you can now access your new Raspberry Pi Wireless Access Point without any more issues.
Conclusion
This is yet another great project for the Raspberry Pi that can be extended to make it an extremely useful utility. As I mentioned above, you can make this a Wi-Fi hotspot where you can route all the internet traffic through a VPN.
Hopefully, you will now have your Raspberry Pi set up as a Wireless access point, and you have successfully expanded the reach of your Wi-Fi network.
If you encounter any issues or have feedback related to this tutorial, please don’t hesitate to leave a comment below.
Hi.
I have tried your tutorial an many others.
Sadly to say, but they are not working for me and I don’t know why.
I have Raspberry Pi 3 with inbuild wi-fi, driver – brcmfmac.
Any suggestions to locate and fix the problem?
Hi this worked great for me literally opened this guid on raspbian browser then open up terminal copy and past everything reboot and bingo.. same as the vpn guide..
One question. now have a USB to Ethernet adapter any tips on setting it up so I can connect a device to it through vpn? Didn’t want to tamper with anything in case I cause problems.
Thanks
Hi, Based on your Tutorials I wanted to Set up OwnCloud & I also want to set up pi3 Access Point. can you tell me how to do port forwarding for owncloud so that I can connect Ethernet Cable to pi3 & enable wifi AP to use internet on other devices as well as to use pi3 for hosting owncloud server.
It will be great help if you can provide step by step instructions for setting up OwnCloud & wifi AP in one tutorial.
Basically i want to plug my ISP ethernet Cable directly to pi3 then want to use it as wifi AP & Server.
Hi Gus
Can you do a video explaining how to used the pi as a Hotspot provide wifi? And control the time and amount wifi?
Thanks
Really nice and useful tutorial! Thank you!
I have created the wi-fi point and it really works well, also i have found a way to set a transmit power of wi-fi :
iwconfig wlan0 txpower 10
And my goal is to create a WiFi point for children via which they will be able to connect to a few sites only (the facebook and some training sites)
I have played around with iptables (a few days) – but the only thing i have got, fully drop connection to any site or allow connection to all sites((
If you may give an advice or help i would be very thankful!
Awesome! Thank you for this.
Hey there – when I get to step 10 I am running into a snag — there appears to be an empty file when is run *sudo nano /etc/default/hostapd* — is there something I’m missing? Can I just type in *DAEMON_CONF=”/etc/hostapd/hostapd.conf* even though there’s nothing else in the file? Thanks.
Can you help me find the wifi driver for (broadcom 802.11 n wifi adapter)?.
From Question 9. the driver=.
Fantastic site, I’ve been looking for clear guides to these projects for what seems years.
Unfortunately, I have an error when I get to
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
I get the following response:
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file ‘/lib/modules/4.4.50-v7+/modules.dep.bin’
iptables v1.4.21: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Does anyone has any idea of what I’m doing wrong?
I’m running a Raspberry Pi v2 with an Edimax wifi adaptor.
When it came to the driver under step 9 I left it at n180211 since I couldn’t find anything else suggested on the Internet to use.
I amping the same problem, any ideas
Solved with Reboot
I’m having the exact same issue – have you managed to get it resolved yet??
Yes, have now solved it thanks to Jason’s suggestion of a reboot.
It seems may need to reboot between step 19 and 20.
I have been able to log into the Pi access point using a Roku stick and play Netflix.
Hi Gus as always your tutorials are on point but I was wondering if theres anything I can do to add QoS to the pi, see the problem is that when my Monster-inlaw comes home her ipad sucks all my bandwidth or even my kids with youtube and then if Im playing bf4 or any fps my connection gets dropped cuz of the high latency.
HELP……!
Thank you.
Hi,
The rasp Is not giving me IP for some reason? any help
I’m having the same problem, when i try to connect to the wifi, the raspberry seems not to be able to give me an IP adress. Any idea how to fix this?
Hi Daniel,
This appears to be a reoccurring issue at the moment. I will revisit this tutorial once I have the next book update out to see if I can reproduce the issue and will reply again if I manage to reproduce it and fix it.
Cheers
I had (have?) the same issue and so far stopping and then starting the `hostapd` and `dnsmasq` services has done the trick to have it pass out an IP.
Hope that helps!
How do I find my device= name (shown in step 9) for my Ethernet connected pi 3?
Hey there!
After trying two different Pis (RPi 1 model B and RPi 3) it seems I keep running into the same problem. For starters, I notice I do not have a /etc/hostapd/hostapd.conf file after installing hostapd. Consequently, the ssid is not being broadcast, and running ‘$ sudo system status dnsmasq’ shows ‘…> hostapd[1096]: Starting advanced IEEE 802.11 management: hostapd failed!’
Gus, which version of raspbian are you running? I am using the Jessie Lite release on 2017-04-10, which may be the culprit. Any idea where I can find a stable previous release??
A side note– i tried another tutorial that uses hostapd and the isc-dhcp-server, but requires the May 2016 release to work. Its been a week and I can’t seem to catch a break!
Keep up the good work!
Hi, I was wondering if you have solved not have having the follow:
/etc/hostapd/hostapd.conf
I have the same issue. I’m using RPi3Will this bog down my pi? Also, I have poor wifi connection where I want to use this and no ethernet connection. Will this work with no ethernet and 1-2 bars of wifi?
Hello,
Are you able to make a raspberry pi 3 both a wireless ap as well as a plex server? Essentially I want to be able to have my plex server mobile and able to stream to my mobile devices while on a road trip.
If this is possible could you maybe make a streamlined tutorial on how to do this? Thanks
This in theory should work just fine but something I haven’t been able to test. I will see if i can take a look at it sometime in the near future.
HI Gus. Just a question. Can the pi be used as a Hotspot but still provide free wifi? Thanks, ali
Can you also do a video?
hi again, after typing the following lines as in step 6 :
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.137.2
netmask 255.255.255.0
network 192.168.137.0
broadcast 192.168.137.255
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
and when comming to step 7 , it said
“ifdown: interface wlan0 not configured ” any help please ?
I ran into the same problem too. Any help would be appreciated.
I have the same problem.
How did the rest of you fix this or did you not receive this error message:
“ifdown: interface wlan0 not configured”?
I had this because WiFi was off. I had turned it off when I plugged in the Ethernet cable.
I had this issue with Raspian Jessie on RaPi3. If the interface wlan0 isn’t present when doing an ifconfig -a run sudo rpi-update
It downloaded a firmware update and for me after a reboot wlan0 was present.
Can this tutorial be done using only the wifi connection of the Pi? I see that the ethernet connection is used at the beginning, but is that only to download the packages?
Can I replace the Ethernet cable with another Wifi dongle?
And if so do you know how?
This is possible, however WiFi to Wifi can be incredibly slow. I will need to look into it and test it. Once I have done that I will provide you with the steps. (I think it’s pretty easy)
I just tried it and the speed is not too bad. Used logiLink wl0084a und just replaced the eth0 with wlan1
hi , thanks for this post. I would like to ask if o could build the same project using a raspberry Pi 1 i have ?
Yes it should work fine but make sure your WiFi dongle can act as a wireless access point. Keep in mind I haven’t tested this on any version other than the Raspberry Pi 3 so you might (but shouldn’t) run into problems.