Following the suggestion of @jsotola, I managed to solve this, using only stuff I had lying around the house, and following @Seamus's suggestion, I am posting it here. (Also see my comment below for a simpler way.)
Following the suggestion of @jsotola, I managed to solve this, using only stuff I had lying around the house, and following @Seamus's suggestion, I am posting it here.
Following the suggestion of @jsotola, I managed to solve this, using only stuff I had lying around the house, and following @Seamus's suggestion, I am posting it here. (Also see my comment below for a simpler way.)
I had an old Pi 2 Model B v1.1 and a wifi dongle. Unfortunately I did not have a USB keyboard, so I followed instructions for a "headless" installation—there are some older links floating around but that one seems up-to-date.
I used the Raspberry Pi Imager and a 32 GB micro SD card I had floating around. I installed the standard RPi OS so that I can connect to the desktop via VNC if I want to, but you could certainly use the "Lite" version without a desktop.
You need to create a blank file named
ssh
in the boot folder to enable ssh on the Pi. I did have a USB mouse and an HDMI cable, so I used that to set the timezone, language, etc.To connect automatically to wifi, you need to create a
wpa_supplicant.conf
file in the boot folder looking like this:ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev network={ ssid="YOUR_SSID" psk="YOUR_PASSWORD" key_mgmt=WPA-PSK }
At that point, you can put your SD card in the Pi and plug it in. (I had not remembered that you need a fairly hefty power source; fortunately I had a charger from an old Moto X which is rated at 2.85A lying around.) When you ssh in, don't forget to use
passwd
to change thepi
password from the defaultraspberry
.You also want to reconnect automatically to wifi if you lose the signal. You will see lots of suggestions on how to do this using cron tasks, but there is a much simpler way, which I used.
In order to use uptimerobot for the email notification, your Pi needs to be accessible from the internet. My Netgear router is set up to use no-ip.com for dynamic DNS (DDNS), but you need to make sure you renew every 30 days in their free tier, which is not good for a plug-it-in-and-forget-about-it project. I use dynu.com as my DDNS system for another project. You can set up a free subdomain (like
example.ddnsgeek.com
) with a number of choices for top-level domains. You need to set up the Pi so that it will refresh dynu every 5 minutes—here are the instructions for that. (Where they sayvi
you can usenano
or another editor of your choice.)On your router, you need to forward a port to the Pi. To do the port forwarding, your Pi almost certainly needs to have a fixed local IP address. On my Orbi router, you can do this by "address reservation" which is quite hard to find; it's under "LAN Setup." Alternatively you could give your Pi a static IP address in whatever range your router has for that. I'm sure it's not difficult, but I was glad I didn't need to do it.
For the port forwarding, I chose to use port 7022 coming in and route it to 22 on the Pi. You could probably just forward 22 to 22, but 7022 makes it a bit more secure. In my case I have a Verizon router, and my Orbi base station is plugged into it, so on the Verizon router I have to forward 7022 to 7022 on the Orbi base station, and on the Orbi base station I forward 7022 to 22 on the Pi.
At that point, you should be able to connect to your Pi from a terminal by saying:
ssh [email protected] -p 7022
The terminal could be anywhere in the world.
Then create your uptimerobot account, and click on "Add new monitor." Make a port monitor, give it a name (like "my pi"), put in your domain name, port 7022 (or whatever port you use for SSH), and set the monitoring interval. I chose 15 minutes, because I want to give the Pi time to reconnect to wireless, change the DDNS assignment—or whatever else—in between checks.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="YOUR_SSID"
psk="YOUR_PASSWORD"
key_mgmt=WPA-PSK
}
At that point, you can put your SD card in the Pi and plug it in. (I had not remembered that you need a fairly hefty power source; fortunately I had a charger from an old Moto X which is rated at 2.85A lying around.) When you ssh in, don't forget to use passwd
to change the pi
password from the default raspberry
.
You also want to reconnect automatically to wifi if you lose the signal. You will see lots of suggestions on how to do this using cron tasks, but there is a much simpler way, which I used.
In order to use uptimerobot for the email notification, your Pi needs to be accessible from the internet. My Netgear router is set up to use no-ip.com for dynamic DNS (DDNS), but you need to make sure you renew every 30 days in their free tier, which is not good for a plug-it-in-and-forget-about-it project. I use dynu.com as my DDNS system for another project. You can set up a free subdomain (like
example.ddnsgeek.com
) with a number of choices for top-level domains. You need to set up the Pi so that it will refresh dynu every 5 minutes—here are the instructions for that. (Where they sayvi
you can usenano
or another editor of your choice.)On your router, you need to forward a port to the Pi. To do the port forwarding, your Pi almost certainly needs to have a fixed local IP address. On my Orbi router, you can do this by "address reservation" which is quite hard to find; it's under "LAN Setup." Alternatively you could give your Pi a static IP address in whatever range your router has for that. I'm sure it's not difficult, but I was glad I didn't need to do it.
For the port forwarding, I chose to use port 7022 coming in and route it to 22 on the Pi. You could probably just forward 22 to 22, but 7022 makes it a bit more secure. In my case I have a Verizon router, and my Orbi base station is plugged into it, so on the Verizon router I have to forward 7022 to 7022 on the Orbi base station, and on the Orbi base station I forward 7022 to 22 on the Pi.
At that point, you should be able to connect to your Pi from a terminal by saying:
ssh [email protected] -p 7022
The terminal could be anywhere in the world.
- Then create your uptimerobot account, and click on "Add new monitor." Make a port monitor, give it a name (like "my pi"), put in your domain name, port 7022 (or whatever port you use for SSH), and set the monitoring interval. I chose 15 minutes, because I want to give the Pi time to reconnect to wireless, change the DDNS assignment—or whatever else—in between checks.
I had an old Pi 2 Model B v1.1 and a wifi dongle. Unfortunately I did not have a USB keyboard, so I followed instructions for a "headless" installation—there are some older links floating around but that one seems up-to-date.
I used the Raspberry Pi Imager and a 32 GB micro SD card I had floating around. I installed the standard RPi OS so that I can connect to the desktop via VNC if I want to, but you could certainly use the "Lite" version without a desktop.
You need to create a blank file named
ssh
in the boot folder to enable ssh on the Pi. I did have a USB mouse and an HDMI cable, so I used that to set the timezone, language, etc.To connect automatically to wifi, you need to create a
wpa_supplicant.conf
file in the boot folder looking like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="YOUR_SSID"
psk="YOUR_PASSWORD"
key_mgmt=WPA-PSK
}
At that point, you can put your SD card in the Pi and plug it in. (I had not remembered that you need a fairly hefty power source; fortunately I had a charger from an old Moto X which is rated at 2.85A lying around.) When you ssh in, don't forget to use passwd
to change the pi
password from the default raspberry
.
You also want to reconnect automatically to wifi if you lose the signal. You will see lots of suggestions on how to do this using cron tasks, but there is a much simpler way, which I used.
In order to use uptimerobot for the email notification, your Pi needs to be accessible from the internet. My Netgear router is set up to use no-ip.com for dynamic DNS (DDNS), but you need to make sure you renew every 30 days in their free tier, which is not good for a plug-it-in-and-forget-about-it project. I use dynu.com as my DDNS system for another project. You can set up a free subdomain (like
example.ddnsgeek.com
) with a number of choices for top-level domains. You need to set up the Pi so that it will refresh dynu every 5 minutes—here are the instructions for that. (Where they sayvi
you can usenano
or another editor of your choice.)On your router, you need to forward a port to the Pi. To do the port forwarding, your Pi almost certainly needs to have a fixed local IP address. On my Orbi router, you can do this by "address reservation" which is quite hard to find; it's under "LAN Setup." Alternatively you could give your Pi a static IP address in whatever range your router has for that. I'm sure it's not difficult, but I was glad I didn't need to do it.
For the port forwarding, I chose to use port 7022 coming in and route it to 22 on the Pi. You could probably just forward 22 to 22, but 7022 makes it a bit more secure. In my case I have a Verizon router, and my Orbi base station is plugged into it, so on the Verizon router I have to forward 7022 to 7022 on the Orbi base station, and on the Orbi base station I forward 7022 to 22 on the Pi.
At that point, you should be able to connect to your Pi from a terminal by saying:
ssh [email protected] -p 7022
The terminal could be anywhere in the world.
- Then create your uptimerobot account, and click on "Add new monitor." Make a port monitor, give it a name (like "my pi"), put in your domain name, port 7022 (or whatever port you use for SSH), and set the monitoring interval. I chose 15 minutes, because I want to give the Pi time to reconnect to wireless, change the DDNS assignment—or whatever else—in between checks.
I had an old Pi 2 Model B v1.1 and a wifi dongle. Unfortunately I did not have a USB keyboard, so I followed instructions for a "headless" installation—there are some older links floating around but that one seems up-to-date.
I used the Raspberry Pi Imager and a 32 GB micro SD card I had floating around. I installed the standard RPi OS so that I can connect to the desktop via VNC if I want to, but you could certainly use the "Lite" version without a desktop.
You need to create a blank file named
ssh
in the boot folder to enable ssh on the Pi. I did have a USB mouse and an HDMI cable, so I used that to set the timezone, language, etc.To connect automatically to wifi, you need to create a
wpa_supplicant.conf
file in the boot folder looking like this:ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev network={ ssid="YOUR_SSID" psk="YOUR_PASSWORD" key_mgmt=WPA-PSK }
At that point, you can put your SD card in the Pi and plug it in. (I had not remembered that you need a fairly hefty power source; fortunately I had a charger from an old Moto X which is rated at 2.85A lying around.) When you ssh in, don't forget to use
passwd
to change thepi
password from the defaultraspberry
.You also want to reconnect automatically to wifi if you lose the signal. You will see lots of suggestions on how to do this using cron tasks, but there is a much simpler way, which I used.
In order to use uptimerobot for the email notification, your Pi needs to be accessible from the internet. My Netgear router is set up to use no-ip.com for dynamic DNS (DDNS), but you need to make sure you renew every 30 days in their free tier, which is not good for a plug-it-in-and-forget-about-it project. I use dynu.com as my DDNS system for another project. You can set up a free subdomain (like
example.ddnsgeek.com
) with a number of choices for top-level domains. You need to set up the Pi so that it will refresh dynu every 5 minutes—here are the instructions for that. (Where they sayvi
you can usenano
or another editor of your choice.)On your router, you need to forward a port to the Pi. To do the port forwarding, your Pi almost certainly needs to have a fixed local IP address. On my Orbi router, you can do this by "address reservation" which is quite hard to find; it's under "LAN Setup." Alternatively you could give your Pi a static IP address in whatever range your router has for that. I'm sure it's not difficult, but I was glad I didn't need to do it.
For the port forwarding, I chose to use port 7022 coming in and route it to 22 on the Pi. You could probably just forward 22 to 22, but 7022 makes it a bit more secure. In my case I have a Verizon router, and my Orbi base station is plugged into it, so on the Verizon router I have to forward 7022 to 7022 on the Orbi base station, and on the Orbi base station I forward 7022 to 22 on the Pi.
At that point, you should be able to connect to your Pi from a terminal by saying:
ssh [email protected] -p 7022
The terminal could be anywhere in the world.
Then create your uptimerobot account, and click on "Add new monitor." Make a port monitor, give it a name (like "my pi"), put in your domain name, port 7022 (or whatever port you use for SSH), and set the monitoring interval. I chose 15 minutes, because I want to give the Pi time to reconnect to wireless, change the DDNS assignment—or whatever else—in between checks.
Following the suggestion of @jsotola, I managed to solve this, using only stuff I had lying around the house, and following @Seamus's suggestion, I am posting it here.
I had an old Pi 2 Model B v1.1 and a wifi dongle. Unfortunately I did not have a USB keyboard, so I followed instructions for a "headless" installation—there are some older links floating around but that one seems up-to-date.
I used the Raspberry Pi Imager and a 32 GB micro SD card I had floating around. I installed the standard RPi OS so that I can connect to the desktop via VNC if I want to, but you could certainly use the "Lite" version without a desktop.
You need to create a blank file named
ssh
in the boot folder to enable ssh on the Pi. I did have a USB mouse and an HDMI cable, so I used that to set the timezone, language, etc.To connect automatically to wifi, you need to create a
wpa_supplicant.conf
file in the boot folder looking like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="YOUR_SSID"
psk="YOUR_PASSWORD"
key_mgmt=WPA-PSK
}
At that point, you can put your SD card in the Pi and plug it in. (I had not remembered that you need a fairly hefty power source; fortunately I had a charger from an old Moto X which is rated at 2.85A lying around.) When you ssh in, don't forget to use passwd
to change the pi
password from the default raspberry
.
You also want to reconnect automatically to wifi if you lose the signal. You will see lots of suggestions on how to do this using cron tasks, but there is a much simpler way, which I used.
In order to use uptimerobot for the email notification, your Pi needs to be accessible from the internet. My Netgear router is set up to use no-ip.com for dynamic DNS (DDNS), but you need to make sure you renew every 30 days in their free tier, which is not good for a plug-it-in-and-forget-about-it project. I use dynu.com as my DDNS system for another project. You can set up a free subdomain (like
example.ddnsgeek.com
) with a number of choices for top-level domains. You need to set up the Pi so that it will refresh dynu every 5 minutes—here are the instructions for that. (Where they sayvi
you can usenano
or another editor of your choice.)On your router, you need to forward a port to the Pi. To do the port forwarding, your Pi almost certainly needs to have a fixed local IP address. On my Orbi router, you can do this by "address reservation" which is quite hard to find; it's under "LAN Setup." Alternatively you could give your Pi a static IP address in whatever range your router has for that. I'm sure it's not difficult, but I was glad I didn't need to do it.
For the port forwarding, I chose to use port 7022 coming in and route it to 22 on the Pi. You could probably just forward 22 to 22, but 7022 makes it a bit more secure. In my case I have a Verizon router, and my Orbi base station is plugged into it, so on the Verizon router I have to forward 7022 to 7022 on the Orbi base station, and on the Orbi base station I forward 7022 to 22 on the Pi.
At that point, you should be able to connect to your Pi from a terminal by saying:
ssh [email protected] -p 7022
The terminal could be anywhere in the world.
- Then create your uptimerobot account, and click on "Add new monitor." Make a port monitor, give it a name (like "my pi"), put in your domain name, port 7022 (or whatever port you use for SSH), and set the monitoring interval. I chose 15 minutes, because I want to give the Pi time to reconnect to wireless, change the DDNS assignment—or whatever else—in between checks.
Of course, you might not want ssh to be accessible over the internet, even though you changed the password. (You changed the password, right?) uptimerobot has various other options, but I think they will all involve some port forwarding, and I thought it would be cool to be able to SSH in from anywhere, for some unknown future project.