Deploying SentryShot
Introduction
SentryShot is a lightweight, self-hosted video surveillance system designed for simplicity and efficiency. It provides continuous recording, motion detection, and a clean web interface for monitoring IP cameras and other video sources. Built with a focus on low resource usage, SentryShot can run effectively on modest hardware while still providing essential security monitoring features.
Written in Rust for performance and reliability, SentryShot offers a modern approach to video surveillance without the complexity of enterprise NVR systems. The application supports RTSP streams from IP cameras, USB cameras, and can integrate with various video sources.
Key highlights of SentryShot:
- Continuous Recording: 24/7 recording with configurable retention
- Motion Detection: Built-in motion detection with customizable sensitivity
- Live Streaming: Real-time camera viewing through the web interface
- Multi-Camera Support: Monitor multiple cameras simultaneously
- Event Recording: Triggered recording based on motion or external events
- Web Interface: Modern, responsive UI for camera management
- Low Resource Usage: Efficient Rust implementation for minimal overhead
- RTSP Support: Compatible with standard IP cameras
- Timeline View: Browse recordings with an intuitive timeline
- 100% Open Source: Licensed under GPL-3.0
This guide walks through deploying SentryShot on Klutch.sh using Docker, configuring cameras, and setting up video surveillance.
Why Deploy SentryShot on Klutch.sh
Deploying SentryShot on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh handles container orchestration without complex NVR setup.
Persistent Storage: Attach persistent volumes for video recordings that survive restarts.
HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure remote monitoring.
Scalable Resources: Allocate CPU and memory based on camera count and recording quality.
Remote Access: Access your cameras from anywhere through the secure web interface.
Prerequisites
Before deploying SentryShot on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your SentryShot configuration
- Basic familiarity with Docker and containerization concepts
- IP cameras with RTSP support on an accessible network
- Understanding of your cameras’ RTSP URLs and credentials
Network Considerations
For SentryShot to access your cameras:
- Cameras must be accessible from the Klutch.sh deployment
- Options include:
- Cameras with public IPs (not recommended for security)
- VPN connection between Klutch.sh and your camera network
- Cloud-managed cameras with accessible RTSP streams
Preparing Your Repository
Create a GitHub repository with your SentryShot configuration.
Repository Structure
sentryshot-deploy/├── Dockerfile├── config/│ └── sentryshot.yaml└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository:
FROM sentryshot/sentryshot:latest
# Environment variablesENV SENTRYSHOT_CONFIG_PATH=/config/sentryshot.yamlENV SENTRYSHOT_STORAGE_PATH=/recordingsENV TZ=${TZ:-UTC}
# Create directoriesRUN mkdir -p /config /recordings
# Copy configurationCOPY config/sentryshot.yaml /config/sentryshot.yaml
# Expose the web interface portEXPOSE 2020
# Data volumesVOLUME ["/config", "/recordings"]Creating the Configuration File
Create config/sentryshot.yaml:
# SentryShot Configurationgeneral: timezone: "UTC" storage_path: "/recordings"
web: port: 2020 username: "admin" password: "${ADMIN_PASSWORD}"
cameras: []# Cameras are typically configured via the web interface# Example camera configuration:# - name: "Front Door"# source: "rtsp://user:pass@192.168.1.100:554/stream1"# enabled: true# motion_detection: trueEnvironment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
ADMIN_PASSWORD | Yes | - | Password for web interface |
TZ | No | UTC | Timezone for timestamps |
SENTRYSHOT_CONFIG_PATH | No | /config/sentryshot.yaml | Path to configuration file |
SENTRYSHOT_STORAGE_PATH | No | /recordings | Path for video storage |
Deploying SentryShot on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 2020
Push Your Repository to GitHub
Initialize and push your repository:
git initgit add Dockerfile config/ .dockerignoregit commit -m "Initial SentryShot deployment configuration"git remote add origin https://github.com/yourusername/sentryshot-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project with a descriptive name like “sentryshot” or “surveillance”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select your SentryShot repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Add the following environment variables:
| Variable | Value |
|---|---|
ADMIN_PASSWORD | Secure admin password |
TZ | Your timezone (e.g., America/New_York) |
Attach Persistent Volumes
Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/recordings | 100+ GB | Video recordings storage |
/config | 1 GB | Configuration and database |
Deploy Your Application
Click Deploy to start the build process.
Access SentryShot
Once deployment completes, access your SentryShot instance at https://your-app-name.klutch.sh.
Initial Configuration
Adding Cameras
- Log in to the web interface
- Navigate to Settings > Cameras
- Click Add Camera
- Enter camera details:
- Name
- RTSP URL (e.g.,
rtsp://user:pass@192.168.1.100:554/stream) - Enable/disable options
- Save and test the connection
Configuring Motion Detection
- Select a camera in settings
- Enable Motion Detection
- Adjust sensitivity settings
- Define detection zones if supported
- Configure notification actions
Storage Management
- Go to Settings > Storage
- Configure retention period
- Set disk usage limits
- Enable automatic cleanup
Viewing Recordings
Live View
- Click on a camera to view live stream
- Use the grid view for multiple cameras
Timeline
- Navigate to Recordings
- Use the timeline to browse by date/time
- Click events to view recorded clips
Downloading Clips
- Select a time range in the timeline
- Click Download to export the clip
Troubleshooting
Camera Not Connecting
Symptoms: Camera shows offline or no video.
Solutions:
- Verify RTSP URL is correct
- Check camera credentials
- Ensure network connectivity between Klutch.sh and cameras
- Test RTSP URL with VLC or similar player
Recordings Not Saving
Symptoms: Live view works but no recordings appear.
Solutions:
- Verify storage volume is mounted
- Check available disk space
- Review logs for write errors
- Ensure correct permissions on storage directory
High CPU Usage
Symptoms: System is slow or unresponsive.
Solutions:
- Reduce camera resolution
- Lower frame rate
- Disable motion detection on some cameras
- Allocate more resources
Additional Resources
Conclusion
Deploying SentryShot on Klutch.sh gives you a lightweight but capable video surveillance system. With continuous recording, motion detection, and a modern web interface, you can monitor your cameras from anywhere while maintaining complete control over your video data.