Skip to content

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
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM sentryshot/sentryshot:latest
# Environment variables
ENV SENTRYSHOT_CONFIG_PATH=/config/sentryshot.yaml
ENV SENTRYSHOT_STORAGE_PATH=/recordings
ENV TZ=${TZ:-UTC}
# Create directories
RUN mkdir -p /config /recordings
# Copy configuration
COPY config/sentryshot.yaml /config/sentryshot.yaml
# Expose the web interface port
EXPOSE 2020
# Data volumes
VOLUME ["/config", "/recordings"]

Creating the Configuration File

Create config/sentryshot.yaml:

# SentryShot Configuration
general:
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: true

Environment Variables Reference

VariableRequiredDefaultDescription
ADMIN_PASSWORDYes-Password for web interface
TZNoUTCTimezone for timestamps
SENTRYSHOT_CONFIG_PATHNo/config/sentryshot.yamlPath to configuration file
SENTRYSHOT_STORAGE_PATHNo/recordingsPath for video storage

Deploying SentryShot on Klutch.sh

    Push Your Repository to GitHub

    Initialize and push your repository:

    Terminal window
    git init
    git add Dockerfile config/ .dockerignore
    git commit -m "Initial SentryShot deployment configuration"
    git remote add origin https://github.com/yourusername/sentryshot-deploy.git
    git push -u origin main

    Create 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:

    • Select HTTP as the traffic type
    • Set the internal port to 2020

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    ADMIN_PASSWORDSecure admin password
    TZYour timezone (e.g., America/New_York)

    Attach Persistent Volumes

    Add the following volumes:

    Mount PathRecommended SizePurpose
    /recordings100+ GBVideo recordings storage
    /config1 GBConfiguration 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

  1. Log in to the web interface
  2. Navigate to Settings > Cameras
  3. Click Add Camera
  4. Enter camera details:
    • Name
    • RTSP URL (e.g., rtsp://user:pass@192.168.1.100:554/stream)
    • Enable/disable options
  5. Save and test the connection

Configuring Motion Detection

  1. Select a camera in settings
  2. Enable Motion Detection
  3. Adjust sensitivity settings
  4. Define detection zones if supported
  5. Configure notification actions

Storage Management

  1. Go to Settings > Storage
  2. Configure retention period
  3. Set disk usage limits
  4. 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.