Skip to content

nmasse-itix/Telegram-Photo-Album-Bot

Repository files navigation

The Photo-Album Bot for Telegram

Compilation

Pack all web files

go generate

Compile for your target platform (example given for a Raspberry PI 3).

GOOS=linux GOARCH=arm64 go build -o photo-bot

Create a Bot

Talk to BotFather to create your bot.

/newbot

Keep your bot token secure and safe!

Create an OpenID Connect client

Follow the steps described in Use your Google Account as an OpenID Connect provider to use your Google Suite with OpenID Connect.

Installation

On your Raspberry PI.

mkdir -p /opt/photo-bot/bin
mkdir -p /opt/photo-bot/etc
mkdir -p /srv/photo-bot
useradd -d /srv/photo-bot -s /bin/false -m -r bot
chown bot:bot /srv/photo-bot
scp photo-bot [email protected]:/opt/photo-bot/bin/

Create a file named photo-bot.yaml in /opt/photo-bot/etc/, using the provided config sample as a starting base.

Note: the Authentication and Encryption Keys can be created using openssl rand -base64 32

chown bot:bot /opt/photo-bot/etc/photo-bot.yaml
chmod 600 /opt/photo-bot/etc/photo-bot.yaml

Start the bot manually.

sudo -u bot /opt/photo-bot/bin/photo-bot

Create the startup script in /etc/init.d/photo-bot. A sample init script is provided in the init folder.

chmod 755 /etc/init.d/photo-bot
service photo-bot enable
service photo-bot start

Useful notes

Video autoplay is tricky:

Documentation

About

A Telegram Bot for collecting the photos of your children

Topics

Resources

Security policy

Stars

Watchers

Forks

Packages

No packages published