Authenticate with the ThreeFold Grid using your mnemonic phrase.
tfcmd loginThe login command provides an interactive authentication flow that prompts you for:
- Mnemonic phrase: Your 12 or 24-word seed phrase
- Network selection: Choose between mainnet, testnet, devnet, or QA network
$ tfcmd login
Enter your mnemonic phrase (12 or 24 words):Paste your mnemonic phrase when prompted. The phrase will be hidden for security.
Select network:
1) mainnet
2) testnet
3) devnet
4) qa
Enter choice (1-4):Choose the appropriate network for your deployment:
- mainnet: Production environment with real costs
- testnet: Testing environment with free resources
- devnet: Development environment
- qa: Quality assurance environment
Login successful! Configuration saved to ~/.config/tfgrid/config.yaml
Network: testnet
Twin ID: 192Your credentials and network selection are saved locally in:
~/.config/tfgrid/config.yaml
This file contains:
- Encrypted mnemonic phrase
- Selected network
- Twin ID (automatically retrieved)
- Account information
- Purpose: Production deployments
- Costs: Real TFT tokens required
- Resources: Full production capacity
- Use Case: Production applications and services
- Purpose: Testing and development
- Costs: Free testnet tokens
- Resources: Limited but sufficient for testing
- Use Case: Application testing and development
- Purpose: Development and experimentation
- Costs: Free
- Resources: Development environment
- Use Case: Feature development and debugging
- Purpose: Quality assurance and testing
- Costs: Free
- Resources: QA environment
- Use Case: Pre-production testing
- ✅ Never share your mnemonic with anyone
- ✅ Store it securely offline
- ✅ Use different mnemonics for different networks
- ❌ Don't commit to version control
- ❌ Don't share in screenshots or logs
- ✅ Locally stored on your machine only
- ✅ Encrypted at rest
- ✅ Permissions restricted to user only
- ❌ Don't share the config file
Error: invalid mnemonic phraseSolution: Verify your mnemonic phrase is correct (12 or 24 words)
Error: failed to connect to grid networkSolution: Check internet connection and network availability
Error: twin not found for this mnemonicSolution: Ensure you've created a twin on the selected network
If you need to reset your configuration:
# Remove configuration file
rm ~/.config/tfgrid/config.yaml
# Login again
tfcmd loginTo switch to a different network:
# Remove current configuration
rm ~/.config/tfgrid/config.yaml
# Login and select new network
tfcmd loginYou can set these environment variables to customize behavior:
# Override config location
export TFGRID_CONFIG_DIR=/custom/path
# Disable sentry error reporting
export TFGRID_DISABLE_SENTRY=trueFor multiple accounts, use different configuration directories:
# Account 1
TFGRID_CONFIG_DIR=~/.tfgrid/account1 tfcmd login
# Account 2
TFGRID_CONFIG_DIR=~/.tfgrid/account2 tfcmd loginAfter login, verify your configuration:
# Your twin ID is shown in login confirmation
# Or check with any command
tfcmd get contracts# Test basic connectivity
tfcmd list gateways name# Check you're on the right network
# (Different networks have different available resources)
tfcmd list gateways name --farm 1If you don't have mnemonics yet, you can:
- Use the ThreeFold Wallet Connector
- Create a new wallet
- Export your mnemonic phrase
- Use it with
tfcmd login
# 1. Use testnet for development
tfcmd login
# Select: testnet
# 2. Test deployments
tfcmd deploy vm --name test --ssh ~/.ssh/id_rsa.pub
# 3. Cleanup
tfcmd cancel --project-name vm/test# 1. Use mainnet for production
tfcmd login
# Select: mainnet
# 2. Verify TFT balance
# (Check your wallet has sufficient TFT)
# 3. Deploy production resources
tfcmd deploy vm --name prod --ssh ~/.ssh/id_rsa.pub --cpu 4 --memory 8- Mnemonic stored securely offline
- Different mnemonics for mainnet/testnet
- Config file permissions set correctly
- Regular backup of configuration
- Never share credentials in logs/screenshots
If you encounter issues:
- Check network connectivity
- Verify mnemonic phrase
- Ensure twin exists on selected network
- Try resetting configuration
- Contact ThreeFold support
For more information about mnemonics and wallet setup, see the ThreeFold documentation.