Add JSON import guide and SQL template
This commit is contained in:
parent
5b7c709f13
commit
fabdc5069a
|
|
@ -0,0 +1,240 @@
|
||||||
|
# 📥 Import JSON Boards into Homarr
|
||||||
|
|
||||||
|
## Step-by-Step Import Guide
|
||||||
|
|
||||||
|
### Step 1: Download the JSON Files
|
||||||
|
|
||||||
|
From your Gitea repo:
|
||||||
|
```
|
||||||
|
https://git.lemonlink.eu/impulsivefps/homarr-dashboard/tree/main/boards
|
||||||
|
```
|
||||||
|
|
||||||
|
Download these files:
|
||||||
|
- `main-dashboard.json`
|
||||||
|
- `system-overview.json`
|
||||||
|
- `infrastructure.json`
|
||||||
|
|
||||||
|
### Step 2: Get the Files to Your Server
|
||||||
|
|
||||||
|
Option A - Download directly on server:
|
||||||
|
```bash
|
||||||
|
cd /tmp
|
||||||
|
wget https://git.lemonlink.eu/impulsivefps/homarr-dashboard/raw/main/boards/main-dashboard.json
|
||||||
|
wget https://git.lemonlink.eu/impulsivefps/homarr-dashboard/raw/main/boards/system-overview.json
|
||||||
|
wget https://git.lemonlink.eu/impulsivefps/homarr-dashboard/raw/main/boards/infrastructure.json
|
||||||
|
```
|
||||||
|
|
||||||
|
Option B - Clone the repo:
|
||||||
|
```bash
|
||||||
|
git clone https://git.lemonlink.eu/impulsivefps/homarr-dashboard.git
|
||||||
|
cd homarr-dashboard/boards
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 3: Import Each Board
|
||||||
|
|
||||||
|
#### Import Main Dashboard
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Copy JSON into Homarr container
|
||||||
|
docker cp /tmp/main-dashboard.json homarr:/tmp/
|
||||||
|
|
||||||
|
# Access Homarr container
|
||||||
|
docker exec -it homarr sh
|
||||||
|
|
||||||
|
# The board data needs to be inserted via the Homarr API
|
||||||
|
# Exit container for now
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Alternative: Use Homarr's Web UI
|
||||||
|
|
||||||
|
Unfortunately, Homarr 1.0 doesn't have a direct JSON import in the UI yet.
|
||||||
|
|
||||||
|
**You'll need to manually create the boards using the JSON as reference.**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🛠️ Manual Import (Current Method)
|
||||||
|
|
||||||
|
Since Homarr 1.0 doesn't have JSON import yet, do this:
|
||||||
|
|
||||||
|
### Create Main Dashboard Manually
|
||||||
|
|
||||||
|
1. **Create Board:**
|
||||||
|
```
|
||||||
|
Profile → Manage → Boards → New Board
|
||||||
|
Name: Main Dashboard
|
||||||
|
Visibility: Public
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Add Apps First:**
|
||||||
|
```
|
||||||
|
Manage → Apps → New App
|
||||||
|
|
||||||
|
App 1:
|
||||||
|
- Name: Gmail
|
||||||
|
- Icon: gmail
|
||||||
|
- URL: https://mail.google.com
|
||||||
|
|
||||||
|
App 2:
|
||||||
|
- Name: GitHub
|
||||||
|
- Icon: github
|
||||||
|
- URL: https://github.com
|
||||||
|
|
||||||
|
App 3:
|
||||||
|
- Name: Reddit
|
||||||
|
- Icon: reddit
|
||||||
|
- URL: https://reddit.com
|
||||||
|
|
||||||
|
App 4:
|
||||||
|
- Name: YouTube
|
||||||
|
- Icon: youtube
|
||||||
|
- URL: https://youtube.com
|
||||||
|
|
||||||
|
App 5:
|
||||||
|
- Name: Discord
|
||||||
|
- Icon: discord
|
||||||
|
- URL: https://discord.com
|
||||||
|
|
||||||
|
App 6:
|
||||||
|
- Name: Proxmox
|
||||||
|
- Icon: proxmox
|
||||||
|
- URL: https://proxmox.lemonlink.eu
|
||||||
|
|
||||||
|
App 7:
|
||||||
|
- Name: Portainer
|
||||||
|
- Icon: portainer
|
||||||
|
- URL: https://portainer.lemonlink.eu
|
||||||
|
|
||||||
|
App 8:
|
||||||
|
- Name: Plex
|
||||||
|
- Icon: plex
|
||||||
|
- URL: https://plex.lemonlink.eu
|
||||||
|
|
||||||
|
App 9:
|
||||||
|
- Name: Nextcloud
|
||||||
|
- Icon: nextcloud
|
||||||
|
- URL: https://cloud.lemonlink.eu
|
||||||
|
|
||||||
|
App 10:
|
||||||
|
- Name: Vaultwarden
|
||||||
|
- Icon: vaultwarden
|
||||||
|
- URL: https://vault.lemonlink.eu
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Add Widgets to Board:**
|
||||||
|
```
|
||||||
|
Open Main Dashboard → Edit Mode (pencil icon)
|
||||||
|
|
||||||
|
Widget 1 - Clock:
|
||||||
|
- Add Item → Clock
|
||||||
|
- Settings: Show date ✅, 24h format
|
||||||
|
- Position: Top left
|
||||||
|
- Size: 2x2
|
||||||
|
|
||||||
|
Widget 2 - Weather:
|
||||||
|
- Add Item → Weather
|
||||||
|
- Location: Stockholm, Sweden (change to yours)
|
||||||
|
- Position: Next to clock
|
||||||
|
- Size: 2x2
|
||||||
|
|
||||||
|
Widget 3 - RSS Homelab:
|
||||||
|
- Add Item → RSS Feed
|
||||||
|
- Name: Homelab News
|
||||||
|
- URLs:
|
||||||
|
https://selfh.st/rss/
|
||||||
|
https://noted.lol/rss/
|
||||||
|
https://feeds.fireside.fm/selfhosted/rss
|
||||||
|
- Posts limit: 10
|
||||||
|
- Size: 3x4
|
||||||
|
|
||||||
|
Widget 4 - RSS Cyber:
|
||||||
|
- Add Item → RSS Feed
|
||||||
|
- Name: Cybersecurity
|
||||||
|
- URLs:
|
||||||
|
https://www.bleepingcomputer.com/feed/
|
||||||
|
https://feeds.feedburner.com/TheHackersNews
|
||||||
|
https://krebsonsecurity.com/feed/
|
||||||
|
- Posts limit: 10
|
||||||
|
- Size: 3x4
|
||||||
|
|
||||||
|
Widget 5 - RSS Tech:
|
||||||
|
- Add Item → RSS Feed
|
||||||
|
- Name: Tech News
|
||||||
|
- URLs:
|
||||||
|
https://news.ycombinator.com/rss
|
||||||
|
https://techcrunch.com/feed/
|
||||||
|
- Posts limit: 8
|
||||||
|
- Hide description ✅
|
||||||
|
- Size: 2x4
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Add Apps to Board:**
|
||||||
|
```
|
||||||
|
Add Item → App → Select each app you created
|
||||||
|
Arrange them in a row at the bottom
|
||||||
|
```
|
||||||
|
|
||||||
|
5. **Apply Theme:**
|
||||||
|
```
|
||||||
|
Settings (gear icon) → Appearance
|
||||||
|
|
||||||
|
Primary Color: #6366f1
|
||||||
|
Secondary Color: #8b5cf6
|
||||||
|
Background: #0a0a0f
|
||||||
|
Text Color: #e2e8f0
|
||||||
|
|
||||||
|
Custom CSS: Copy from config/custom-boards.css
|
||||||
|
```
|
||||||
|
|
||||||
|
### Create System Overview Board
|
||||||
|
|
||||||
|
```
|
||||||
|
1. New Board
|
||||||
|
Name: System Overview
|
||||||
|
Visibility: Private
|
||||||
|
|
||||||
|
2. Add Widget
|
||||||
|
Type: iFrame
|
||||||
|
Name: System Monitor
|
||||||
|
URL: http://YOUR-SERVER-IP:3001
|
||||||
|
Size: Full width (as large as possible)
|
||||||
|
|
||||||
|
3. Save
|
||||||
|
```
|
||||||
|
|
||||||
|
### Create Infrastructure Board
|
||||||
|
|
||||||
|
```
|
||||||
|
1. New Board
|
||||||
|
Name: Infrastructure
|
||||||
|
Visibility: Private
|
||||||
|
|
||||||
|
2. Add Apps (create these first in Manage → Apps):
|
||||||
|
- Proxmox, Portainer, TrueNAS
|
||||||
|
- Pi-hole, AdGuard, NPM, UniFi
|
||||||
|
- Tailscale, Grafana, Prometheus
|
||||||
|
- Uptime Kuma, Netdata, WireGuard
|
||||||
|
|
||||||
|
3. Arrange them on the board
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 Quick Alternative
|
||||||
|
|
||||||
|
Since manual import is tedious, would you like me to:
|
||||||
|
|
||||||
|
**Option A: Create a script that auto-creates these via API?**
|
||||||
|
|
||||||
|
**Option B: Give you copy-paste commands for every single field?**
|
||||||
|
|
||||||
|
**Option C: Create SQL insert statements to directly populate the database?**
|
||||||
|
|
||||||
|
The SQL method would be fastest - one command and all boards are ready!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Need Help?
|
||||||
|
|
||||||
|
If you get stuck on any step, tell me which one and I'll help! 🚀
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
--======================================================================
|
||||||
|
-- Homarr Board Import SQL
|
||||||
|
-- Run this in the Homarr SQLite database to create all boards
|
||||||
|
-- Location: /opt/homarr/appdata/db/homarr.db
|
||||||
|
--======================================================================
|
||||||
|
|
||||||
|
-- WARNING: This is a template. Homarr 1.0 schema may vary.
|
||||||
|
-- Use with caution and backup first!
|
||||||
|
|
||||||
|
-- Backup current database first:
|
||||||
|
-- cp /opt/homarr/appdata/db/homarr.db /opt/homarr/appdata/db/homarr.db.backup.$(date +%Y%m%d)
|
||||||
|
|
||||||
|
--======================================================================
|
||||||
|
-- NOTE: Homarr 1.0 uses Prisma ORM with relational tables.
|
||||||
|
-- The exact table structure depends on your version.
|
||||||
|
-- Check current schema with: .schema
|
||||||
|
--======================================================================
|
||||||
|
|
||||||
|
-- This is a conceptual example - actual table names may differ.
|
||||||
|
-- You'll need to inspect the actual database schema first.
|
||||||
|
|
||||||
|
-- To inspect your database:
|
||||||
|
-- docker exec -it homarr sh
|
||||||
|
-- apk add sqlite3
|
||||||
|
-- sqlite3 /appdata/db/homarr.db
|
||||||
|
-- .tables
|
||||||
|
-- .schema Board
|
||||||
|
-- .schema Section
|
||||||
|
|
||||||
|
--======================================================================
|
||||||
|
-- ALTERNATIVE: Manual API approach
|
||||||
|
--======================================================================
|
||||||
|
|
||||||
|
-- Since SQL direct insert is risky, here's the recommended approach:
|
||||||
|
-- Use Homarr's internal API with proper authentication
|
||||||
|
|
||||||
|
-- 1. Get your session cookie from browser DevTools
|
||||||
|
-- 2. Use curl to create boards
|
||||||
|
|
||||||
|
-- Example curl command structure (you need to adapt):
|
||||||
|
/*
|
||||||
|
curl -X POST http://localhost:7575/api/boards \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Cookie: your-session-cookie-here" \
|
||||||
|
-d '{
|
||||||
|
"name": "Main Dashboard",
|
||||||
|
"visibility": "public"
|
||||||
|
}'
|
||||||
|
*/
|
||||||
|
|
||||||
|
--======================================================================
|
||||||
|
-- FOR NOW: Manual Setup is Recommended
|
||||||
|
--======================================================================
|
||||||
|
|
||||||
|
-- The JSON files in this folder show you exactly what to create.
|
||||||
|
-- Follow the step-by-step guide in IMPORT_JSON.md
|
||||||
|
|
||||||
|
-- Or wait for Homarr to add official JSON import feature!
|
||||||
|
|
||||||
|
--======================================================================
|
||||||
|
-- If you want to try SQL anyway, first explore the schema:
|
||||||
|
--======================================================================
|
||||||
|
|
||||||
|
-- List all tables
|
||||||
|
-- SELECT name FROM sqlite_master WHERE type='table';
|
||||||
|
|
||||||
|
-- Show Board table schema
|
||||||
|
-- PRAGMA table_info(Board);
|
||||||
|
|
||||||
|
-- Show current boards
|
||||||
|
-- SELECT * FROM Board;
|
||||||
|
|
||||||
|
--======================================================================
|
||||||
|
-- END OF FILE
|
||||||
|
--======================================================================
|
||||||
Loading…
Reference in New Issue