Web-accessible, secure webcam solution

I’d like to do something like this:

https://www.wyzecam.com

For $20 it seems like such a good deal. But you’re at the mercy of the company to support, maintain, and keep it secure. You have no idea how long they will offer the service in general, let alone for free.

Any ideas? Having a “app” isn’t required, but web access to video would be ideal. The location I’d want to set something like this up has a 10 down 1 up fiber internet connection.

dumb cameras using a motion server behind an ssh tunnel

I’m kinda interested in something similar to this. I have been playing around with Motion on Linux, and I have it set up so two USB cams are connected to one machine that can record video, as well as a Raspberry Pi that broadcasts on the network, and the other machine can record the video from the Pi. I also set up Syncthing to back up recorded video to a second machine which was pretty easy. I can log in with any device on the network by typing in the appropriate IP:Port and view with maybe a few seconds of lag.

I’m guessing from there I would just need to set up some type of VPN that I could log in to with a remote device. I’m sure it would be very straightforward to do that from a remote Linux machine, but as far as something either purely web based or compatible with Android, I don’t know. I’m a complete Android noob. Got my first smart phone maybe 1 1/2 years ago and barely use it beyond listening to podcasts.

In any event, it isn’t hard to set up Motion (or other security software) to broadcast on the local network and from there you could find a way to log in to your network remotely.

I forgot to mention that it needs to be dead simple to use. My dad / parents / family just want a view of the lake at the lake house.

Is it possible to use a raspberry pi, take a feed from a 1080p USB webcam or ipcam, convert / compress it to 720p h265 or something low-bandwith optimized, and embed it on a website?

Yea, you can definitely turn raspberry pi into surveillance camera. You can even buy an official camera module for it. However, its such a pain in the ass, you would be better off getting an off the shelf product instead of making your own. Even if just for the reliability sake.

Get the cheapest Synology that can install surveillance app. Use Synology android/IOS surveillance app to view the camera.

Or install it on a compatible old computer. Google Xpenology. Of course the real Synology would be more compact and officially supported. I used to have that before I bought the 4 bay Synology box.

As a bonus you can do encrypted backups to that location over the internet. And you can store video clips from the camera right on the box.

Here is a demo of the webUI for a typical Synology. https://www.synology.com/en-us/dsm/live_demo

1 Like

I wish I had a Synology box. That looks like a very nice and easy solution. I like the idea of off-site backups, too. Unfortunately there are none on Craigslist near me. And buying the cheapest one and a couple drives is pushing the budget quite a bit.

I’ve got raspberry pi’s and webcams coming out of my ears, though. It doesn’t even need to be a raspberry pi, I’ve got an older optiplex or Lenovo box I could use. I don’t mind if setting up a home brew solution is a pain in the ass. I feel like I’d like a project like this. Learn something new, make something cool. I’ve never made a website from scratch beyond a basic forum on my VPS. It’d be cool to make a site with a live video feed anyone can access.

I have my pi set to broadcast on my network, and I have a bookmark of the IP:Port and the browser has the login name/PW saved, so it is dead simple once set up. Motion uses a config file to get running, and it looks daunting but is very straightforward. It just has so many options that it looks more complicated than it needs to be. Simply leave the defaults for everything you don’t need.

You can adjust the resolution and FPS output from motion, set the IP:Port (or use default), and the username/PW in the config file. Probably take maybe 20 mins to go over and cross reference with link below to go over all of the settings and adjust as you see fit.

The config file itself is fairly verbose, but doesn’t list the limits of the different settings. This page here has all of the extra info needed to figure out how to set things:

http://lavrsen.dk/foswiki/bin/view/Motion/ConfigFileOptions

I agree, if you didn’t already have the Pi and hardware it would be cheaper/easier to buy an IP cam, but I was in the same boat as you and it was just easier to use what I had on hand. The only thing I don’t know anything about is the ‘access from internet’ part, as I simply haven’t looked into it. If you can embed the stream to a website or use a VPN or some other method to tunnel in to your router (static IP maybe? IDK ima noob at this shit) then it should be as simple as open web browser, select bookmark, watch video feed. That’s how it works on my network. I use an old Amazon Fire Tablet so I can actually see things as my phone’s screen is too small for the job.

1 Like

I’ll look into motion tonight. That may be a simple enough solution. Would just have to set up a VPN to connect to the remote location.

ssh forwarding would be a lot easier imo. Its basically one line command. You can even do the reverse tunnel SSH if you want to keep the webcam/rpi behind the firewall, but still want to connect to it from outside.

Do you know of any good guides for that? I’ve used Linux for years but I’m a total noob at command line stuff and have no clue how any of that works. Telling someone to ‘just do X’ may seem easy, but a little more info would be infinitely more helpful to the uninitiated.

It’s kind of like telling someone “Oh, just do nomodeset” without explaining wheret to put it or how to update grub afterwards. I still haven’t seen a clear and concise guide for that. Glad I haven’t actually needed it!

Well for regular SSH tunnel you just do something like

ssh -D 4000 [email protected]

4000 is your local port. admin is the username on your linux box, and 192.168.1.1 is your ip address.

So lets say your public IP is 8.8.8.8, your linux username is kleerkut and you want to connect from another computer(client) over the internet.

All you do is ssh -D 4000 [email protected] And then in your browser settings you simply go into proxy settings and set your local ip(127.0.0.1) and the port number 4000

On windows client you can use putty to do the same

configure proxy in firefox as example

https://support.mozilla.org/en-US/kb/connection-settings-firefox

You want to set SOCKS host to 127.0.0.1 and port 4000 or whatever port you selected in putty or in the ssh command line. Basically you are connecting to your own computer as its now running a proxy server that is forwarding traffic to your SSH linux server.

For the above you need to have the ssh port exposed to the internet. You can do that using a port forwarding on your router.

For reverse tunnel you can do something like this

Right so the end result would be something similar to a VPN connection. You can just type ip address of the rpi/ipcam etc as if its on your local network.

1 Like