Initial commit: Server configurations and license management

This commit is contained in:
2025-12-10 10:18:41 -05:00
commit 93ad1a72c2
29 changed files with 4647 additions and 0 deletions

303
docs/CLAUDE-ASSISTANT.md Normal file
View File

@@ -0,0 +1,303 @@
# Claude AI Professional Assistant
> **Status:** Operational
> **Last Updated:** November 28, 2025
> **Role:** Professional assistant for Atomaste consulting work
---
## Overview
Claude is your professional AI assistant for your mechanical/simulation freelance engineering work at **Atomaste**.
**Primary Functions:**
- **Day Planning** - Prepare priorities, tasks, reminders
- **Work Documentation** - Log activities, summarize accomplishments
- **Daily Notes** - Maintain comprehensive daily records
- **Project Tracking** - Monitor CAD work, commits, progress
- **Work-Life Balance** - Weather/outdoor activity planning
**Architecture:** MCP server on dalidou + Claude Code on Windows (free with subscription)
---
## Daily Workflow
### Morning - Start the Day
Say: **"Hey good morning, let's start my day"** or **"Bonjour, on commence?"**
Claude will:
1. **Review yesterday** - What was accomplished, commits made
2. **Check priorities** - Outstanding tasks, deadlines
3. **Plan today** - Suggest focus areas and time blocks
4. **Weather check** - Conditions for outdoor breaks (skiing, etc.)
5. **Set the tone** - Energizing briefing to start productive
### During the Day
- "What should I focus on next?"
- "Log this: finished FEA analysis for P04-Gigabit"
- "Remind me to follow up with client X"
- "Push my CAD work"
- "What have I done today so far?"
### Evening - Close the Day
Say: **"Let's wrap up the day"** or **"On ferme la journée"**
Claude will:
1. **Summarize work** - All commits, files changed, activities logged
2. **Document achievements** - What was completed
3. **Note blockers** - What's pending or stuck
4. **Plan tomorrow** - Suggested priorities for next day
5. **Update daily note** - Comprehensive record of the day
---
## What Claude Tracks
### Work Activities
- CAD file changes (NX Siemens, SolidWorks)
- Git commits with descriptions
- Project progress (P04-Gigabit, etc.)
- Client work and deliverables
- FEA/simulation tasks
### Daily Documentation
- Time spent on tasks
- Accomplishments and milestones
- Blockers and challenges
- Decisions made
- Ideas and notes
### Personal Balance
- Weather conditions
- Best outdoor activity windows
- Skiing conditions
- Work breaks and energy management
---
## Slash Commands
| Command | Description |
|---------|-------------|
| `/morning` | Full morning briefing with planning |
| `/eod` | End of day summary and documentation |
| `/ski` | Skiing conditions check |
| `/weather` | Quick weather check |
| `/push` | Push CAD changes to Gitea |
| `/pull` | Pull latest from Gitea |
---
## Natural Language Examples
### Planning
- "What are my priorities today?"
- "I need to focus on the P04 assembly this morning"
- "Block 2 hours for FEA work"
- "What's pending from yesterday?"
### Logging Work
- "Log: completed thermal analysis for client X"
- "I just finished the bracket redesign"
- "Note: waiting for client feedback on envelope design"
- "Add to today: reviewed simulation results, found stress concentration issue"
### Tracking Progress
- "What did I work on this week?"
- "Show me my recent commits"
- "How's the P04-Gigabit project going?"
- "What files did I modify today?"
### CAD Workflow
- "Push my CAD work" (with commit message)
- "Pull latest files"
- "What's changed in CADTOMASTE?"
### Breaks & Balance
- "When's good for skiing today?"
- "What's the weather like?"
- "Should I take a break outside?"
---
## Daily Note Structure
Claude maintains daily documentation with:
```markdown
# [Date] - Daily Work Log
## Morning Plan
- Priority 1: ...
- Priority 2: ...
- Scheduled: ...
## Work Log
- 09:00 - Started FEA analysis for P04-Gigabit
- 11:30 - Completed mesh refinement
- 14:00 - Client call regarding envelope specs
- ...
## Commits
- a57c45b: "Updated lateral support shoe geometry"
- 8624cdd: "Fixed mesh convergence issue"
## Accomplishments
- Completed thermal analysis
- Delivered preliminary results to client
- Fixed bracket interference issue
## Blockers / Pending
- Waiting for client approval on design change
- Need material data for simulation
## Notes & Ideas
- Consider alternative mounting approach
- Research vibration damping options
## Tomorrow's Focus
- Finalize P04 assembly
- Start documentation for deliverable
```
---
## MCP Tools Available
| Tool | Description |
|------|-------------|
| `get_current_weather` | Current conditions in Rouyn-Noranda |
| `get_hourly_forecast` | Hour-by-hour forecast |
| `get_daily_forecast` | Daily forecast (highs, lows) |
| `find_best_activity_windows` | Best times for skiing, hiking |
| `check_skiing_conditions` | Quick ski conditions check |
| `get_today_commits` | Today's git commits |
| `get_recent_activity` | Recent git activity (7 days) |
| `list_repos` | List Gitea repositories |
---
## Architecture
```
┌─────────────────────────────────────────────────────────────┐
│ DALIDOU SERVER (100.80.199.40) │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ MCP Server (/srv/claude-assistant) │ │
│ │ ├─ Weather tools (Open-Meteo API) │ │
│ │ ├─ Gitea tools (commits, repos) │ │
│ │ └─ Activity analysis │ │
│ └───────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│ SSH + MCP Protocol
┌─────────────────────────────────────────────────────────────┐
│ WINDOWS WORKSTATION │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ Claude Code (Opus 4.5 - your subscription) │ │
│ │ ├─ Intelligent planning and analysis │ │
│ │ ├─ Work documentation and logging │ │
│ │ ├─ CAD file management (push/pull) │ │
│ │ └─ Daily note maintenance │ │
│ └───────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
```
---
## Configuration
### Server Location
```
/srv/claude-assistant/
├── .env # API keys and tokens
├── config.yaml # Location, preferences
├── run-mcp.sh # MCP startup script
├── mcp-server/
│ └── server.js # MCP server
└── tools/
├── weather.js # Open-Meteo integration
├── gitea.js # Gitea API
└── obsidian.js # Daily notes (future)
```
### Windows Configuration
```
C:\Users\Antoine\.claude\
├── mcp.json # MCP server connection
└── commands/
├── morning.md # Morning briefing
├── eod.md # End of day summary
├── ski.md # Skiing conditions
├── weather.md # Weather check
├── push.md # Push CAD
└── pull.md # Pull CAD
```
---
## Cost
| Usage | Cost |
|-------|------|
| Interactive (Claude Code) | **FREE** (your subscription) |
| Automated API (optional) | ~$0.03 per run |
Current setup = **$0/month**
---
## What's Working
- [x] MCP server on dalidou
- [x] Weather and skiing tools
- [x] Gitea integration (commits, repos)
- [x] Slash commands
- [x] Push/pull CAD workflow
- [x] Natural language interaction
---
## Future Improvements
- [ ] Daily notes auto-save to Obsidian vault
- [ ] Calendar integration (meetings, deadlines)
- [ ] Client project tracking
- [ ] Time tracking per project
- [ ] Weekly/monthly summaries
- [ ] Invoice preparation assistance
---
## Troubleshooting
### MCP not connecting
```bash
ssh root@100.80.199.40 /srv/claude-assistant/run-mcp.sh
```
Then restart VSCode.
### Gitea returns empty
Check token in `/srv/claude-assistant/.env`
### Check MCP status
```
claude mcp list
```
---
## Quick Start
1. Open Claude Code (VSCode)
2. Say "Hey good morning, let's start my day"
3. Claude prepares your briefing
4. Work on your projects
5. Say "Log: [what you did]" to track activities
6. End with "Let's wrap up the day"
7. Claude documents everything

