RunPod CLI (runpodctl) fails on Termux with DNS resolution errors because:
- Termux doesn't have
/etc/resolv.conf(uses Android's DNS) - Go binaries try to use localhost (::1) as DNS server
- Missing certificate paths that Linux programs expect
Use proot to map Termux paths to standard Linux paths.
# Download and install runpodctl (adjust URL as needed)
curl -L https://github.com/runpod/runpodctl/releases/latest/download/runpodctl-linux-arm64 -o ~/.local/bin/runpodctl
chmod +x ~/.local/bin/runpodctlrunpodctl config --apiKey YOUR_API_KEY_HEREpkg update
pkg install proot dnsutils -y# Backup original binary
mv ~/.local/bin/runpodctl ~/.local/bin/runpodctl.original
# Create wrapper script
cat > ~/.local/bin/runpodctl << 'EOF'
#!/data/data/com.termux/files/usr/bin/bash
# DNS fix wrapper using proot for Termux
mkdir -p $PREFIX/etc 2>/dev/null
echo "nameserver 8.8.8.8" > $PREFIX/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $PREFIX/etc/resolv.conf
exec proot -b $PREFIX/etc/resolv.conf:/etc/resolv.conf \
-b $PREFIX/etc/tls/cert.pem:/etc/ssl/certs/ca-certificates.crt \
/data/data/com.termux/files/home/.local/bin/runpodctl.original "$@"
EOF
# Make wrapper executable
chmod +x ~/.local/bin/runpodctlrunpodctl get podThe wrapper script:
- Creates a resolv.conf with Google DNS servers
- Uses proot to bind mount it to
/etc/resolv.conf - Maps Termux's certificates to standard Linux location
- Executes the original runpodctl with proper DNS/cert paths
If runpodctl still fails, use curl directly:
# Get your info
curl -X POST https://api.runpod.io/graphql?api_key=YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"query":"{ myself { id email } }"}'
# List pods
curl -X POST https://api.runpod.io/graphql?api_key=YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"query":"{ pod { id name status } }"}'