f586b7adad
Neue VM 105 auf pve1: - Ubuntu 25.10 Cloud-Image, 12 GB RAM, 4 vCPU, 32 GB Disk - Xvfb :1 (1920x1080) + Openbox + TigerVNC + noVNC (Port 6080) - IBC für automatisierten IBKR TWS Login - IP: 192.168.10.43 (DHCP, vmbr0 VLAN 10) - Setup-Scripts: pve1/guests/vm105-finance/setup-tws.sh
112 lines
2.9 KiB
Markdown
112 lines
2.9 KiB
Markdown
# VM 105 — finance (IBKR TWS Trading-VM)
|
||
|
||
| | |
|
||
|---|---|
|
||
| **Proxmox** | pve1, VMID 105 |
|
||
| **IP** | 192.168.10.43 (DHCP) |
|
||
| **OS** | Ubuntu 25.10 (Questing Quokka) |
|
||
| **User** | `ubuntu` (sudo), SSH-Key: `/root/.ssh/finance_vm` |
|
||
| **VNC** | noVNC Browser: `http://<VM-IP>:6080/vnc.html` |
|
||
| **TWS** | `/home/tws/Jts/` |
|
||
| **IBC** | `/home/tws/ibc/` |
|
||
|
||
## Zweck
|
||
|
||
Dedizierte VM für Interactive Brokers Trader Workstation (TWS).
|
||
Headless-Betrieb via **Xvfb** (virtueller Framebuffer 1920×1080) + **noVNC** im Browser.
|
||
IBC automatisiert den Login.
|
||
|
||
## Stack
|
||
|
||
```
|
||
VM 105 finance (12 GB RAM, 4 vCPU, 32 GB Disk)
|
||
└── Xvfb :1 (1920×1080)
|
||
├── Openbox (WM, kein Desktop)
|
||
├── TigerVNC x0vncserver → Port 5900
|
||
├── noVNC + websockify → Port 6080 (Browser-Zugang)
|
||
└── TWS via IBC (automatischer Login, API Port 7497)
|
||
```
|
||
|
||
## Services
|
||
|
||
| Service | Unit | Status |
|
||
|---------|------|--------|
|
||
| Xvfb | `xvfb.service` | autostart |
|
||
| Openbox | `openbox.service` | autostart |
|
||
| VNC | `vncserver.service` | autostart |
|
||
| noVNC | `novnc.service` | autostart |
|
||
| TWS+IBC | `tws-ibc.service` | autostart |
|
||
|
||
```bash
|
||
# Status aller Services
|
||
systemctl status xvfb openbox vncserver novnc tws-ibc
|
||
|
||
# noVNC im Browser
|
||
http://192.168.10.XX:6080/vnc.html
|
||
|
||
# TWS API (local / aus dem LAN)
|
||
Host: 192.168.10.XX Port: 7497
|
||
```
|
||
|
||
## Wichtige Pfade
|
||
|
||
| Pfad | Inhalt |
|
||
|------|--------|
|
||
| `/home/tws/Jts/` | TWS Installation |
|
||
| `/home/tws/ibc/` | IBC Controller |
|
||
| `/home/tws/ibc/config.ini` | IBC Konfiguration (Login, Trading-Mode) |
|
||
| `/home/tws/.vnc/passwd` | VNC-Passwort |
|
||
| `/var/log/tws-ibc.log` | TWS/IBC Startlog |
|
||
|
||
## Setup-Script
|
||
|
||
Initiales Setup: [`setup-tws.sh`](setup-tws.sh)
|
||
|
||
```bash
|
||
# Auf dem Proxmox-Host ausführen (nach erstem Boot der VM):
|
||
ssh -i /root/.ssh/finance_vm ubuntu@192.168.10.XX 'bash -s' < /root/docu/pve1/guests/vm105-finance/setup-tws.sh
|
||
```
|
||
|
||
## IBC Konfiguration
|
||
|
||
> IBC (https://github.com/IbcAlpha/IBC) automatisiert TWS-Login und API-Aktivierung.
|
||
> Bei neuen TWS-Versionen ggf. `jvmOptions` in `config.ini` anpassen (--add-opens).
|
||
|
||
```ini
|
||
# /home/tws/ibc/config.ini (Auszug)
|
||
IbLoginId=DEIN_USERNAME
|
||
IbPassword=DEIN_PASSWORT
|
||
TradingMode=live # oder: paper
|
||
ReadOnlyLogin=no
|
||
AcceptNonBrokerageAccountWarning=yes
|
||
```
|
||
|
||
## TWS API
|
||
|
||
TWS muss API aktiviert haben (einmalig manuell in TWS-Einstellungen):
|
||
Edit → Global Configuration → API → Settings:
|
||
- [x] Enable ActiveX and Socket Clients
|
||
- Socket port: **7497**
|
||
- [x] Allow connections from localhost only *(deaktivieren falls remote)*
|
||
|
||
## Netzwerk
|
||
|
||
| | |
|
||
|---|---|
|
||
| Bridge | vmbr0 (VLAN 10, Management) |
|
||
| MAC | BC:24:11:CD:7F:9A |
|
||
| IP | 192.168.10.43 (DHCP) |
|
||
|
||
## Ressourcen
|
||
|
||
| | |
|
||
|---|---|
|
||
| RAM | 12 GB |
|
||
| CPU | 4 vCPU (host type) |
|
||
| Disk | 32 GB (thin, local-lvm) |
|
||
|
||
## Erstellt
|
||
|
||
2026-06-28 via Cloud-Image (ubuntu-25.10-cloudimg-amd64.img)
|
||
SSH-Key: `/root/.ssh/finance_vm` (pve1-root → tws-user)
|