Skip to main content

Requirements

  1. Install Termux:Boot from F-Droid
  2. Open Termux:Boot at least once to activate it
Install Termux:Boot from F-Droid to match your Termux installation.

What OCA sets up

OCA creates ~/.termux/boot/start-openclaw.sh:
#!/data/data/com.termux/files/usr/bin/bash
sleep 15
source ~/.bashrc
sshd
tmux new-session -d -s openclaw "openclaw start"

Manual Setup

mkdir -p ~/.termux/boot

cat > ~/.termux/boot/start-openclaw.sh << 'EOF'
#!/data/data/com.termux/files/usr/bin/bash
sleep 15
source ~/.bashrc
sshd
tmux new-session -d -s openclaw "openclaw start"
EOF

chmod +x ~/.termux/boot/start-openclaw.sh

Verify after reboot

tmux list-sessions
pgrep sshd && echo "SSH running"
oca --status

Adjust boot delay

# Faster WiFi (5 sec)
sed -i 's/sleep 15/sleep 5/' ~/.termux/boot/start-openclaw.sh

# Slower connection (30 sec)
sed -i 's/sleep 15/sleep 30/' ~/.termux/boot/start-openclaw.sh

For 24/7 reliability

You need both:
  1. Termux:Boot for auto-start ✅
  2. Phantom Process Killer disabled to prevent SIGKILL ✅