# OwnCloud External Storage Setup - Pavon Archive

## Current Status

- ✅ Pavon Unraid Storage share enabled (172.16.1.33)
- ✅ SMB guest access confirmed working
- ✅ smbclient installed on OwnCloud VM
- ✅ SMB connectivity verified between OwnCloud and Pavon
- ⏳ External storage mount needs configuration via web UI

## Next Steps: Configure via OwnCloud Web Interface

### 1. Access OwnCloud Admin Panel

1. Open browser: `http://cloud.acghosting.com` or `http://172.16.3.22`
2. Login as **admin** user (or user with admin privileges)
3. Click **Settings** icon (gear, top-right)
4. Navigate to: **Admin → Storage**

### 2. Configure External Storage

**Add New Storage:**

| Field | Value |
|-------|-------|
| Folder name | `Archive` |
| External storage | **SMB / CIFS** |
| Authentication | **Username and password** |

**Configuration:**

| Setting | Value |
|---------|-------|
| Host | `172.16.1.33` |
| Share | `Storage` |
| Remote subfolder | *(leave blank for root)* |
| Domain | *(leave blank)* |
| Username | `guest` |
| Password | *(leave blank)* |

**Advanced Options (click to expand):**

- [ ] Enable SSL *(uncheck - local network)*
- Check for changes: **Manual** *(for performance with 35TB)*
- [x] Enable sharing *(check)*

**Available for:**
- Select: **pavon** user only
- Or: Specific groups if needed

### 3. Save and Test

1. Click green **checkmark** to save configuration
2. If successful, you should see a green indicator next to the mount
3. If red indicator appears, check:
   - Pavon server is accessible (ping 172.16.1.33)
   - Storage share is enabled in Pavon Unraid WebGUI
   - Guest access is enabled on Storage share

### 4. Verify Access

1. Logout from admin account
2. Login as: **pavon** / **Password44$**
3. Navigate to **Files** view
4. You should see new folder: **Archive**
5. Click Archive to browse camera footage
6. Verify folders visible: cam02, cam04, cam06, cam07, cam08, cam10, cam11, cam12, cam13, cam14, cam16

## Alternative: Use SMB version 3.0

If the default configuration doesn't work, try adding SMB version option:

1. In OwnCloud external storage configuration
2. Look for "Additional Options" or "Show advanced settings"
3. Add: `vers=3.0` to mount options

## Alternative: Use Actual Credentials Instead of Guest

If guest access has issues, create a dedicated SMB user on Pavon:

**On Pavon Unraid (http://172.16.1.33):**

1. Navigate to: **Users** tab
2. Create user: `owncloud`
3. Set password: *(choose secure password)*
4. Back to **Storage** share settings:
   - Security: **Secure** (only specified users)
   - Read/Write Access: `owncloud`
5. Click **Apply**

**In OwnCloud External Storage:**
- Username: `owncloud`
- Password: *(password you created)*

## Troubleshooting

### Archive Folder Shows Red/Error

**Check Pavon Server:**
```bash
ssh root@172.16.1.33
systemctl status smb nmb
```

**Test from OwnCloud VM:**
```bash
ssh root@172.16.3.22
smbclient -L //172.16.1.33 -N
# Should list "Storage" share
```

### Archive Folder Empty After Mount

**Force rescan:**
1. OwnCloud Settings → Storage
2. Click folder icon next to Archive mount
3. Wait for scan to complete (may take time with 35TB)

**Or via command line:**
```bash
ssh root@172.16.3.22
sudo -u apache php /var/www/owncloud/occ files:scan pavon
```

### Slow Performance

This is expected with 35TB of data:
- Initial folder listing: 5-10 seconds
- File browsing: Depends on folder size
- Set "Check for changes" to **Manual** to improve performance

## Expected Result

After configuration:
- **Archive** folder appears in pavon's OwnCloud Files view
- Browsing shows: cam02, cam04, cam06, cam07, cam08, cam10, cam11, cam12, cam13, cam14, cam16
- Each camera folder contains .avi files organized by date
- **After cleanup completes**: ~35TB of camera footage (May 2023 - Oct 2023)
- **Current cleanup status**: 76% complete, 19TB freed so far

## Mobile/Desktop Access

Once configured:

**Mobile (iOS/Android):**
1. Install OwnCloud app
2. Server: `http://cloud.acghosting.com`
3. Login: pavon / Password44$
4. **Archive** folder appears in files
5. Can stream camera footage directly

**Desktop Client:**
1. Install OwnCloud Desktop Client
2. Server: `http://cloud.acghosting.com`
3. Login: pavon credentials
4. Choose to sync or browse Archive folder
5. *Note: Don't sync 35TB - use "selective sync" or browse-only*

---

**Created:** 2026-04-12
**Status:** Ready for web UI configuration
