Skip to main content

Start with Security-Cam

Now that you have set up your Raspberry Pi, you can start with the Security-Cam project.

Run:

cd /opt/security-cam
sudo chmod +x start.sh
sudo ./start.sh

Setup

warning

⚠️ DONT FOLLOW THESE STEPS YET. ⚠️ The following steps are subject to change. They are based on the current state of the project and may be outdated. Since the project is still in development, the setup process may change in the future.

Allow pi to Run chmod Without Password:

sudo visudo

Add the following line:

pi ALL=(ALL) NOPASSWD: /bin/chmod +x /opt/security-cam/start.sh

Create the Service File

sudo bash -c 'cat <<EOF > /etc/systemd/system/security-cam.service
[Unit]
Description=Security Cam Flask and Node.js Servers
After=network.target

[Service]
Type=simple
User=pi
WorkingDirectory=/opt/security-cam
ExecStartPre=/usr/bin/sudo /bin/chmod +x /opt/security-cam/start.sh
ExecStart=/opt/security-cam/start.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target
EOF'

Reload the systemd manager configuration

sudo systemctl daemon-reload

Enable the service to start on boot

sudo systemctl enable security-cam.service

Start the service

sudo systemctl start security-cam.service

Check the status of the service

sudo systemctl status security-cam.service

You should now be able to access the Security-Cam web interface by navigating to http://<raspberry-pi-ip>:5000 in your web browser.

The ip address of your Raspberry Pi can vary. If you are connected to the Raspberry Pi's AP and you have followed the instructions on how to set it up, you can access the web interface by navigating to http://192.168.10.1:5000 in your web browser. If you are connected to the same network as the Raspberry Pi, you can find the ip address by running hostname -I on the Raspberry Pi.