Setup a Custom Domain Name
In just minutes, you can have a personal or professional website hosted from your own home and a mini-PC, such as a standard Raspberry Pi.
Requirements
- Raspberry Pi or similar Linux-based mini-PC running a web server.
- Admin access to your router to enable port forwarding.
Registration
- Navigate to https://www.noip.com/ and sign up for a free account.
- Select the custom domain name you want to use. You can add up to 3 free domains per account.
Install the Dynamic Update Client
- Open Windows PowerShell (right click Windows icon in lower left) or a Linux terminal and enter the following command to connect to the Pi:
ssh pi@raspberry.local
- Enter your password (the default password is raspberry).
- Paste in each of the following commands, pressing enter after each line, to download and install the update client. You will be prompted for your password after the first step:
su -
cd /usr/local/src
wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
tar xzf noip-duc-linux.tar.gz
cd noip-2.1.9-1
make
make install
/usr/local/bin/noip2
- In the same session, you can configure the client to run at startup by entering
crontab -e
[select 1 if prompted] and scrolling to the end of the file. Type “@reboot /usr/local/bin/noip2” (without quotes) on the last line, then enterCtrl+X
andY
to save. - If you face any issues, refer to the latest documentation from No-IP.
Enable Port Forwarding on Your Router
- To make your website public and accessible to the world, forward port 80 in your router.
- Access your router as you normally would. Find the section labelled port forwarding or virtual servers. Add a new rule to forward port 80 to the private IP address of your Pi. Check your router's manual for additional guidance.
- Test your new website by navigating to your domain (ex. yourdomain.ddns.net) in any web browser.
Bonus Tip: Forward Port 22
- Login to your Pi from anywhere by also forwarding port 22.
- Connect to your Pi from outside your home by running:
ssh pi@yourdomain.ddns.net