$ ├── termux/ # Linux environment on Android
│ ├── sshd # SSH server for remote access
│ ├── nginx # Reverse proxy
│ └── go-services/ # Internal API services
├── USB Ethernet adapter # Stable wired LAN connection
├── Charge control daemon # Prevents battery swell (80% cap)
└── Vosk + SileroTTS # Voice interface (bonus)
├── termux/ # Linux environment on Android
│ ├── sshd # SSH server for remote access
│ ├── nginx # Reverse proxy
│ └── go-services/ # Internal API services
├── USB Ethernet adapter # Stable wired LAN connection
├── Charge control daemon # Prevents battery swell (80% cap)
└── Vosk + SileroTTS # Voice interface (bonus)
├── termux/ # Linux environment on Android
│ ├── sshd # SSH server for remote access
│ ├── nginx # Reverse proxy
│ └── go-services/ # Internal API services
├── USB Ethernet adapter # Stable wired LAN connection
├── Charge control daemon # Prevents battery swell (80% cap)
└── Vosk + SileroTTS # Voice interface (bonus)
# Check which USB devices are recognized
lsusb # If your Ethernet adapter isn't showing up, you need kernel modules
# Check what's currently loaded
lsmod | grep -i cdc # For ASIX-based adapters (common in TP-Link USB hubs)
# You'll need to recompile with CONFIG_USB_NET_AX88179_178A=y
# Check which USB devices are recognized
lsusb # If your Ethernet adapter isn't showing up, you need kernel modules
# Check what's currently loaded
lsmod | grep -i cdc # For ASIX-based adapters (common in TP-Link USB hubs)
# You'll need to recompile with CONFIG_USB_NET_AX88179_178A=y
# Check which USB devices are recognized
lsusb # If your Ethernet adapter isn't showing up, you need kernel modules
# Check what's currently loaded
lsmod | grep -i cdc # For ASIX-based adapters (common in TP-Link USB hubs)
# You'll need to recompile with CONFIG_USB_NET_AX88179_178A=y
# Install core server tools
pkg -weight: 500;">update && pkg -weight: 500;">upgrade
pkg -weight: 500;">install openssh nginx golang python # Start SSH server
sshd # Generate keys on your main machine
ssh-keygen -t ed25519 -C "homelab"
ssh-copy-id -p 8022 user@phone-ip # Now you can SSH in from anywhere on the LAN
ssh -p 8022 [email protected]
# Install core server tools
pkg -weight: 500;">update && pkg -weight: 500;">upgrade
pkg -weight: 500;">install openssh nginx golang python # Start SSH server
sshd # Generate keys on your main machine
ssh-keygen -t ed25519 -C "homelab"
ssh-copy-id -p 8022 user@phone-ip # Now you can SSH in from anywhere on the LAN
ssh -p 8022 [email protected]
# Install core server tools
pkg -weight: 500;">update && pkg -weight: 500;">upgrade
pkg -weight: 500;">install openssh nginx golang python # Start SSH server
sshd # Generate keys on your main machine
ssh-keygen -t ed25519 -C "homelab"
ssh-copy-id -p 8022 user@phone-ip # Now you can SSH in from anywhere on the LAN
ssh -p 8022 [email protected]
// Simple internal API hub in Go
package main import ( "encoding/json" "fmt" "net/http" "time"
) type HealthResponse struct { Status string `json:"-weight: 500;">status"` Timestamp time.Time `json:"timestamp"` Host string `json:"host"`
} func healthHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(HealthResponse{ Status: "ok", Timestamp: time.Now(), Host: "xz1-homelab", })
} func main() { http.HandleFunc("/health", healthHandler) fmt.Println("Internal API running on :8080") http.ListenAndServe(":8080", nil)
}
// Simple internal API hub in Go
package main import ( "encoding/json" "fmt" "net/http" "time"
) type HealthResponse struct { Status string `json:"-weight: 500;">status"` Timestamp time.Time `json:"timestamp"` Host string `json:"host"`
} func healthHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(HealthResponse{ Status: "ok", Timestamp: time.Now(), Host: "xz1-homelab", })
} func main() { http.HandleFunc("/health", healthHandler) fmt.Println("Internal API running on :8080") http.ListenAndServe(":8080", nil)
}
// Simple internal API hub in Go
package main import ( "encoding/json" "fmt" "net/http" "time"
) type HealthResponse struct { Status string `json:"-weight: 500;">status"` Timestamp time.Time `json:"timestamp"` Host string `json:"host"`
} func healthHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(HealthResponse{ Status: "ok", Timestamp: time.Now(), Host: "xz1-homelab", })
} func main() { http.HandleFunc("/health", healthHandler) fmt.Println("Internal API running on :8080") http.ListenAndServe(":8080", nil)
}
GOOS=linux GOARCH=arm64 go build -o api-server main.go
scp api-server user@phone-ip:/data/data/com.termux/files/home/
GOOS=linux GOARCH=arm64 go build -o api-server main.go
scp api-server user@phone-ip:/data/data/com.termux/files/home/
GOOS=linux GOARCH=arm64 go build -o api-server main.go
scp api-server user@phone-ip:/data/data/com.termux/files/home/
# On rooted devices, write to the battery charge control file
# Location varies by device — common locations:
echo 80 > /sys/class/power_supply/battery/charge_stop_threshold # Or for persistent settings, add to init.d script
# Some ROMs have built-in charge control — check first!
# On rooted devices, write to the battery charge control file
# Location varies by device — common locations:
echo 80 > /sys/class/power_supply/battery/charge_stop_threshold # Or for persistent settings, add to init.d script
# Some ROMs have built-in charge control — check first!
# On rooted devices, write to the battery charge control file
# Location varies by device — common locations:
echo 80 > /sys/class/power_supply/battery/charge_stop_threshold # Or for persistent settings, add to init.d script
# Some ROMs have built-in charge control — check first! - Snapdragon 835 (8-core, 2.5 GHz)
- 64GB internal storage
- Always-on USB
- Battery with charge control options - Vosk — offline speech recognition (Android build available)
- SileroTTS — text-to-speech (required some hacking to get Android build working)
- A simple Go HTTP server as the routing hub
- Connection to an LLM API for the actual intelligence - Boilerplate Go -weight: 500;">service code
- Nginx config snippets
- Debugging kernel module issues (explaining what the error meant)
- Writing shell scripts - Specific hardware quirks (you have to find the right kernel config flag yourself)
- Security model of what should and shouldn't be exposed
- Architectural decisions about how services should talk to each other - You have an old flagship phone (2016-2020 era) with a dead screen or cracked glass
- You want always-on internal tools without VPS costs
- You enjoy tinkering with hardware
- You're comfortable with Linux basics - You need more than ~4-8GB RAM
- You need GPU compute (you could do this with certain Android devices that have decent GPUs, but it's much more complex)
- You need persistent block storage beyond what the phone has