- Command Line Options
- Configuration Parameters
- Usage Examples
- Settings Modified
- Troubleshooting
- Service Endpoints
- Advanced Configuration
- Security Considerations
Skip ngrok setup and validation. Use this option if you have:
- A public IP address with port forwarding configured
- An existing reverse proxy (nginx, Apache, Cloudflare Tunnel, etc.)
- A custom domain pointing to your server
Example:
./start-teratestnet.sh --no-ngrokDisplay usage information and available options.
Example:
./start-teratestnet.sh --helpThe script will prompt you for the following information:
With ngrok (default):
- Prompt: "Enter your ngrok domain (e.g., example.ngrok-free.app)"
- Format: Can be entered with or without
https://prefix - Examples:
mynode.ngrok-free.apphttps://mynode.ngrok-free.app
Without ngrok (--no-ngrok):
- Prompt: "Enter your domain/URL (e.g., teranode.example.com)"
- Format: Your public domain or IP address
- Examples:
teranode.example.comhttps://teranode.example.comnode.mydomain.org
The script automatically:
- Adds
https://prefix if not provided - Removes trailing slashes
- Separates domain from protocol for P2P configuration
- Prompt: "Enter RPC username"
- Purpose: Username for JSON-RPC authentication
- Requirements: Cannot be empty
- Example:
rpcuser
- Prompt: "Enter RPC password"
- Purpose: Password for JSON-RPC authentication
- Requirements:
- Cannot be empty
- Must be confirmed (entered twice)
- Hidden during input for security
- Prompt: "Enter Miner Tag (optional, press Enter to skip)"
- Purpose: Sets the
coinbase_arbitrary_stringin the configuration - Requirements:
- Optional field
- Warning shown if longer than 100 characters
- Example:
MyMiningNode-001
$ ./start-teratestnet.sh
====================================
Teratestnet Docker Helper Script
====================================
[INFO] Checking prerequisites...
[INFO] All prerequisites met.
=== Teratestnet Configuration ===
Enter your ngrok domain (e.g., example.ngrok-free.app): mynode.ngrok-free.app
[INFO] Processed ngrok URL:
- Full URL: https://mynode.ngrok-free.app
- Domain only: mynode.ngrok-free.app
Enter RPC username: alice
Enter RPC password: [hidden]
Confirm RPC password: [hidden]
Enter Miner Tag (optional, press Enter to skip): AliceNode-01
[INFO] Configuration summary:
- Ngrok Domain: mynode.ngrok-free.app
- Full URL: https://mynode.ngrok-free.app
- RPC Username: alice
- RPC Password: [hidden]
- Miner Tag: AliceNode-01
Is this correct? (y/n): y$ ./start-teratestnet.sh --no-ngrok
====================================
Teratestnet Docker Helper Script
(Running without ngrok)
====================================
[INFO] Checking prerequisites...
[INFO] All prerequisites met.
=== Teratestnet Configuration ===
Enter your domain/URL (e.g., teranode.example.com): teranode.mydomain.com
[INFO] Processed ngrok URL:
- Full URL: https://teranode.mydomain.com
- Domain only: teranode.mydomain.com
Enter RPC username: nodeoperator
Enter RPC password: [hidden]
Confirm RPC password: [hidden]
Enter Miner Tag (optional, press Enter to skip):
[INFO] Configuration summary:
- Domain: teranode.mydomain.com
- Full URL: https://teranode.mydomain.com
- RPC Username: nodeoperator
- RPC Password: [hidden]
Is this correct? (y/n): yThe script modifies the following settings in ../base/settings.conf:
| Setting | Description | Example Value |
|---|---|---|
asset_httpAddress |
Internal HTTP address for asset service | https://example.ngrok-free.app/api/v1 |
asset_httpPublicAddress |
Public HTTP address for asset service | https://example.ngrok-free.app/api/v1 |
rpc_user |
RPC authentication username | myuser |
rpc_pass |
RPC authentication password | mypassword |
coinbase_arbitrary_string |
Miner tag string (optional) | MyMiner-01 |
- Backup Created: The script automatically creates a backup of
settings.confbefore making changes - Backup Location:
settings.conf.backup.YYYYMMDD_HHMMSS
Error: "ngrok is not installed"
Solutions:
- Install ngrok following instructions in NGROK_PREREQUISITES.md
- Or use
--no-ngrokflag if you have your own domain/proxy
Error: "Cannot connect to the Docker daemon"
Solution:
# Linux
sudo systemctl start docker
# macOS/Windows
# Start Docker Desktop applicationError: "bind: address already in use"
Solution:
# Find process using the port
sudo lsof -i :8090
# Stop conflicting service or change port configurationError: "Passwords do not match"
Solution:
- Carefully re-enter the password
- Ensure no extra spaces or characters
Error: "Failed to start ngrok"
Solutions:
- Verify ngrok auth token:
ngrok config check - Check firewall allows outbound HTTPS (port 443)
- Try different ngrok region if timeouts occur
Docker Compose Status:
docker compose psNgrok Status (when using ngrok):
- Web interface: http://localhost:4040
- Shows active tunnels and request inspection
View Logs:
# All services
docker compose logs
# Specific service
docker compose logs blockchain# Stop Docker containers
docker compose down
# Stop ngrok (if running)
killall ngrok# Stop only Docker services (keep ngrok running)
docker compose stop
# Stop only ngrok (keep Docker running)
killall ngrok
# Stop specific Docker service
docker compose stop blockchainFor a complete cleanup:
# Stop and remove containers, networks, volumes
docker compose down -v
# Stop ngrok
killall ngrok
# Restore original settings (optional)
cp settings.conf.backup.YYYYMMDD_HHMMSS ../base/settings.confAfter successful startup, the following endpoints are available:
| Service | Endpoint | Description |
|---|---|---|
| RPC | https://[your-domain]:9292 |
JSON-RPC interface |
| Asset API | https://[your-domain]/api/v1 |
Asset service API |
| P2P | [your-domain] (no protocol) |
Peer-to-peer communication |
| Ngrok Dashboard | http://localhost:4040 |
Ngrok status (only with ngrok) |
| Prometheus | http://localhost:9090 |
Metrics collection |
| Grafana | http://localhost:3000 |
Metrics visualization |
You can override settings using environment variables:
# Override network setting
network=testnet ./start-teratestnet.sh
# Override log level
logLevel=DEBUG ./start-teratestnet.shTo manually edit settings after initial setup:
- Edit
../base/settings.conf - Restart services:
docker compose restart
If default ports conflict, modify the port mappings in docker-compose.yml before running the script.
-
RPC Credentials
- Use strong, unique passwords
- Never commit credentials to version control
- Consider using environment variables for production
-
Ngrok Security
- Free ngrok URLs are public
- Consider paid ngrok plan for reserved domains
- Implement additional authentication layers
-
Firewall Configuration
- Only expose necessary ports
- Use firewall rules to restrict access
- Consider VPN for administrative access
-
Backup Strategy
- Regularly backup data directories
- Test restore procedures
- Keep multiple backup versions
- Script Help:
./start-teratestnet.sh --help - Docker Issues: Check Docker documentation
- Ngrok Issues: Visit ngrok documentation
- Teranode Issues: Consult Teranode documentation