This repository provides tools to help you obtain a valid Mastodon endpoint
for node deployment with a Mastodon worker at the RSS3 Explorer.
- Automated Mastodon Instance Deployment: Quick setup of a new Mastodon instance.
- Manual Mastodon Instance Modification: Modify an existing Mastodon instance.
Both options will guide you through the initial setup. Once completed, you'll obtain a valid Mastodon endpoint necessary for the RSS3 node deployment with a Mastodon worker at the RSS3 explorer.
For users who want to quickly set up a new Mastodon instance with RSS3 node integration. It provides:
- A straightforward setup process for a ready-to-use Mastodon instance
- Pre-configured services, allowing your instance to receive messages from fediverse
This approach is ideal for those who want a simple solution that's operational right after deployment, with built-in connectivity to the wider Mastodon network.
- A server with a
public IP
address - A
domain name
pointing to your server's IP - Sufficient server hardware resources:
- At least 2 CPU cores
- Minimum 4GB RAM (8GB recommended)
- At least 50GB of storage space (80GB recommended)
- Open ports:
80 (HTTP)
,443 (HTTPS)
,9092 (Kafka)
- Configure domain's DNS settings:
Set up an A record for your domain (e.g., mastodon.yourdomain.com
) pointing to your server's public IP address.
-
Clone this repository:
git clone https://github.com/RSS3-Network/Mastodon-Instance-Kit.git cd Mastodon-Instance-Kit
-
Set the required environment variables:
export POSTGRES_PASSWORD='your_secure_db_password' export REDIS_PASSWORD='your_secure_redis_password' export LETS_ENCRYPT_EMAIL='your_certificate_management_email'
-
Run the deployment script:
chmod +x deploy_mastodon.sh ./deploy_mastodon.sh
-
Follow the prompts to enter any required information.
-
After successful deployment, you'll receive:
- The URL of your Mastodon instance
- Admin account credentials (admin username and password)
-
Wait for your instance to be ready
- The SSL setup process may take up to to a few minutes. Please be patient and frequently check your domain status.
- The admin account is created automatically for your convenience, but it's crucial to change the password upon first login.
- Review and adjust the instance settings as needed.
- The deployment uses multiple Docker services. If you need to troubleshoot, you can check logs for specific services using:
docker-compose logs [service_name]
- Rate Limit Error - Let's Encrypt is refusing to issue a new certificate because you've reached the limit for this domain
rm -rf /data/caddy/certificates
docker-compose restart caddy
For users who already have a Mastodon instance and want to integrate it with RSS3 node.
Add the following services to your docker-compose.yaml
:
zookeeper:
image: bitnami/zookeeper:latest
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOO_ENABLE_AUTH: true
kafka:
image: bitnami/kafka:latest
ports:
- "9092:9092"
env_file:
- .env.production
depends_on:
- zookeeper
kafka_sender:
image: ghcr.io/rss3-network/mastodon-instance-kit:main-04b2b41a70753d3c4a1dcde70de4ddc7abf5cd79
restart: always
ports:
- '3001:3001'
depends_on:
- kafka
env_file:
- .env.production
Add the following environment variables to your .env.production
file:
# Kafka settings
KAFKA_ADVERTISED_HOST=your_mastodon_instance_ip
KAFKA_BROKER_ID=1
KAFKA_TOPIC=activitypub_events
KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092
KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://${KAFKA_ADVERTISED_HOST}:9092
KAFKA_BROKER=kafka:9092
Replace your_mastodon_instance_ip
with your actual Mastodon instance IP.
Run the following command to start the new services:
docker-compose up kafka zookeeper kafka_sender
Make sure your Proxy Server setup forwards requests from /inbox
to the service running on localhost
at port 3001
.
After making these adjustments, restart Nginx to apply the changes.
Congratulations! You now have a valid Mastodon endpoint for your RSS3 node.
Your Mastodon endpoint is: instance_external_ip:9092
Now that you have your Mastodon endpoint, you can proceed with the RSS3 node deployment:
- Return to the RSS3 Explorer.
- If you haven't started the node deployment process, begin it now.
- During the configuration step, you'll be asked to set up workers for your node.
- Choose to add a Mastodon worker.
- When prompted for a Mastodon endpoint, enter your endpoint:
your_external_ip:9092
. - Complete the remaining steps as guided by the RSS3 Explorer.
- Ensure your firewall allows incoming connections on port 9092.
- If you encounter any issues during the RSS3 node deployment, double-check your Mastodon endpoint and review the integration steps.
- For Mastodon-related questions, refer to the official Mastodon documentation.
- For RSS3-specific inquiries, check the RSS3 documentation.
- If you encounter any issues with this integration, please open an issue in this repository.