Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,23 @@ All core functionality is working and tested on many combinations of UniFi Gatew

In progress: Time-series metrics, cable modem monitoring, WiFi analysis, multi-site support.

## Password Reset

If you forget the admin password, use the reset script for your platform:

**Windows (PowerShell as Administrator):**
```powershell
irm https://raw.githubusercontent.com/Ozark-Connect/NetworkOptimizer/main/scripts/reset-password.ps1 -OutFile reset-password.ps1
.\reset-password.ps1
```

**Docker / macOS / Linux:**
```bash
curl -fsSL https://raw.githubusercontent.com/Ozark-Connect/NetworkOptimizer/main/scripts/reset-password.sh | bash
```

The script stops the service, clears the password, restarts, and shows you the new temporary password.

## Contributing

If you find issues, report them via GitHub Issues. Include your UniFi device models and controller version. Sanitize credentials and IPs before attaching logs.
Expand Down
23 changes: 19 additions & 4 deletions docker/DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,15 +648,30 @@ docker compose pull && docker compose up -d

### Reset Admin Password

If you've forgotten your password or need to reset it:
If you've forgotten your password or need to reset it, use the reset script:

```bash
curl -fsSL https://raw.githubusercontent.com/Ozark-Connect/NetworkOptimizer/main/scripts/reset-password.sh | bash
```

Or download and run it (useful inside Proxmox LXC or restricted environments):

```bash
curl -fsSL https://raw.githubusercontent.com/Ozark-Connect/NetworkOptimizer/main/scripts/reset-password.sh -o reset-password.sh
bash reset-password.sh
```

The script auto-detects your Docker container, clears the password, restarts, and displays the new temporary password.

**Manual fallback** (if you prefer not to use the script):

```bash
# Clear the password from the database
docker exec network-optimizer sqlite3 /app/data/network_optimizer.db "UPDATE AdminSettings SET Password = NULL;"
docker exec network-optimizer sqlite3 /app/data/network_optimizer.db \
"UPDATE AdminSettings SET Password = NULL, Enabled = 0;"

# Restart to trigger auto-generated password
cd /path/to/network-optimizer/docker
docker compose up -d
docker restart network-optimizer

# View the new auto-generated password
docker logs network-optimizer 2>&1 | grep -A5 "AUTO-GENERATED"
Expand Down
28 changes: 28 additions & 0 deletions docker/NATIVE-DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,34 @@ journalctl -u network-optimizer -f
type C:\NetworkOptimizer\logs\stdout.log
```

### Reset Admin Password

If you forget the admin password, use the reset script:

```bash
curl -fsSL https://raw.githubusercontent.com/Ozark-Connect/NetworkOptimizer/main/scripts/reset-password.sh | bash
```

The script auto-detects macOS or Linux native installations, clears the password, restarts the service, and displays the new temporary password. Use `--macos` or `--linux` to force a specific mode.

**Manual fallback:**

```bash
# macOS
launchctl unload ~/Library/LaunchAgents/net.ozarkconnect.networkoptimizer.plist
sqlite3 ~/Library/Application\ Support/NetworkOptimizer/network_optimizer.db \
"UPDATE AdminSettings SET Password = NULL, Enabled = 0;"
launchctl load ~/Library/LaunchAgents/net.ozarkconnect.networkoptimizer.plist
grep "Password:" ~/network-optimizer/logs/stdout.log | tail -1

# Linux
sudo systemctl stop network-optimizer
sqlite3 /opt/network-optimizer/data/network_optimizer.db \
"UPDATE AdminSettings SET Password = NULL, Enabled = 0;"
sudo systemctl start network-optimizer
journalctl -u network-optimizer --since "2 minutes ago" | grep "Password:"
```

---

## Support
Expand Down
29 changes: 29 additions & 0 deletions docs/MACOS-INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,35 @@ git pull

The install script preserves your database, encryption keys, and `start.sh` configuration by backing them up before reinstalling.

## Troubleshooting

### Reset Admin Password

If you forget the admin password, use the reset script:

```bash
curl -fsSL https://raw.githubusercontent.com/Ozark-Connect/NetworkOptimizer/main/scripts/reset-password.sh | bash
```

The script auto-detects the macOS native installation, clears the password, restarts the service, and displays the new temporary password.

**Manual fallback:**

```bash
# Stop the service
launchctl unload ~/Library/LaunchAgents/net.ozarkconnect.networkoptimizer.plist

# Clear the password
sqlite3 ~/Library/Application\ Support/NetworkOptimizer/network_optimizer.db \
"UPDATE AdminSettings SET Password = NULL, Enabled = 0;"

# Restart
launchctl load ~/Library/LaunchAgents/net.ozarkconnect.networkoptimizer.plist

# View the new password
grep "Password:" ~/network-optimizer/logs/stdout.log | tail -1
```

## Uninstalling

```bash
Expand Down
21 changes: 21 additions & 0 deletions scripts/proxmox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,27 @@ pct exec <CT_ID> -- ls -la /opt/network-optimizer/
pct exec <CT_ID> -- chown -R 1000:1000 /opt/network-optimizer/data
```

### Reset Admin Password

If you forget the admin password:

```bash
pct exec <CT_ID> -- bash -c "curl -fsSL https://raw.githubusercontent.com/Ozark-Connect/NetworkOptimizer/main/scripts/reset-password.sh | bash -s -- --force"
```

**Manual fallback:**

```bash
# Clear the password
pct exec <CT_ID> -- docker exec network-optimizer sqlite3 /app/data/network_optimizer.db \
"UPDATE AdminSettings SET Password = NULL, Enabled = 0;"

# Restart and view the new password
pct exec <CT_ID> -- docker restart network-optimizer
sleep 10
pct exec <CT_ID> -- docker logs network-optimizer 2>&1 | grep -A5 "AUTO-GENERATED"
```

## Uninstall

To completely remove Network Optimizer:
Expand Down
Loading