Crosspost from Twitter to Mastodon (based on Nitter)
- Twitter crawling is based on Nitter, so only public accounts are supported.
- Supported tweet types
- Text
- Retweet
- Image
- Replies to your own Tweet
- Video
The easiest way to use this application is to run it as a docker compose service on your NAS or a VPS.
You need to create a developer application on your Mastodon instance first
- Go to
https://<your-mastodon-instance>/settings/applications/new
- On the form, put
minalinsky
forApplication name
- Under
Scopes
, uncheckread
,write
andfollow
checkboxes. Checkwrite:media
andwrite:statuses
checkboxes. - Click
Submit
- Go to
https://<your-mastodon-instance>/settings/applications
and click theminalinsky
application you just created - You will need the following
Client key
Client secret
Your access token
It's also strongly advised to obtain a burner Twitter account in order to crawl your own Twitter account. Do not enable 2FA for your burner Twitter account.
After obtaining the credentials, you can use the following docker-compose.yml
to run the application
services:
nitter:
image: ghcr.io/sekai-soft/nitter-self-contained
container_name: nitter
volumes:
- nitter:/nitter-data
environment:
TWITTER_USERNAME: <ENTER YOUR BURNER TWITTER USERNAME HERE>
TWITTER_PASSWORD: <ENTER YOUR BURNER TWITTER PASSWORD HERE>
NITTER_ACCOUNTS_FILE: /nitter-data/guest_accounts.json
DISABLE_NGINX: "1"
INSTANCE_HOSTNAME: nitter
INSTANCE_PORT: "80"
restart: unless-stopped
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:80 || exit 1
interval: 5s
timeout: 5s
retries: 12
minalinsky:
image: ghcr.io/sekai-soft/minalinsky:latest
volumes:
- minalinsky:/app/dbs
# - ./post.sh:/app/post.sh # you can optionally mount a shell script at /app/post.sh to run after every Nitter crawl to perform tasks such as sending a heartbeat
environment:
SQLITE_FILE: /app/dbs/db.db
NITTER_HOST: nitter
NITTER_HTTPS: 'false'
TWITTER_HANDLE: <REPLACE WITH YOUR TWITTER USERNAME, WITHOUT @>
MASTODON_HOST: <REPLACE WITH YOUR MASTODON INSTANCE, e.g. mastodon.ktachibana.party>
MASTODON_CLIENT_ID: <REPLACE WITH YOUR MASTODON CLIENT KEY>
MASTODON_CLIENT_SECRET: <REPLACE WITH YOUR MASTODON CLIENT SECRET>
MASTODON_ACCESS_TOKEN: <REPLACE WITH YOUR MASTODON ACCESS TOKEN>
MASTODON_STATUS_LIMIT: '10' # set the maximum of statuses to be posted at once
restart: unless-stopped
volumes:
nitter:
minalinsky:
This will crawl your Twitter account every 5 minutes, and crosspost the tweets to your Mastodon account.
Copy .example.env
to .env
and fill its content
docker compose up --build
Copy .example.nitterless.env
to .env
and fill its content
docker compose -f docker-compose.nitterless.yml up --build
python -m unittest discover