Table of contents
If you really want, you can host your own instance of Patched Porobot.
Requirements
- Docker Engine
- Docker Compose
- A reverse proxy
- A domain name (for proxying converted images to Telegram)
Installation
- Create and access a directory on the host machine:
mkdir my-porobot cd my-porobot
Discord
-
Create an application at the Discord Developer Portal, and store its Application ID.
-
In the Installation tab, set Installation Contexts to Guild Install.
-
In the Installation tab, set Default Install Settings to scopes
applications.commands, and no permissions. -
In the Bot tab, press Reset Token, and store the generated string.
Telegram
- Create a bot at @BotFather, and store its API token.
Reverse proxy
-
Set up your reverse proxy of choice so that it redirects incoming traffic to your domain name to
127.0.0.1:8080. -
Make sure TLS certificates have been set up, and that HTTPS is available.
Docker
-
Create a new
compose.ymlfile with the following contents, replacing the values ofIMGPROXY_HOSTwith your domain name,IMGPROXY_KEYandIMGPROXY_SALTwith a random string,TELOXIDE_TOKENwith the token you got from @BotFather,SERENITY_APPIDwith the Discord Application ID, andSERENITY_TOKENwith the Discord Bot token:services: imgproxy: image: ghcr.io/imgproxy/imgproxy:v4.0.14 ports: - name: "imgproxy-http" protocol: tcp app_protocol: http host_ip: 127.0.0.1 target: 8080 published: 8080 restart: unless-stopped environment: &imgproxy_env IMGPROXY_HOST: "https://YOURPUBLICDOMAIN.example" IMGPROXY_KEY: "SOME-RANDOM-STRING" IMGPROXY_SALT: "ANOTHER-RANDOM-STRING" telegram: image: g.starshard.space/steffo/patched_porobot_telegram:latest restart: unless-stopped environment: <<: *imgproxy_env TELOXIDE_TOKEN: "0000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" discord: image: g.starshard.space/steffo/patched_porobot_discord:latest restart: unless-stopped environment: SERENITY_APPID: "123456789" SERENITY_TOKEN: "AAAAAAAAAAAAAAAAAAAAAAAAAA.BBBBBB.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC" -
Run the bots:
docker compose up -d