NextCloudPi with Wi-Fi Hotspot

NextCloudPi is a great project which provides ready-to-run images to run NextCloud on a Raspberry Pi. My favorite models are the 3B (without the plus) and the Zero W, because of their efficiency. I'll use a Raspberry Pi 3B for this project. It can be powered by an ordinary power bank.

My goal is to have a cloud service which is:

1. General setup

  1. Extract image to SD card (I've used Ether, although I hate electron)
  2. Connect your Pi to your network via cable
  3. Browse the URL of the Pi
  4. Run the activation steps and note the passwords

2. Changing the passwords

Now I've changed the passwords:

3. Setup Wi-Fi hotspot

There's a good documentation here about how to setup Wi-Fi with a Raspberry Pi.

Here's what I did differently:

All commands:

sudo apt install hostapd dnsmasq
sudo systemctl unmask hostapd
sudo systemctl enable hostapd
sudo systemctl start dnsmasq
sudo systemctl enable dnsmasq
sudo apt install netfilter-persistent iptables-persistent
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo netfilter-persistent save
sudo rfkill unblock wlan

Add this at the end of the file:

interface wlan0
    static ip_address=192.168.4.1/24
    nohook wpa_supplicant

Enable routing. Create the following file:

# Enable IPv4 routing
net.ipv4.ip_forward=1

Add this at the end of the file:

interface=wlan0 # Listening interface
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
                # Pool of IP addresses served via DHCP
domain=wlan     # Local wireless DNS domain
address=/gw.wlan/192.168.4.1
                # Alias for this router

Create a new file:

country_code=GB
interface=wlan0
ssid=<NameOfNetwork>
hw_mode=g
channel=7
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=<YourPassword>
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

4. My favorite apps for Nextcloud

5. Apps for Android