Files
ui-tracker/UNRAID.md
2026-03-27 23:47:39 -05:00

129 lines
3.1 KiB
Markdown

# Unraid Installation Guide — UI Stock Tracker
---
## Step 1 — CLI: Clone and Build the Image
SSH into your Unraid server and run:
```bash
mkdir -p /mnt/user/appdata/ui-tracker
cd /mnt/user/appdata/ui-tracker
git clone https://github.com/<your-username>/ui-tracker.git .
docker build -t ui-tracker .
```
The first build takes a few minutes — it compiles the React frontend, compiles the Node.js backend, and installs Chromium inside the image. Once complete, the image is available locally as `ui-tracker`.
---
## Step 2 — GUI: Add the Container in Unraid
In the Unraid web UI go to **Docker → Add Container**.
Fill in each section as follows:
---
### Basic
| Field | Value |
|---|---|
| Name | `ui-tracker` |
| Repository | `ui-tracker` |
| Icon URL | *(leave blank)* |
---
### Network
| Field | Value |
|---|---|
| Network Type | `br0` |
| Fixed IP Address | Your chosen static LAN IP — e.g. `192.168.1.50` |
> With br0, the container gets its own IP on your LAN. You will access the UI directly at `http://<fixed-ip>:8080` — no port conflict with the Unraid host.
---
### Port
Click **Add another Path, Port, Variable, Label or Device** → select **Port**.
| Field | Value |
|---|---|
| Name | `Web UI` |
| Container Port | `8080` |
| Host Port | `8080` |
| Protocol | `TCP` |
---
### Path (Persistent Data)
Click **Add another Path, Port, Variable, Label or Device** → select **Path**.
| Field | Value |
|---|---|
| Name | `Data` |
| Container Path | `/app/data` |
| Host Path | `/mnt/user/appdata/ui-tracker/data` |
| Access Mode | `Read/Write` |
> This is where the SQLite database lives. All tracked items and Telegram settings persist here across restarts and rebuilds.
---
### Variables
No environment variables are required — all configuration is baked into the image.
---
Click **Apply** to create and start the container.
---
## Step 3 — First-Time Setup
Open the UI at `http://<fixed-ip>:8080` and:
1. Click **Settings** (top right)
2. Enter **Bot Token**: `8769097441:AAFBqPlSTcTIi3I-F5ZIN9EEpwbNDzHg8hM`
3. Enter **Chat ID**: `8435449432`
4. Click **Test Alert** — a Telegram message should arrive within seconds
5. Click **Save**
6. Click **Add Item**, paste a `store.ui.com` product URL, set your check interval, click **Start Tracking**
---
## Rebuilding After an Update
```bash
cd /mnt/user/appdata/ui-tracker
git pull
docker stop ui-tracker
docker rm ui-tracker
docker build -t ui-tracker .
```
Then go back to **Docker → Add Container** and re-add it with the same settings, or start it from the Docker tab if Unraid retained the template.
---
## Troubleshooting
**UI not loading**
- Confirm the container is running in the Docker tab
- Check logs: click the container icon → **Logs**
- Make sure your fixed IP isn't already in use on the network
**Telegram test fails**
- Verify the bot token and chat ID in Settings
- Send `/start` to your bot in Telegram at least once to open the conversation
- Confirm Unraid has outbound HTTPS (port 443) access
**Items stuck on "Unknown" status**
- Open container logs and look for Puppeteer errors
- Restart the container from the Docker tab — Chromium occasionally needs a clean start