Picture of Raspberry Pi remote webcam
This will allow you to create a remote webcam for your Raspberry Pi so that you can view it from any computer on the local network. For this instructable you will need:

• Raspberry Pi with an Whezzy Raspbian installed and internet connection established
• Webcam (I use PS3 Eye Camera, but it will work with most USB webcams)
• IP address on your local network (this can be found with the command $ ifconfig and should be something like:

Step 1: Getting started

Picture of Getting started
Run up your Raspberry Pi to the command prompt

Install the webcam server software using the following command:
$ sudo apt-get install motion

This will take a few minutes to download and install but once it has finished and takes you back to the command prompt we are ready to continue.
1-40 of 87Next »
48kminer2 days ago
First pi project that has worked ! Great!! Cheers!
bsdaiwa6 days ago

After using this for a few days I thought of a few other items that would be nice along with a user name and password would adding the ability to turn off the lights on the camera and turn on the microphone. I am using the same camera the author used.

bsdaiwa9 days ago

Thanks, this works great. I want to stream the video but was wondering if there was a way to set it up so that a user name and password could be added and how can I make sure that it starts automaticly in the event of a power loss?

xpark10 days ago

How do i start the webcam at boot automatically?

Jhfitzhugh made it!19 days ago

Nice work! I was finally able to get it to work, but I can only get it to work in Firefox browser. Tried Chrome and Internet Explorer but it doesn't work. Chrome acts like nothing was entered at all and Internet Explorer on Windows 10 actually closes the browser after hitting the enter key. Any ideas what the problem could be?

CédricV21 month ago

You can also use Kerberos.io, it's also open-source and a lot more user friendly to install and configure. You can find more information on the website.

Hey Cedric. Saw your work on Kerberos. You've done some amazing work on developing this platform. My question is, will I be able to access my recordings from a remote computer or I'll have to have set a cloud necessarily to do so? I'm familiar with port forwarding so, is it possible to port forward my RPi -running Kerberos- and access it remotely?

sat481 (author) 1 year ago

Hi Ian,

I have tried resetting the remote webcam up on a fresh install of wheezy and as long as you only change the bits mentioned it should work fine. check you have the correct IP address, the only thing I can think that may cause the problem is if the webcam is not compatible but from what I have read then the majority should be fine. The whole file from step 3 is massive but another quick test you can do is try going into port: 8080 which is the config port. So you need to type your IP:8080 in the address bar (for me this is set to See if you can access this and if so check the configuration from there. Hope this helps.


GeorgeT7 sat4814 months ago

Is there any way to change the default port? 8080 and 8081 seem to be occupied in my LAN connection.

redspl GeorgeT71 month ago

Yes, ther is a way. In motion.conf find "port" (ctrl+w in nano)

GeorgeT7 redspl1 month ago


Yolo_Joe4 months ago

Is there any way to modify the resolution? Right now it's 320x240p..

redspl Yolo_Joe1 month ago

In motion.conf file search for width(in nano Ctrl+W). Just set width you want, and then set the height you want(it is right below widht). I recommend 640x480, most webcams works with that resolution.

tllittle4 months ago

I have followed all of the instructions so far. My webcam light will activate after "motion start."

However, I cannot view anything in browser locally, through another machine, with VLC, or any other service. I have enabled port forwarding (and even switched the port number a couple of times). The page simply is not found.

Any thoughts?

redspl tllittle1 month ago

Are you sure you typed correct IP adress? You do not need IP forwarding for this purpose.

redspl made it!1 month ago

Cool tutorial! I made it with the same camera as yours(i have one laying around).

One question: How i can decrease delay? I want to see the stream right before capture, but i have 1s delay. HELP!

JoeriP1 month ago

i'm getting a 404 while installing motion. any idea?

JanuszP1 JoeriP1 month ago

sudo apt-get update

and then try it ;)

I've downloaded earlier version of libmysqlclient18 and had to "apt-get -f install" and then update.

RoboCoder made it!1 month ago

Great tutorial. Worked perfectly with my Raspberry Pi 2 and Logitech webcam.

MatthewG12 made it!2 months ago
Got this going with ease but for the a bit of frustration finding a Web browser that would display the stream. My setup is similar to this picture with the exception that my pi has the UPiS Advanced Uninterruptible Power Intelligent Supply installed. The idea is that I'll set up the camera on a hill overlooking the town I live in and have a link on my website so that people can see what the weather is up to. Now I just need to increase the frame size and decrease the frame rate, and get it to stream live to my website.

KikeV3 months ago

How can I have less delay?

pipala.yadav3 months ago

Hi it was great tutorial its working fine but we need to type the motion start command always is there any code we can browse videos directly raspberry pi board is booted

kaneb110 months ago

it s ok with mozilla firefox.... but the streaming is 3 - 4 seconds dalay ..... is it normal ??? is there an instruction to cut delay ??

cr4qsh0t kaneb14 months ago

try setting v4l2_palette to 1 (or try with any other number? default is 8, had the same lag, set it to 1, lag reduced to about 0.5s instead of 4s. it then also applied the changes to width and height settings which previously didn't do anything).

Kriatyrr4 months ago

At first I thought it didn't work, even though every step went exactly as described. The light on the webcam would light up when Motion is started and go out when I stopped the service. It just wouldn't display, either in browser or VLC. Then I realized I had to include http:// before the IP:port.

labmice16 months ago

This works for me with a logitech webcam connected. How can I put a password on the stream? Thanks

AltGrW labmice15 months ago

you can set .htaccess into this folder, it's a simple login required but works fine

carter54 AltGrW5 months ago

...'you can set .htaccess into this folder, it's a simple login required but works fine'...

Please elaborate - which folder and where / when do you log in?

AltGrW carter544 months ago

# I've created this example using apache2

# create the htaccess file

pico /var/www/webcam/.htaccess

# htaccess content

AuthType Basic

AuthName "Alert!"

AuthUserFile /var/www/webcam/.htpasswd

require valid-user

# create user (replace the USER)

htpasswd -c /var/www/webcam/.htpasswd USER

# now you must configure the file /etc/apache2/sites-available/default

pico /etc/apache2/sites-available/default

# now you add the content below after the original content

Alias /webcam /var/www/webcam

<Directory "/var/www/webcam">

Options Indexes MultiViews

AllowOverride All

Order allow,deny

Allow from all


# After you finish the configuration above, restart the service

service apache2 restart

# and try to access the folder in the browser


# You must see the authentication alert box, put the user that you created and password

Mine isn't working, everything looks correct, but i ain't getting any image on my IP

Are you using Google Chrome? In that case; don't.

BoHerrmannsen5 months ago

did not work for me

just blank screen like there is nothing at the other end. on local lan even

carter545 months ago

Thanks for making such a clear and concise instruction which worked for me first time round. Other web sites have covered this but seemed to have got lost in bewildering complexity. Worked first time for me...thanks. Will try to find the instruction for making the feed visible over the web - securly.

sysnajar made it!5 months ago

Thanks for the super easy instructions. Really well written.


Screen Shot 2558-03-27 at 4.48.00 PM.png
dsaze6 months ago

When I try: 1.) sudo apt-get install motion

everything works perfectly fine except for a single "get" error (error shown in image below).


2) sudo nano /etc/motion/motion.conf (brings up a file with no text within)

3.) sudo service motion start (yields - "motion: unrecognized service")

raspberry pi error.JPG

you need to update your pi, execute the command sudo apt-get update

mk2001 dsaze5 months ago

The file was empty and the service wasnt recognised because the file did not download properly. Check your internet connection.

DhruvMC5 months ago

i made a gr8 wiimote control with

http://www.raspberrypi-spy.co.uk/2013/02/nintendo-wii-remote-python-and-the-raspberry-pi/ i combined it with this ITS AWESOMEEE....

ramgarden made it!10 months ago

I made one of these with the raspberry pi camera module and attached the pi and camera to our Makerbot Replicator2 3D printer so we could remotely watch our prints to check their progress. Thanks for these simple instructions!


Im doing the same thing but im mounting it over our rotary engraver!

1-40 of 87Next »