645
docs/DALIDOU-SERVER.md Normal file
View File

@@ -0,0 +1,645 @@
# Dalidou Home Server - Complete Documentation
> **Last Updated:** December 6, 2025
> **Server Name:** dalidou
> **Owner:** Antoine Letarte
---
## Table of Contents
1. [Server Overview](#server-overview)
2. [Network Configuration](#network-configuration)
3. [User Accounts](#user-accounts)
4. [Installed Services](#installed-services)
5. [Service Details & Configuration](#service-details--configuration)
6. [Docker Infrastructure](#docker-infrastructure)
7. [Directory Structure](#directory-structure)
8. [Backup Strategy](#backup-strategy)
9. [Maintenance Commands](#maintenance-commands)
10. [Disaster Recovery](#disaster-recovery)
11. [Troubleshooting](#troubleshooting)
---
## Server Overview
### Hardware
- **Type:** Home server running Docker containers
- **OS:** Linux (Debian/Ubuntu-based)
- **Location:** Home network
### Purpose
Self-hosted infrastructure replacing cloud services:
- Google Photos → Immich
- Google Drive → Seafile
- Dropbox → Syncthing
- GitHub → Gitea
- Document management → Paperless-ngx
---
## Network Configuration
### IP Addresses
| Network | IP Address | Usage |
|---------|------------|-------|
| WiFi (Primary) | `192.168.86.50` | Main local access |
| Wired | `10.0.0.77` | Backup/alternate |
| Tailscale VPN | `100.80.199.40` | Remote access from anywhere |
### SSH Access
```bash
# Local network
ssh papa@192.168.86.50
# Via Tailscale (remote)
ssh papa@100.80.199.40
# Using hostname (if DNS configured)
ssh papa@dalidou
```
### Ports in Use
| Port | Service | Protocol |
|------|---------|----------|
| 22 | SSH (host) | TCP |
| 80 | Caddy (reverse proxy) | TCP |
| 2222 | Gitea SSH | TCP |
| 2283 | Immich | TCP |
| 3000 | Gitea Web | TCP |
| 3001 | Homepage Dashboard | TCP |
| 8080 | Home Assistant | TCP |
| 8081 | Filebrowser | TCP |
| 8082 | Paperless-ngx | TCP |
| 8083 | Seafile | TCP |
| 8384 | Syncthing Web UI | TCP |
| 21027 | Syncthing Discovery | UDP |
| 22000 | Syncthing Transfer | TCP/UDP |
---
## User Accounts
### System Users
| Username | Password | Role |
|----------|----------|------|
| papa | Ladygaga | Admin (SSH, sudo) |
### Service Accounts
| Service | Username | Password | Email |
|---------|----------|----------|-------|
| Gitea | Antoine | Ladygaga | antoine.letarte@gmail.com |
| Filebrowser | Antoine | Ladygaga2024 | - |
| Seafile | antoine.letarte@gmail.com | Ladygaga2025 | antoine.letarte@gmail.com |
| Immich | Antoine | (see Bitwarden) | antoine.letarte@gmail.com |
| Paperless | Antoine | (see Bitwarden) | - |
### Family Accounts
| Name | Password | Notes |
|------|----------|-------|
| Odile | Adalidou948 | Family member access |
---
## Installed Services
### Quick Access URLs
| Service | Local URL | Direct IP URL |
|---------|-----------|---------------|
| **Homepage** (Dashboard) | http://home.dalidou.home | http://192.168.86.50:3001 |
| **Immich** (Photos) | http://photos.dalidou.home | http://192.168.86.50:2283 |
| **Filebrowser** | http://files.dalidou.home | http://192.168.86.50:8081 |
| **Paperless** (Docs) | http://docs.dalidou.home | http://192.168.86.50:8082 |
| **Gitea** (Git) | http://git.dalidou.home | http://192.168.86.50:3000 |
| **Syncthing** | http://sync.dalidou.home | http://192.168.86.50:8384 |
| **Seafile** (Cloud) | http://cloud.dalidou.home | http://192.168.86.50:8083 |
| **Home Assistant** | - | http://192.168.86.50:8080 |
### Remote Access (Tailscale)
When away from home, use Tailscale IP:
- Immich: http://100.80.199.40:2283
- Seafile: http://100.80.199.40:8083
- Gitea: http://100.80.199.40:3000
- etc.
---
## Service Details & Configuration
### 1. Immich - Photo Management
**Purpose:** Google Photos replacement - backup, organize, and share photos
**Containers:**
- `immich_server` - Main application
- `immich_postgres` - Database
- `immich_redis` - Cache
**Data Location:** `/srv/immich/`
**Features:**
- Mobile app backup (iOS/Android)
- Face recognition
- Location mapping
- Sharing albums
**Mobile App:** "Immich" on App Store / Play Store
- Server URL: http://192.168.86.50:2283 (local) or http://100.80.199.40:2283 (remote)
---
### 2. Filebrowser - Web File Manager
**Purpose:** Browse and manage server files via web browser
**Container:** `filebrowser`
**Data Location:**
- Config: `/srv/filebrowser/config/`
- Database: `/srv/filebrowser/database/`
- Serves: `/srv/storage/shared/`
**Login:** Antoine / Ladygaga2024
**Use Cases:**
- Quick file access without SSH
- Share files with family
- Upload/download files
---
### 3. Paperless-ngx - Document Management
**Purpose:** Scan, OCR, organize, and search documents
**Containers:**
- `paperless` - Main application
- `paperless_postgres` - Database
- `paperless_redis` - Cache
**Data Location:** `/srv/paperless/`
**Features:**
- OCR scanning
- Full-text search
- Tagging and categorization
- Correspondent tracking
**Workflow:**
1. Scan documents to consume folder
2. Paperless auto-processes and OCRs
3. Search and organize in web UI
---
### 4. Gitea - Git Repository Hosting
**Purpose:** Self-hosted GitHub - version control for code and CAD files
**Containers:**
- `gitea` - Main application
- `gitea_postgres` - Database
**Data Location:** `/srv/gitea/`
**Configuration:**
- Web Port: 3000
- SSH Port: 2222
- LFS Enabled: Yes (for large CAD files)
- LFS Path: `/data/git/lfs`
**Git LFS:** Enabled for large file storage (CAD files, binaries)
**Clone via HTTPS:**
```bash
git clone http://192.168.86.50:3000/Antoine/CADTOMASTE.git
```
**Clone via SSH:**
```bash
git clone ssh://git@192.168.86.50:2222/Antoine/CADTOMASTE.git
```
---
### 5. Syncthing - File Synchronization
**Purpose:** Sync files between devices (like Dropbox but self-hosted)
**Container:** `syncthing`
**Data Location:** `/srv/syncthing/`
**Ports:**
- 8384: Web UI
- 22000: Sync (TCP/UDP)
- 21027: Discovery (UDP)
**Use Cases:**
- Sync folders between laptop and server
- Backup important directories
- Share folders with family
---
### 6. Seafile - Cloud Storage
**Purpose:** Self-hosted Google Drive / Dropbox alternative
**Containers:**
- `seafile` - Main application
- `seafile-mysql` - Database (MariaDB)
- `seafile-memcached` - Cache
**Data Location:** `/srv/seafile/`
**Configuration:**
- Web Port: 8083
- Admin: antoine.letarte@gmail.com / Ladygaga2025
- Timezone: America/Toronto
**Clients:**
- **SeaDrive (Windows):** Creates virtual drive letter (S:\)
- **Mobile App:** "Seafile" on App Store / Play Store
**Desktop Client Setup:**
1. Install SeaDrive from https://www.seafile.com/en/download/
2. Server: http://192.168.86.50:8083
3. Login with your credentials
4. Choose drive letter (e.g., S:\)
---
### 7. Home Assistant - Smart Home
**Purpose:** Home automation and smart device control
**Container:** `homeassistant`
**Access:** http://192.168.86.50:8080
**Additional:** Matter Server (`matter-server`) for Matter/Thread devices
---
### 8. Homepage - Server Dashboard
**Purpose:** Centralized dashboard to view and access all server services at a glance
**Container:** `homepage`
**Image:** `ghcr.io/gethomepage/homepage:latest`
**Data Location:** `/srv/homepage/`
**Configuration:**
- Web Port: 3001
- Theme: Dark (slate color)
- Docker integration enabled (monitors container status)
**Access:**
- Local: http://192.168.86.50:3001
- Wired: http://10.0.0.77:3001
- Tailscale: http://100.80.199.40:3001
**Features:**
- Real-time Docker container status monitoring
- Quick links to all services (Immich, Paperless, Gitea, Seafile, etc.)
- Customizable widgets and bookmarks
- Dark theme with clean interface
**Configuration Files:**
- `services.yaml` - Define services and their icons/links
- `settings.yaml` - Theme, layout, and general settings
- `widgets.yaml` - System widgets (CPU, memory, etc.)
- `bookmarks.yaml` - External bookmarks
- `docker.yaml` - Docker socket configuration
**Customization:**
```bash
# Edit service definitions
nano /srv/homepage/services.yaml
# Restart to apply changes
docker restart homepage
```
---
## Docker Infrastructure
### View Running Containers
```bash
ssh papa@192.168.86.50 "docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'"
```
### Container Management
```bash
# Restart a service
docker restart <container_name>
# View logs
docker logs <container_name>
docker logs -f <container_name> # Follow logs
# Stop/Start
docker stop <container_name>
docker start <container_name>
# Check resource usage
docker stats
```
### Docker Compose Locations
| Service | Compose File Location |
|---------|----------------------|
| Seafile | `/srv/seafile/docker-compose.yml` |
| Immich | `/srv/immich/docker-compose.yml` |
| Gitea | `/srv/gitea/docker-compose.yml` |
| Paperless | `/srv/paperless/docker-compose.yml` |
| Homepage | `/home/papa/docker-compose.yml` |
### Restart All Services
```bash
cd /srv/<service>
docker compose down
docker compose up -d
```
---
## Directory Structure
```
/srv/
├── filebrowser/
│ ├── config/
│ └── database/
├── gitea/
│ ├── data/
│ │ └── git/
│ │ ├── repositories/
│ │ └── lfs/
│ └── postgres/
├── immich/
│ ├── upload/
│ ├── library/
│ └── postgres/
├── paperless/
│ ├── consume/ ← Drop documents here
│ ├── data/
│ ├── media/
│ └── postgres/
├── seafile/
│ ├── data/
│ │ └── seafile/
│ │ ├── conf/
│ │ └── seafile-data/
│ └── mysql/
├── syncthing/
│ └── config/
├── homepage/
│ ├── services.yaml ← Service definitions
│ ├── settings.yaml ← Theme and layout
│ ├── widgets.yaml ← Dashboard widgets
│ ├── bookmarks.yaml ← External links
│ └── docker.yaml ← Docker integration
└── storage/
└── shared/ ← Filebrowser root
```
---
## Backup Strategy
### Critical Data Locations
| Priority | Data | Location | Backup Method |
|----------|------|----------|---------------|
| HIGH | Photos | `/srv/immich/` | External drive + cloud |
| HIGH | Documents | `/srv/paperless/` | External drive |
| HIGH | Git repos | `/srv/gitea/` | Git push to remote |
| MEDIUM | Seafile | `/srv/seafile/` | External drive |
| LOW | Configs | `/srv/*/config/` | Copy to backup |
### Manual Backup Commands
```bash
# Backup Immich
tar -czvf immich-backup-$(date +%Y%m%d).tar.gz /srv/immich/
# Backup Paperless
tar -czvf paperless-backup-$(date +%Y%m%d).tar.gz /srv/paperless/
# Backup Gitea
tar -czvf gitea-backup-$(date +%Y%m%d).tar.gz /srv/gitea/
# Backup Seafile (stop first for consistency)
docker compose -f /srv/seafile/docker-compose.yml stop seafile
tar -czvf seafile-backup-$(date +%Y%m%d).tar.gz /srv/seafile/
docker compose -f /srv/seafile/docker-compose.yml start seafile
```
---
## Maintenance Commands
### System Updates
```bash
# Update system packages
sudo apt update && sudo apt upgrade -y
# Update Docker images
docker compose pull
docker compose up -d
```
### Check Disk Space
```bash
df -h /srv
du -sh /srv/*
```
### View All Container Logs
```bash
docker logs --tail 50 <container_name>
```
### Restart Docker
```bash
sudo systemctl restart docker
```
---
## Disaster Recovery
### If Server Fails - Rebuild Steps
1. **Install fresh Linux (Debian/Ubuntu)**
2. **Install Docker:**
```bash
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
```
3. **Restore /srv from backup:**
```bash
sudo mkdir /srv
sudo tar -xzvf backup.tar.gz -C /
```
4. **Start each service:**
```bash
cd /srv/gitea && docker compose up -d
cd /srv/immich && docker compose up -d
cd /srv/paperless && docker compose up -d
cd /srv/seafile && docker compose up -d
# etc.
```
5. **Install Tailscale:**
```bash
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
```
### Key Files to Backup
- All of `/srv/`
- `/etc/caddy/Caddyfile` (if using Caddy)
- Docker compose files (already in /srv/)
- This documentation!
---
## Troubleshooting
### Service Not Accessible
```bash
# Check if container is running
docker ps | grep <service>
# Check container logs
docker logs <container_name>
# Restart the service
docker restart <container_name>
```
### Port Already in Use
```bash
# Find what's using a port
sudo lsof -i :<port>
sudo netstat -tlnp | grep <port>
```
### Container Won't Start
```bash
# Check logs for errors
docker logs <container_name>
# Check disk space
df -h
# Check Docker status
sudo systemctl status docker
```
### Database Issues
```bash
# Enter postgres container
docker exec -it <postgres_container> psql -U <user> -d <database>
# Check database health
docker exec <postgres_container> pg_isready
```
### Reset Service Password
**Filebrowser:**
```bash
docker stop filebrowser
docker run --rm -v /srv/filebrowser/database:/database filebrowser/filebrowser \
users update admin --password newpassword -d /database/filebrowser.db
docker start filebrowser
```
**Gitea:**
```bash
docker exec -it gitea gitea admin user change-password --username Antoine --password newpassword
```
---
## Quick Reference Card
### SSH Access
```bash
ssh papa@192.168.86.50 # Local
ssh papa@100.80.199.40 # Tailscale
```
### Most Used Commands
```bash
# Check all containers
docker ps
# Restart a service
docker restart <name>
# View logs
docker logs -f <name>
# Disk space
df -h /srv
```
### Service URLs (Local)
- Dashboard: http://192.168.86.50:3001
- Photos: http://192.168.86.50:2283
- Files: http://192.168.86.50:8081
- Docs: http://192.168.86.50:8082
- Git: http://192.168.86.50:3000
- Cloud: http://192.168.86.50:8083
- Sync: http://192.168.86.50:8384
---
## Document History
| Date | Change |
|------|--------|
| 2025-11-27 | Initial documentation created |
| 2025-11-27 | Added Seafile setup |
| 2025-11-27 | Added Git LFS for CAD versioning |
| 2025-12-06 | Added Homepage dashboard documentation |

229
docs/LICENSE-SERVER-INFO.md Normal file
View File

@@ -0,0 +1,229 @@
# License Server Host Information
**Updated:** 2025-12-01
**Server:** dalidou (ThinkPad W520)
**Status:** OPERATIONAL
---
## Quick Reference - What to Tell Siemens
For your permanent NX license, provide:
```
Hostname: dalidou
CID: COMPOSITE=88F027D30355
Port: 28000
```
---
## Server Details
| Field | Value |
|-------|-------|
| **Hostname** | `dalidou` |
| **Composite ID (CID)** | `COMPOSITE=88F027D30355` |
| **Ethernet MAC Address** | `f0:de:f1:e6:e4:6a` |
| **Host ID (no colons)** | `f0def1e6e46a` |
| **Local Network IP (Wi-Fi)** | `192.168.86.50` |
| **Tailscale IP** | `100.80.199.40` |
| **NX License Port** | `28000` |
### All CIDs (from getcid command)
| Interface | CID | MAC |
|-----------|-----|-----|
| **enp0s25 (Ethernet)** | `COMPOSITE=88F027D30355` | F0DEF1E6E46A |
| wlp3s0 (Wi-Fi) | `COMPOSITE=F3B17C78293B` | 2477036FCD80 |
**Use the Ethernet CID** - it's more stable.
---
## Current License Configuration
**Permanent license valid until:** March 2, 2026
| License | Status |
|---------|--------|
| NX93300 (NX Design for Industrial Design) | 1 seat |
| SC13500 (Simcenter Structures) | 1 seat |
| TC10101 (Tc Author) | 1 seat |
| TC50100 (Teamcenter Rapid Start) | 1 seat |
| NX35050 (NX Value Based Licensing) | 50 tokens |
| + many more features | See license file |
---
## Client Setup (Windows Laptops)
### Step 1: Set Environment Variable
1. Open **System Properties** (`Win + R``sysdm.cpl`)
2. Click **Advanced****Environment Variables**
3. Under **System variables**, click **New**
4. Add:
- **Variable name:** `SPLM_LICENSE_SERVER`
- **Variable value:** `28000@dalidou;28000@100.80.199.40;29000@DESKTOP-PRECISION`
### Step 2: Verify in Siemens Licensing Tool
1. Open **Siemens Licensing Tool**
2. Go to **Environment Settings**
3. Confirm all servers show **Connection status: Successful**
### License Server Priority
| Priority | Server | Use Case |
|----------|--------|----------|
| 1st | `28000@dalidou` | Local network (fastest) |
| 2nd | `28000@100.80.199.40` | Remote via Tailscale |
| 3rd | `29000@DESKTOP-PRECISION` | Fallback if dalidou down |
---
## Server Installation (Already Done on Dalidou)
### Location
```
/opt/Siemens/LicenseServer/
├── lmgrd # FlexNet license manager
├── saltd # Siemens vendor daemon (v5)
├── ugslmd -> saltd # Symlink for compatibility
├── lmutil # License utilities
├── License_Ugslmd.lic # License file
└── logs/
└── lmgrd.log # Server log
```
### Systemd Service
```bash
# Service file: /etc/systemd/system/siemens-lmgrd.service
sudo systemctl status siemens-lmgrd # Check status
sudo systemctl start siemens-lmgrd # Start
sudo systemctl stop siemens-lmgrd # Stop
sudo systemctl restart siemens-lmgrd # Restart
```
### Manual Commands
```bash
cd /opt/Siemens/LicenseServer
# Check license status
./lmutil lmstat -a
# Check specific feature
./lmutil lmstat -f NX93300
# View log
tail -50 logs/lmgrd.log
# Start manually (if systemd not working)
./lmgrd -c License_Ugslmd.lic -l logs/lmgrd.log
```
### Firewall
```bash
# Port 28000 is open
sudo ufw status | grep 28000
```
---
## Updating the License File
When you receive a new license from Siemens:
1. **Edit the SERVER line** to match dalidou:
```
SERVER dalidou ANY 28000
VENDOR ugslmd
```
2. **Copy to dalidou:**
```bash
scp new_license.lic root@dalidou:/opt/Siemens/LicenseServer/License_Ugslmd.lic
```
3. **Restart the service:**
```bash
ssh root@dalidou "systemctl restart siemens-lmgrd"
```
4. **Verify:**
```bash
ssh root@dalidou "cd /opt/Siemens/LicenseServer && ./lmutil lmstat -a"
```
---
## ThinkPad Setup (When Repaired)
On your ThinkPad, follow the same **Client Setup** steps above:
1. Set `SPLM_LICENSE_SERVER` environment variable:
```
28000@dalidou;28000@100.80.199.40
```
2. Make sure **Tailscale** is installed and connected
3. Test with Siemens Licensing Tool
That's it - no license server installation needed on the ThinkPad!
---
## Troubleshooting
### License server not responding
```bash
# Check if running
ssh root@dalidou "ps aux | grep lmgrd"
# Check log for errors
ssh root@dalidou "tail -50 /opt/Siemens/LicenseServer/logs/lmgrd.log"
# Restart
ssh root@dalidou "systemctl restart siemens-lmgrd"
```
### Can't connect from laptop
1. Check Tailscale is connected: `tailscale status`
2. Ping dalidou: `ping 100.80.199.40`
3. Check firewall: `ssh root@dalidou "ufw status"`
### "All licenses in use" error
Only 1 seat per license - close NX on other machines first.
---
## SolidWorks (Future)
When setting up SolidWorks SNL license:
| Field | Value |
|-------|-------|
| Server Name | `dalidou` |
| MAC Address | `F0DEF1E6E46A` |
| License Server Port | `25734` |
---
## Port Reference
| Service | Port | Protocol |
|---------|------|----------|
| Siemens lmgrd (NX) | 28000 | TCP |
| SolidWorks SNL | 25734 | TCP |
---
## History
| Date | Change |
|------|--------|
| 2025-12-01 | Installed Siemens License Server v5.0.0 on dalidou |
| 2025-12-01 | Configured systemd auto-start service |
| 2025-12-01 | Set up SPLM_LICENSE_SERVER on Precision |
| 2025-12-01 | Temporary license active until Dec 3 |

248
docs/SIEMENS-DOCS-SERVER.md Normal file
View File

@@ -0,0 +1,248 @@
# Siemens Documentation Server on Dalidou
**Updated:** 2025-12-05
**Server:** dalidou (ThinkPad W520)
**Status:** OPERATIONAL
---
## Overview
This setup provides authenticated access to Siemens Support Center documentation (NX Open, Simcenter, Teamcenter) through an MCP server that can be used by Claude in Atomizer.
### Components
1. **Siemens Documentation Proxy** (port 5000) - Official Siemens proxy for documentation access
2. **Puppeteer Authentication** - Headless browser that handles Siemens SSO login
3. **MCP Server Tools** - Exposed via the dalidou-assistant MCP server
---
## Quick Start
### For Claude/Atomizer
The Siemens docs tools are automatically available through the MCP server. Use these tools:
| Tool | Description |
|------|-------------|
| `siemens_docs_search` | Search NX Open, Simcenter docs for a topic |
| `siemens_docs_fetch` | Fetch a specific documentation page by URL |
| `siemens_auth_status` | Check if authentication session is active |
| `siemens_login` | Re-login if session expired |
| `siemens_docs_list` | List available documentation categories |
### Example Usage
```
# Search for NX Open Session class
siemens_docs_search(query="NXOpen Session", product="nx")
# Fetch a specific page
siemens_docs_fetch(url="https://support.sw.siemens.com/en-US/knowledge-base/...")
# Check auth status
siemens_auth_status()
```
---
## Server Configuration
### Documentation Proxy Service
```bash
# Service status
ssh root@dalidou "systemctl status siemensdocumentationproxyserver"
# Restart if needed
ssh root@dalidou "systemctl restart siemensdocumentationproxyserver"
# View logs
ssh root@dalidou "cat /srv/siemens-docs/proxy/logs/*.log | tail -50"
```
**Location:** `/srv/siemens-docs/proxy/`
**Port:** 5000 (HTTP, bound to 0.0.0.0)
**API Key:** siemens-docs-2024
### MCP Server
```bash
# Files location
/srv/claude-assistant/
├── mcp-server/
│ └── server.js # Main MCP server (v1.2.0)
├── tools/
│ ├── siemens-auth.js # Puppeteer authentication
│ ├── siemens-docs.js # Documentation fetching
│ ├── weather.js # Weather tools
│ └── gitea.js # Gitea tools
└── vault/
├── siemens-creds.json # Siemens login credentials (secured)
└── siemens-cookies.json # Session cookies
```
---
## Authentication
The system uses Puppeteer (headless Chrome) to:
1. Navigate to `https://customer.sw.siemens.com`
2. Accept cookie consent
3. Click "Log In" → redirects to `login.siemens.com`
4. Enter email/username and password
5. Save session cookies for reuse
### Credentials Storage
Credentials are stored securely on Dalidou:
```bash
/srv/claude-assistant/vault/siemens-creds.json # chmod 600
```
### Session Management
- Cookies are saved after successful login
- Session typically lasts several hours
- The tools auto-detect expired sessions and re-login
---
## Troubleshooting
### "Session expired" or auth errors
```bash
# Force re-login
ssh root@dalidou "cd /srv/claude-assistant && node -e \"import docs from './tools/siemens-docs.js'; await docs.performLogin(); await docs.closeBrowser();\""
```
### "Page not found" errors
The Siemens documentation structure changes. Some URLs may be outdated. Use the search function to find current documentation.
### Browser issues
```bash
# Kill any stuck Chrome processes
ssh root@dalidou "pkill -f chrome"
# Clear cookies and re-login
ssh root@dalidou "rm /srv/claude-assistant/vault/siemens-cookies.json"
```
### Check all services
```bash
# Documentation Proxy
ssh root@dalidou "systemctl status siemensdocumentationproxyserver"
# Test proxy connectivity
ssh root@dalidou "curl -s http://localhost:5000/ | head -5"
# Test authentication
ssh root@dalidou "cd /srv/claude-assistant && node -e \"import docs from './tools/siemens-docs.js'; const r = await docs.checkAuthStatus(); console.log(r); await docs.closeBrowser();\""
```
---
## Updating Credentials
If your Siemens password changes:
```bash
ssh root@dalidou "cat > /srv/claude-assistant/vault/siemens-creds.json << EOF
{
\"username\": \"your.email@example.com\",
\"password\": \"your-new-password\"
}
EOF
chmod 600 /srv/claude-assistant/vault/siemens-creds.json"
```
---
## Technical Details
### Why Puppeteer Instead of Direct API?
Siemens Support Center uses:
- Single Sign-On (SSO) via `login.siemens.com`
- JavaScript-heavy SPA architecture
- Cookie-based session management
- No public API for documentation access
Puppeteer provides:
- Full browser rendering for SPA content
- Automatic SSO flow handling
- Cookie persistence for session reuse
### Documentation Proxy Purpose
The Siemens Documentation Proxy (`DocumentationProxy.3.3.1.aol`) is designed for:
- Serving documentation in air-gapped/offline environments
- Caching documentation locally
- Providing documentation access without individual logins
However, it still requires valid Siemens credentials for initial setup.
---
## NX Open Python Reference - Validated Access
**Status: FULLY OPERATIONAL** (Tested 2025-12-05)
### Base URL
```
https://docs.sw.siemens.com/documentation/external/PL20200522120320484/en-US/nx_open_python_ref/nx/1980/nx_open_python_ref/en-US/nxopen_python_ref/
```
### Verified Working Pages
| Page | URL | Status |
|------|-----|--------|
| Main Index | `index.html` | ✅ |
| Class Index | `classes.html` | ✅ |
| Class List | `annotated.html` | ✅ |
| Class Hierarchy | `hierarchy.html` | ✅ |
| Functions Index | `functions.html` | ✅ |
| **NXOpen.Session** | `a03318.html` | ✅ |
| **NXOpen.Part** | `a02434.html` | ✅ |
| **NXOpen.BasePart** | `a00266.html` | ✅ |
| NXOpen.PDM.PdmSession | `a50542.html` | ✅ |
| NXOpen.CAE.CaeSession | `a10510.html` | ✅ |
### Key Classes Quick Reference
```python
# Main entry points
NXOpen.Session # a03318.html - Main NX session object
NXOpen.Part # a02434.html - Part file object
NXOpen.BasePart # a00266.html - Base part class
# CAE/CAM
NXOpen.CAE.CaeSession # a10510.html - CAE session
NXOpen.CAM.CAMSession # Via Session.CAMSession()
# PDM/Teamcenter
NXOpen.PDM.PdmSession # a50542.html - PDM session
```
### URL Pattern Notes
- Class pages use format: `aXXXXX.html` (5-digit ID)
- Function pages: `functions.html`, `functions_a.html` through `functions_z.html`
- Namespace pages may return "Access Denied" when accessed directly
- Navigate through Class List (`annotated.html`) for best results
---
## Version History
| Date | Version | Changes |
|------|---------|---------|
| 2025-12-05 | 1.2.1 | Validated full NX Open Python Reference access |
| 2025-12-05 | 1.2.0 | Added Puppeteer-based authentication |
| 2025-12-05 | 1.1.0 | Installed Documentation Proxy, initial setup |

119
docs/thinkpad-setup.md Normal file
View File

@@ -0,0 +1,119 @@
# ThinkPad P16 Setup - Git LFS for CAD
When the ThinkPad comes back from repair, follow these steps to set up Git LFS for CAD versioning.
## Prerequisites
- Git installed (should already be there)
- Network access to dalidou (192.168.86.50)
## Setup Steps
### 1. Open PowerShell as Administrator
```powershell
cd C:\Users\Antoine\Documents\Dalidou-Server-Setup
```
### 2. Run the Setup Script
```powershell
.\windows-setup.ps1
```
This will:
- Verify Git is installed
- Install Git LFS if needed
- Initialize Git LFS globally
- Configure Git for large file uploads (500MB buffer)
### 3. Create or Clone CAD Repository
**Option A: Clone existing repo**
```powershell
git clone http://git.dalidou.home/antoine/cad-projects.git
cd cad-projects
```
**Option B: Initialize new repo**
1. Create repo in Gitea: http://git.dalidou.home
2. Clone it:
```powershell
git clone http://git.dalidou.home/antoine/YOUR-REPO-NAME.git
cd YOUR-REPO-NAME
```
### 4. Add LFS Configuration Files
```powershell
Copy-Item "..\Dalidou-Server-Setup\.gitattributes" .
Copy-Item "..\Dalidou-Server-Setup\.gitignore" .
```
### 5. Initialize Folder Structure (Optional)
```powershell
..\Dalidou-Server-Setup\init-cad-repo.ps1
```
### 6. Commit and Push
```powershell
git add .
git commit -m "Initialize CAD repository with LFS tracking"
git push
```
## Verify LFS is Working
```powershell
# Check tracked patterns
git lfs track
# Should show:
# *.prt filter=lfs ...
# *.sldprt filter=lfs ...
# etc.
```
## Test with a CAD File
```powershell
# Copy a test part file
Copy-Item "C:\path\to\some\test.prt" .
# Add and commit
git add test.prt
git commit -m "Test LFS upload"
git push
# Verify it used LFS
git lfs ls-files
# Should show: test.prt
```
## Daily Workflow
```powershell
# Lock before editing
git lfs lock "NX/Projects/MyProject/part.prt"
# Edit in NX...
# Commit
git add .
git commit -m "Updated part geometry"
git push
# Unlock
git lfs unlock "NX/Projects/MyProject/part.prt"
```
## Server Info
| | |
|---|---|
| Gitea URL | http://git.dalidou.home |
| Gitea IP | http://192.168.86.50:3000 |
| SSH | git@192.168.86.50:2222 |
| LFS Status | ✅ Enabled (Nov 27, 2025) |