# Duplicati and Telegram

**URL:** <https://forum.duplicati.com/t/duplicati-and-telegram/6282>\
**Category:** Features\
**Created:** [February 7, 2019, 8:40am UTC](https://forum.duplicati.com/t/duplicati-and-telegram/6282 "2019-02-07T08:40:32Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![bd8392](https://forum.duplicati.com/user_avatar/forum.duplicati.com/bd8392/32/4208_2.png) [@bd8392](https://forum.duplicati.com/u/bd8392)\
**Post date:** [April 7, 2020, 9:03pm UTC](https://forum.duplicati.com/t/duplicati-and-telegram/6282/19 "2020-04-07T21:03:46Z")

</div>

@ts678 OMG THANK YOU THANK YOU TAHNK YOU =) It’s working =) I’m very happy with the result =) Here is the step by step guide =):

**1) Install docker and the aprise appi with the following config**

```
version: '3.3'
services:

  apprise:
    image: caronc/apprise:latest

version: '3.3'
services:
  duplicati:
    image: linuxserver/duplicati:latest
    environment:
      PGID: '0'
      PUID: '0'
      TZ: Europe/Vienna
    ports:
     - 8200:8200
    volumes:
     - somevolume/config
     - backupvolume/backup
     - sourcevolume/source

```

**2) Write a script for the aprise api (thanks to ts678 and all his effort getting this going) =)**

```
#!/bin/bash
curl -s -X POST -d "{\"urls\":\"tgram://apikey/chatid/\", \"body\":\"${DUPLICATI __PARSED_RESULT} with ${DUPLICATI__ OPERATIONNAME}, Backupname: ${DUPLICATI__backup_name}\", \"title\":\"Duplicati_Rancher_Home\"}" -H "Content-Type: application/json" http://apprise:8000/notify
exit 0

```

you can adjust the url to your notification-needs with this guide: [Home · caronc/apprise Wiki · GitHub](https://github.com/caronc/apprise/wiki#notification-services)  
so you can choose any notification you want! Be carefull with the json format…it’s very sensitive!  
Just include exit 0 so duplicati doesn’t complain about exiting with error 255

**3) Upload the script to /config/scripts directory INSIDE the linuxserver/duplicati docker-container**  
(If you scripted it on windows, install dos2unix (on wsl or on another unix machine) first, and convert the file before uploading!) use the following command:

```
dos2unix [nameofscript]

```

after uploading, set the script executable INSIDE the container:

```
docker exec duplicati chmod +x /conf/scripts/nameofscript

```

**4) Specify a Backupjob with the following advanced options:**

```
--run-script-after=/config/scripts/nameofscript

```

you can also specify it globally under the settings page, and set the advanced option there. If you do this, it’s applied to all your jobs.

**5) ENJOY =)**  
Thanks again to @ts678 who putted a lot of effort in this =) and saarg from linuxserver/duplicati who helped here: [Setup a --run-script-after in duplicati - Container Support - LinuxServer.io](https://discourse.linuxserver.io/t/setup-a-run-script-after-in-duplicati/1303/19)

---

_[View the full topic](https://forum.duplicati.com/t/duplicati-and-telegram/6282)._
