Hardware Prerequisites
Required Hardware
🔒 Intel SGX Support
- Intel SGX 2.0+ enabled CPU required
- Hardware-level security enclave
- Secure computation environment
💻 Compatible Processors
- 11th Gen+ Intel Core series
- Modern Intel Xeon processors
- Must have SGX feature enabled in BIOS
Verify your CPU supports Intel SGX 2.0 or higher before setting up mining operations. The SGX feature must also be enabled in your system BIOS.
Cloud Provider Recommendations
For optimal TEE mining performance and reliability, we recommend using Microsoft Azure. This provider has been extensively tested and validated by our team to ensure seamless compatibility with Masa Network’s TEE mining requirements:Microsoft Azure
✓ Offers SGX-enabled virtual machines
✓ Proven reliability for TEE workloads
✓ Validated for Masa Network mining
✓ Our recommended provider
✓ Proven reliability for TEE workloads
✓ Validated for Masa Network mining
✓ Our recommended provider
Alibaba Cloud
✗ Not supported for TEE mining
✗ Uses outdated SGX API (v3)
✗ Incompatible with Masa requirements
✗ Please use Azure or other validated providers
✗ Uses outdated SGX API (v3)
✗ Incompatible with Masa requirements
✗ Please use Azure or other validated providers
Azure instance capacity planning
When running TEE miners on Azure, it’s important to understand the capacity limits to optimize costs and performance. Here’s what we’ve validated:Instance Specifications
Standard DC4s v2
- 4 vCPUs
- 16 GiB Memory
- SGX-enabled
Miner Capacity
- Maximum 4 TEE miners per instance
- 1 miner per vCPU recommended
- Attempting to run >4 miners causes automatic termination
System Setup & Configuration
Prerequisites
Before starting TEE mining operations, ensure you have:Docker Setup
✓ Docker installed and running
✓ Permissions to run containers
✓ Permissions to run containers
Network Keys
✓ BTCLI to installation to manage your wallet
✓ Generate coldkey and hotkey mnemonics and register your miner
✓ Generate coldkey and hotkey mnemonics and register your miner
Installing the Bittensor BTCLI
Installing the Bittensor BTCLI
- masOS and Linux
- Windows
To install the BTCLI please follow the Bittensor BTCLI docs.
Installing Docker
Installing Docker
- Linux
- Windows
To install Docker, follow these steps:Linux:After running these commands, restart your system for the changes to take effect.Verify installation by running:
Generate coldkey and hotkey mnemonics and register your miner
Generate coldkey and hotkey mnemonics and register your miner
Creating your wallet mnemonics and register your miner
Follow these steps to create your wallet keys and register as a miner on the network. You’ll need to generate both a coldkey (for secure storage) and hotkey (for active mining operations).Create a Hot Wallet
Next, create a hot wallet for your cold wallet:
Make sure to use the same wallet name (miner) that you used in Step 1.
Verify Your Wallets
Finally, verify that both wallets were created successfully:You should see your
miner wallet listed, along with its associated hotkey (default).Register Your Node
Register your node as a miner on the subnet:
This command will:
Replace the —netuid with 42 for mainnet or 165 for testnet
- Configure your node as a miner
- Set up the necessary network connections
Verify Registration
Check that your miner is properly registered on the subnet:This command will display the subnet metagraph, showing:
Replace the —netuid with 42 for mainnet or 165 for testnet
- All registered nodes and their roles
- Your miner’s status and registration
- Current network topology
Look for your hotkey address in the output to confirm successful registration. If you don’t see your node listed, wait a few minutes and try again.
Keep your coldkey and hotkey mnemonics secure and backed up. These are required for mining operations and cannot be recovered if lost.
Subnet 42 Miner setup
To begin mining on Subnet 42, follow these steps:Clone Repository
First, clone the Subnet 42 repository which contains the docker compose file and .env example:
Edit Environment File
Wallet Setup - you can add either your mnemonics, or load your wallet from disk:orNext, add your role and network configuration:Finally, add credentials for your TEE worker:
Start Your Node
Start your node with Docker Compose:This will:
- Launch the required containers for your node type
- Initialize your miner node
- Initialize your TEE worker
- Connect to the subnet network
Verify TEE Worker
Once your node is running, verify the TEE worker is accessible by visiting your configured address in a browser:You should see a response indicating the TEE worker is running. If you get a connection error:
- Verify your IP address is correct in the .env file
- Check that port 8080 is open in your firewall
- Ensure the TEE worker container is running properly
The browser may show a security warning due to the self-signed certificate. This is expected and you can proceed to verify the endpoint is responding.
Apify Support
Miners are able to support various Apify actors by setting anAPIFY_API_KEY in your .env file. This will give you default access to the Apify API. Gopher supports the following actors - it is the miner’s responsibility to rent the actor if needed!
trudax~reddit-scraperepctex~tiktok-search-scraperlexis-solutions~tiktok-trending-videos-scraperdusan.vystrcil~llm-dataset-processorkaitoeasyapi~premium-x-follower-scraper-following-dataapify~website-content-crawler
LLM Support
Some jobs include additional LLM processing, such asweb scraper jobs. Miners may add either a CLAUDE_API_KEY or GEMINI_API_KEY to their .env file to support this type of work.
Cookie Management
If you haveTWITTER_ACCOUNTS defined in your .env file, you need to provide relevant cookies in the .masa folder of your TEE worker. Each JSON file must be named with the username of the account and a _twitter_cookies.json suffix.(This will of course soon change to .gopher)
Gopher provides helpful tools via Docker commands, and a Python script built with Chromium here.
Upgrading your miner
Frequently Asked Questions
⚙️ Setup & Configuration
Can I run multiple miners on the same instance?
Can I run multiple miners on the same instance?
Yes, multiple miners can run on the same machine. However, each miner must have its own TEE worker. A single TEE worker cannot be shared across multiple miners.
How many miners can I run per instance?
How many miners can I run per instance?
The number of miners per instance depends on the system resources and performance considerations. Each miner needs its own TEE worker, so the setup must account for computational capacity.
Can I use a single scraper for multiple miners?
Can I use a single scraper for multiple miners?
No, the scraper (worker) is tied to a specific miner’s TEE worker. Each miner must have its own dedicated scraping logic within its TEE environment.
Do I need separate Twitter/X accounts per miner?
Do I need separate Twitter/X accounts per miner?
Yes, but a miner can have multiple Twitter accounts/API keys assigned. It can be X/Twitter accounts you scrape and/or X/Twitter API accounts. We recommend the Twitter API Pro tier for full-archive search. or a combination of tiers for higher stability.
Can I authenticate via Twitter/X API instead of premium account scraing with logins?
Can I authenticate via Twitter/X API instead of premium account scraing with logins?
Should I invest in a Twitter API subscription?
Should I invest in a Twitter API subscription?
Yes, it is recommended to consider Twitter/X API Pro or a combination of tiers. This provides better access to full-archive search, improves data reliability, and reduces the risk of scraping failures.
Will miners be able to share TEE workers in the future?
Will miners be able to share TEE workers in the future?
How does Twitter/X data access affect performance?
How does Twitter/X data access affect performance?
Both stable authentication and reliable data access are critical for miner performance and rewards. Your miner’s ability to consistently return high-quality Twitter/X data impacts scoring. Poor performance can result from:
- Authentication failures
- Slow response times
- Missing or incomplete data
- Rate limiting issues
- API quota exhaustion
- Basic Tier ($100/month)
- Good starting point for testing
- Limited to 500k tweets/month
- Recent search only (7 days)
- Pro Tier ($5000/month)
- Full archive search access
- Up to 1M tweets/month
- Higher rate limits
- More reliable for production