# House of Prayer - Quick Start Guide

## Option 3: Tailscale (Private Team Access)

### Setup on Host PC

1. Install Tailscale:

   ```powershell
   winget install Tailscale.Tailscale
   ```

2. Login via system tray icon (Google/Microsoft account)

3. Get your Tailscale IP:

   ```powershell
   tailscale ip -4
   ```

   You'll get something like: `100.64.1.5`

4. Start your backend normally (port 5000)

### Setup on Other Devices

1. Install Tailscale app (same on all devices)
2. Login with SAME account
3. Access your app using: `http://100.64.1.5:5000`

### App Settings

- Protocol: `http`
- Hostname: Your Tailscale IP (e.g., `100.64.1.5`)
- Port: `5000`
- Mode: Online

---

## Option 4: LocalTunnel (Public URL)

### One-Time Setup

```powershell
# Install Node.js if needed
winget install OpenJS.NodeJS

# Install LocalTunnel
npm install -g localtunnel
```

### Quick Start (Manual)

```powershell
# Start backend first, then in another terminal:
lt --port 5000 --subdomain houseofprayer
```

### Quick Start (Automatic)

```powershell
# Run the automated script:
.\start-server-with-tunnel.ps1
```

This starts both backend and tunnel automatically!

### Application Settings

- Protocol: `https`
- Hostname: `houseofprayer.loca.lt` (or your assigned URL)
- Port: (leave empty)
- Mode: Online

---

## Which Should You Use?

**Tailscale** - Best for:

- Private church team access
- Most secure option
- Works everywhere, even cellular data
- Free forever for up to 100 devices

**LocalTunnel** - Best for:

- Public access (anyone with link)
- Quick demos/presentations
- Testing from anywhere
- No account needed

---

## Troubleshooting

### LocalTunnel not working?

- Make sure backend is running first
- Check port 5000 is not blocked locally
- Try without subdomain: `lt --port 5000`

### Tailscale not connecting?

- Check both devices logged into same account
- Run `tailscale status` to see network
- Restart Tailscale service if needed

### Backend not accessible?

- Verify backend running: `curl http://localhost:5000/api/profiles`
- Check netstat: `netstat -ano | Select-String ":5000"`
- Ensure binding to 0.0.0.0 not 127.0.0.1

---

## Need Help?

Run the automated startup script:

```powershell
.\start-server-with-tunnel.ps1
```

This handles everything automatically!
