Overview
After completing the setup script and onboarding, you need to finalize the installation by reloading your shell environment, starting the background service, and ensuring it stays running.Final Steps
Follow these steps in order to complete your installation:Reload Shell Environment
The setup script added several environment variables to What this does:
~/.bashrc. Activate them by sourcing the file:- Loads
TMPDIR,TMP, andTEMPvariables pointing to$PREFIX/tmp - Exports
SVDIRfor the runit service manager - Updates
PATHif needed
Start the OpenClaw Service
Use the Expected output:The service is now running in the background.
sv command (from runit) to start the background service:The
sv command manages services through runit. It’s similar to systemctl on traditional Linux but designed for lightweight supervision.Verify Service is Running
Check the service status:Healthy output:This confirms both the main process and logging are active.If the service is down:
Apply Wake Lock
Critical for Android: Prevent the system from killing the process when Termux is minimized:What this does:To release the wake lock (stops background operation):
- Acquires a CPU wake lock
- Keeps OpenClaw running even when Termux is in the background
- Prevents Android from aggressively killing the process
Post-Installation Checklist
Confirm everything is working correctly:Service Status
Service Status
run: openclaw: (pid XXXX)- Running for at least a few seconds
- Log service also running
Web UI Accessible
Web UI Accessible
- Open http://localhost:18789 in browser
- Page loads successfully
- No connection errors
Wake Lock Active
Wake Lock Active
Environment Variables
Environment Variables
TMPDIR:/data/data/com.termux/files/usr/tmpSVDIR:/data/data/com.termux/files/usr/var/service
Logs Accessible
Logs Accessible
Service Management Commands
Use these commands to manage your OpenClaw service:Check Status
Stop Service
Start Service
Restart Service
View Logs
Troubleshooting
Service won’t start
Check the run script:-rwxr-xr-x).
Try starting manually:
Web UI not accessible
Verify the service is actually running:LISTEN on port 18789.
Try accessing with explicit localhost:
Process keeps getting killed
Ensure wake lock is active:- Go to Android Settings
- Apps → Termux
- Battery → Unrestricted
”Permission denied” when accessing files
Check TMPDIR:$PREFIX/tmp, not /tmp.
Verify the path patch was applied:
Keeping the Service Running
Automatic startup on Termux launch
Add to~/.bashrc:
Using Termux:Boot
Install Termux:Boot from F-Droid to start OpenClaw when Android boots:- Install Termux:Boot
- Create
~/.termux/boot/start-openclaw:
- Make it executable:
Next Steps
Your OpenClaw installation is complete! Explore these topics:Service Management
Learn how to control and monitor the OpenClaw service
Commands Reference
Explore OpenClaw CLI commands and options
Updating OpenClaw
Keep your installation up to date safely
Troubleshooting
Solve common problems
Congratulations! You now have OpenClaw running on your Android device. Your phone is now a powerful AI assistant and automation hub.