InstaPy – is an open source Automate Instagram.

Install

Install Docker

Ubuntu

1)
`#Install docker`       sudo apt install docker.io -y                                                                               
`#Start docker`         sudo systemctl start docker                                                                                 
`#Autostart docker`     sudo systemctl enable docker                                                                                

CentOS

1)
`#Install docker`       yum install docker -y                                                                                       
`#Start docker`         systemctl start docker                                                                                      
`#Autostart docker`     systemctl enable docker                                                                                     

Fedora

1)
`#Install docker`       sudo dnf install docker -y                                                                                  
`#Start docker`         sudo systemctl start docker                                                                                 
`#Autostart docker`     sudo systemctl enable docker                                                                                

Download InstaPy

2) sudo docker pull smied/instapy:latest `#Download/update image`

Create container from image

3) sudo docker run -d \
--name=InstaPy -e TZ=Europe/Moscow --restart=always                                                             `#Set your time zone` \
--volume /Docker/InstaPy/:/InstaPy/Data/                                                                        `#(For backup work)` \
--volume InstaPy-templates:/InstaPy/Templates/                                                                  `#(For backup work)` \
--tmpfs /tmp --tmpfs /run --tmpfs /run/lock                                                                     `#(For systemd work)` \
--volume /sys/fs/cgroup:/sys/fs/cgroup:ro                                                                       `#(For systemd work)` \
smied/instapy:latest

Edit template

template “quickstart.py”

4) docker exec -ti InstaPy nano /InstaPy/quickstart.py

or

enhanced template “template_main.py”

4) docker exec -ti InstaPy nano /InstaPy/Templates/template_main.py

or

nano /var/lib/docker/volumes/InstaPy-templates/_data/template_main.py

Start

template “quickstart.py”

5) docker exec -ti InstaPy bash
   python3 /InstaPy/quickstart.py

or

docker exec -ti InstaPy python3 /InstaPy/quickstart.py

enhanced template “template_main.py”

5) docker exec -ti InstaPy bash
   python3 /InstaPy/Templates/template_main.py

or

docker exec -ti InstaPy python3 /InstaPy/Templates/template_main.py

Cron

SHELL=/bin/bash
0 9 * * * sleep `expr $RANDOM \% 10`h `expr $RANDOM \% 10`m `expr $RANDOM \% 10`s; sudo docker exec InstaPy python3 /InstaPy/quickstart.py > /dev/null

or

SHELL=/bin/bash
0 9 * * * sleep `expr $RANDOM \% 10`h `expr $RANDOM \% 10`m `expr $RANDOM \% 10`s; sudo docker exec InstaPy python3 /InstaPy/quickstart.py |& tee -a /Docker/Scripts/Logs/InstaPy.log

or

SHELL=/bin/bash
0 9 * * * sleep `expr $RANDOM \% 10`h `expr $RANDOM \% 10`m `expr $RANDOM \% 10`s; sudo docker exec InstaPy python3 /InstaPy/Templates/template_main.py > /dev/null

or

SHELL=/bin/bash
0 9 * * * sleep `expr $RANDOM \% 10`h `expr $RANDOM \% 10`m `expr $RANDOM \% 10`s; sudo docker exec InstaPy python3 /InstaPy/Templates/template_main.py |& tee -a /Docker/Scripts/Logs/InstaPy.log

Cron for update InstaPy Docker

(every month on the 1st day at 00:00)

0 0 1 * * docker container rm --force InstaPy && sudo docker pull smied/instapy:latest && sudo docker run -d --name=InstaPy -e TZ=Europe/Moscow --restart=always --volume /Docker/InstaPy/:/InstaPy/Data/ --volume InstaPy-templates:/InstaPy/Templates/ --tmpfs /tmp --tmpfs /run --tmpfs /run/lock --volume /sys/fs/cgroup:/sys/fs/cgroup:ro smied/instapy:latest

Working through proxy

sudo docker run -d \
--name=InstaPy -e TZ=Europe/Moscow --restart=always                                                             `#Set your time zone` \
--volume /Docker/InstaPy/:/InstaPy/Data/                                                                        `#(For backup work)` \
--volume InstaPy-templates:/InstaPy/Templates/                                                                  `#(For backup work)` \
--tmpfs /tmp --tmpfs /run --tmpfs /run/lock                                                                     `#(For systemd work)` \
--volume /sys/fs/cgroup:/sys/fs/cgroup:ro                                                                       `#(For systemd work)` \
--env HTTP_PROXY="https://<IP>:<Port>" \
smied/instapy:latest

or

set in config (add to session = InstaPy)

proxy_address=proxy_host,
proxy_port=proxy_port,
proxy_username=proxy_username,
proxy_password=proxy_password,

Use Business Intelligence (KPI dashboard)

if you use enhanced template “template_main.py”

1) docker run -d \
 --name=Metabase -e TZ=Europe/Moscow --restart=always \
 --memory="1g" --cpus="1" \
 -p 3500:3000 \
 --volume /Docker/Metabase:/metabase.db \
 --volume /Docker/InstaPy/:/Volume \
 metabase/metabase
2) in Metabase settings add sqlite

/Volume/InstaPy/db/instapy_<YourAccount>.db

Use CLI

Help

instapy --help

Use

instapy -u USR -p PSW -f FILE/LINK -t 'TEXT CAPTION'

CLI Options

option required default description
-u yes username
-p yes password
-f yes file/media to upload
-t optional text caption for post
-s optional upload a story

Image Format

instapy-cli support images in the format of JPG/JPEG/PNG.

FAQ

Main

  1. Q. Where InstaPy folder?A. /usr/local/lib/python3.6/dist-packages/instapy – App/InstaPy/ – Databases, Logs, Templates

Instagram limits

  1. Likes
  2. Subscription/Unsubscribe
  3. Direct messages
  4. Comments
  5. Mentions
  6. Posts in the feed
  7. Blocking users

Likes

Age account Per hour Daily Mounthly
<3 months 15-20 450-550 16500
3 – 6 months 25-50 600-1200 36000
>6 months 35-50 1000-1200 36000

Subscription

Age account Per hour Daily Mounthly
<3 months 141 4000
3 – 6 months 300 6000
>6 months 300 6000

Unsubscribe

Age account Per hour Daily Mounthly
<3 months 30 720 21600
3 – 6 months 30 720 21600
>6 months 60 1440 43200

Direct messages

Age account Per hour Daily Mounthly
<3 months 3-5 20-30 900
3 – 6 months 10-15 30-40 1200
>6 months 15-20 40-50 1500

Comments

Age account Per hour Daily Mounthly
<3 months 20-30 450-550 16500
3 – 6 months 30-40 600-1200 36000
>6 months 40-50 1000-1200 36000

Mentions

Age account Per hour Daily Mounthly
<3 months 5 30 30000
3 – 6 months 5 30 30000
>6 months 5 60 60000

Posts in the feed

Age account Per hour Daily Mounthly
<3 months 2-3 90
3 – 6 months 2-3 90
>6 months 9-12 360

Blocking users

Age account Daily Interval
60 15-25 seconds

Issues

Issue Solution
OSError: [Errno 26] Text file busy: ‘/root/InstaPy/assets/gecko/v0.28.0/geckodriver-v0.28.0-linux64/geckodriver’ reboot container

 

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

Subscribe
Notify of
guest
0 комментариев
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x

Spelling error report

The following text will be sent to our editors: