As wireless sensor networks have emerged as a exciting new area of research in Computer Science, many of the logistical challenges facing those who wish to develop, deploy, and debug applications on realistic large-scale sensor networks have gone unmet Manually reprogramming nodes, deploying them into the physical environment, and instrumenting them for data gathering is tedious and time-consuming. To address this need we have developed MoteLab, a Web-based sensor network testbed. MoteLab consists of a set of permanently-deployed sensor network nodes connected to a central server which handles reprogramming and data logging while providing a web interface for creating and scheduling jobs on the testbed. MoteLab accelerates application deployment by streamlining access to a large, fixed network of real sensor network devices; it accelerates debugging and development by automating data logging, allowing the performance of sensor network software to be evaluated offline. Additionally, by providing a web interface MoteLab allows both local and remote users access to the testbed, and its scheduling and quota system ensure fair sharing. We have developed and deployed MoteLab at Harvard and found it invaluable for both research and teaching. The MoteLab source is freely available, easy to install, and already in use at several other research institutions. We expect that widespread use of MoteLab will accelerate and improve wireless sensor network research.