Install on a VPS

Run SelfAgent 24/7 on any Linux server (Hostinger, DigitalOcean, etc.). ~3 minutes.
๐Ÿ’ก Tip: har command par "Copy" dabao โ€” clean copy hoga (koi $ ya junk nahi). Terminal me paste karke Enter.

What you'll get

1Ek command Docker-free compiled binary install karti hai (source private rehta hai).
2SelfAgent systemd service ban jaata hai โ€” boot pe auto-start, crash pe auto-restart.
3Password-protected by default โ€” sirf tum login kar sakte ho, koi aur nahi.
4Browser/phone se kahin se bhi chalao (PWA install bhi kar sakte ho).

Step 1 โ€” Open your VPS terminal

Hostinger: hPanel โ†’ VPS โ†’ Browser terminal (ya SSH se ssh root@YOUR_VPS_IP). Login as root.

Step 2 โ€” Install (one command)

Apna manpasand password ke saath (recommended โ€” MyPass123 ki jagah apna daalo):

curl -fsSL https://selfagent.dev/install.sh | SELFAGENT_PASSWORD='MyPass123' bash

Ya bina password ke (tab ek password khud ban jaayega aur screen par dikhega):

curl -fsSL https://selfagent.dev/install.sh | bash

Install ke ant me aisa box dikhega โ€” URL aur Password note kar lo:

============================================================
  โœ…  SelfAgent is LIVE โ€” and password-protected.
  Open:      http://YOUR_VPS_IP:8080
  Password:  MyPass123
============================================================

Step 3 โ€” Open the firewall port

ufw allow 8080

Hostinger me bhi: hPanel โ†’ VPS โ†’ Firewall โ†’ port 8080 (TCP) Allow.

Step 4 โ€” Open & log in

Browser me kholo (apna IP daalo): http://YOUR_VPS_IP:8080

Login page aayega โ†’ upar wala password daalo โ†’ andar. Phir API keys tab me Groq/Gemini (free) key daalo aur ๐Ÿงช Test all models dabao.

Password โ€” kaise set / badle

SelfAgent secure by default hai โ€” bina password ke kabhi open nahi rehta. 3 tarike:

๐Ÿ”’ Password set/auto hote hi pura agent lock โ€” koi bhi tumhare URL ko khole, bina password kuch nahi kar sakta.

Useful commands

systemctl status selfagent
journalctl -u selfagent -f
systemctl restart selfagent

Band karna ho (public access turant rokna ho):

systemctl stop selfagent

Update

Naya version aane par wahi install command dobara chala do โ€” purana data & settings safe rehte hain.

Phone par app (PWA)

Phone browser me http://YOUR_VPS_IP:8080 kholo โ†’ menu โ†’ "Add to Home Screen" โ†’ SelfAgent app ban jaayega (fullscreen, apna icon). Agent VPS par chalta hai, phone se control. ๐Ÿ“ฑ

HTTPS + apna domain (optional)

Raw IP (http://IP:8080) ki jagah ek saaf domain par HTTPS (๐Ÿ”’ lock) chahiye? Caddy reverse proxy 2 min me kar deta hai โ€” auto SSL certificate, free.

1) Domain ko VPS par point karo (DNS)

Apne domain ke DNS me ek A record banao: agent (ya @) โ†’ tumhara VPS IP 187.127.138.107. (Hostinger: hPanel โ†’ Domains โ†’ DNS / Nameservers.) Maan lo subdomain agent.yourdomain.com.

2) Caddy install karo

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list && sudo apt update && sudo apt install -y caddy

3) Caddy ko SelfAgent se jodo

Ye command apna domain daal ke chalao (agent.yourdomain.com ki jagah apna):

echo 'agent.yourdomain.com { reverse_proxy localhost:8080 }' | sudo tee /etc/caddy/Caddyfile && sudo systemctl restart caddy

Bas! Caddy khud Let's Encrypt se free SSL le lega. Ab kholo:

https://agent.yourdomain.com
๐Ÿ”’ Ab tumhara agent ek professional HTTPS URL par hai (OpenClaw jaisa) โ€” login page bhi wahi password-protected. Port 8080 ab firewall me band kar sakte ho (sirf Caddy 80/443 use hote hain):
ufw allow 80 && ufw allow 443 && ufw deny 8080

Caddy check / logs

systemctl status caddy
journalctl -u caddy -f