Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Sharing Your BirdNET Pi

Patrick McGuire edited this page Oct 30, 2021 · 24 revisions

Table of Contents

Anyone interested in sharing their BirdNET-Pi installation with friends, colleagues, and the whole rest of the world can use this as a reference for setting up their own previously-purchased custom domain name OR a new, totally free hostname from NoIP.com to do just that!

This guide has two sections: one for if you have a static public IP address, and one for the rest of us (i.e., you have a dynamic public IP address).

A few things you will need to know in order to be successful:

  • How to create a DHCP reservation for BirdNET-Pi and how to forward ports on your router
  • Your public IP address, and whether it is static (always stays the same) or dynamic (it does not stay the same)
If you are unsure whether your public IP address is static or dynamic, it is probably dynamic. You usually have to request (and pay extra for) a static IP address from your ISP.
To find out the BirdNET-Pi's public IP address at any given time, issue curl -4 ifconfig.co from the BirdNET-Pi's terminal or SSH connection.
  • If you own your own domain name, how to setup an "A" record and a "CNAME" record with your domain name provider

Getting Started

Two Things Everyone Will Need To Do

In your home router settings, there are two settings/configuration options we need to utilize: DHCP reservations, and Port Forwarding/Redirection.
Note:If you are able to track down the page for port forwarding but not for setting up DHCP reservations, don't worry. If you have the ability to utilize port forwarding, but cannot configure DHCP reservations, it means the router is doing it for you in the background.

Create DHCP Reservation

DHCP is the protocol that allows all of the hosts on the network to defer to one source on the network (the router) for configuration. It handles things like issuing newly connected devices available IP addresses,configures the DNS/gateway and subnet masking for the host, and identifies special servers/resources on the network, like printers, network attached storage, or network booting (tftp) file servers.

We need to tell DHCP that BirdNET-Pi wants to permanently reserve an IP address so that no other devices on the network will ever be issued that IP address. This will allow the network to reliably count on the birdnetpi (hostname) to always resolve to the same IP address, and that that IP address will always point to the BirdNET-Pi (device).

Consult your router's manual for how to set a DHCP reservation. It doesn't matter what IP address is reserved, so long as a reservation exists. (If you are absolutely sure that your router does not support DHCP reservations, you can configure the BirdNET-Pi to use a static IP address. I will not document those steps here.)

Configure Port Forwarding

Port forwarding is the process of configuring the router to forward requests it receives on a specific port --ports 80 and 443 in our case-- to a specific host on the network --'birdnetpi' (hostname) in our case.

+--------+ 
|        | 
|  User  |   
|        |   
+--------+  
    |
    |  Makes a web request
    |  to your home network
    |  to port 80 (http) or
    |  to port 443 (https)
    V

+-----------+     +--------------------+                   +--------------------+
|   Modem   |     |  Router with port  | forwards requests |     BirdNET-Pi     |
|(Public IP)|---->| forwarding rules   |-----------------> | listening on ports |
+-----------+     | for ports 80, 443  | to BirdNET-Pi     |     80 and 443     |
                  | to BirdNET-Pi's IP |                   |   (Internal IP)    |
                  +--------------------+                   +--------------------+
Again, consult your router's manual for how to configure port forwarding. Note that your router's terminology for this process may be different, e.g., "port redirection" or perhaps may be tucked into "routing" features.

I have a static public IP address AND own a domain

This will be easy for you. There are basically 2 steps you will follow after completing the steps above.

Step 1 Establish the "A" and "CNAME" DNS records

  • Set an "A" record for your domain named "@" that points to your static public IP address.
  • Create 2 "CNAME" records: 1 for the BirdNET-Lite logging page, and 1 for the Audio Extraction logging page.
These CNAMEs should point to your domain. For example, birdnetlog.yourdomain.com would be a CNAME named "birdnetlog" that points to "yourdomain.com"
  • Use a DNS lookup tool, (this works well enough), to be sure that your domain resolves to your IP address and that the CNAME records have populated BEFORE you move onto Step 2, else Step 2 will not work.

Step 2 Adjust your birdnet.conf file and update

  • Edit the birdnet.conf file in the BirdNET-Pi directory. There is a tool for this on the "Tools" page of http://birdnetpi.local. ***Note:** After you have completed these steps to make your BirdNET-Pi public, you will not be able to use this feature.
In the "Web-hosting/Caddy File-server" section of birdnet.conf, input the URLs that correspond to the DNS records from Step 1 for the BIRDNETPI_URL, EXTRACTIONLOG_URL, and BIRDNETLOG_URL variables. Be sure to include "https://". Don't forget to save!
  • After editing birdnet.conf, go to http://birdnetpi.local/scripts and click "Update BirdNET-Pi" and confirm the update.
  • After a few minutes, go to your domain to see it work! (Some ISPs/Routers/Modems don't handle internal request well and may redirect you to another page or just ignore the request altogether. Don't worry, though, this isn't what others will see. Use your phone's LTE connection to test.)

I have a dynamic public IP address

If your Internet Service Provider or LTE Carrier issues your network a _dynamic_ public IP address, hosting public web services becomes very difficult to manage. What is available one day is suddenly not reachable the next and you would have to reconfigure all of your DNS records each time to fix things again.

The most elegant solution to that problem that I have discovered so far is [NoIP.com](https://noip.com), which uses a small piece of client software to update the DNS records anytime the ISP issues the BirdNET-Pi's network a new public IP address.

The diagram below illustrates this concept: *Note: this diagram is not intended to illustrate network traffic

IP=Public IP Address (find with `curl -4 ifconfig.co`)
DDNS=Dynamic Domain Name Server (https://noip.com)
DUC=Dynamic Update Client (on the BirdNET-Pi)

+-----------------------------------+
|                                   | 
|    Dynamic Domain Name Server     |  
|      No-IP hostname entry for     |
|        birdnetpi.ddns.net:        |
|"A" record target ->172.73.170.186 |      
|                                   |       +---------------+
+-----------------------------------+<----->|    Internet   |
                 ^|                         |ISP/LTE Carrier|
                 || DDNS directs all        +---------------+
DUC updates DDNS || requests to                     |
when IP changes  || birdnetpi.ddns.net              | ISP or LTE carrier
                 || to 172.73.170.186               | issues DHCP IP to
                 |v                                 | modem or router
+-----------------------------------+               v
|                                   |       +----------------+
|            BirdNET-Pi             |       |  Router/Modem  |      
|      Public IP=172.73.170.186     |<----->|Passes its IP to|
| [ Running DUC ] checks every Nmin |       |the rest of the |
|    Hostname=birdnetpi.ddns.net    |       |     network    |
|                                   |       +----------------+
+-----------------------------------+
  1. The ISP/LTE Carrier issues a new public IP address to the Modem/Router.
  2. The DUC running on the BirdNET-Pi detects the change and sends an update to the DDNS that it has a new IP address.
  3. The DDNS updates its A record so that requests to "http://birdnetpi.ddns.net" resolve to the newly updated IP address.

I have a dynamic IP address and own my own domain

I have a dynamic IP address and do not own a domain

Clone this wiki locally