Deploying Ring Camera Recording with Docker: From Continuous Recording to Motion-triggered Capture


1. Goal

  • Enable local recording of Ring camera streams.
  • Phase 1: Continuous recording.
  • Phase 2: Motion-triggered recording (battery/storage friendly).

2. Environment

  • Host: Ubuntu/Debian server or VM
  • Docker / Docker Compose installed
  • Ring camera already linked in the Ring app
  • Testbed used: local VM (same steps apply to production).

3. Core Configuration Files

MQTT broker

mosquitto/mosquitto.conf

listener 1883
allow_anonymous true

Ring-MQTT

ring-mqtt/config.json

{
  "mqtt_url": "mqtt://mqtt",
  "mqtt_options": {
    "username": "xxx@mail.com",
    "password": "yyy"
  },
  "ring_token": ""
}

⚠️ Note: ring_token is obtained via WebUI (http://<host_ip>:55123/). Do not expose the actual value.

Docker Compose

docker-compose.yml

version: "3.8"

services:
  mqtt:
    image: eclipse-mosquitto
    container_name: mosquitto
    restart: unless-stopped
    ports:
      - "1883:1883"
    volumes:
      - ./mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf

  ring-mqtt:
    image: tsightler/ring-mqtt
    container_name: ring-mqtt
    restart: unless-stopped
    depends_on:
      - mqtt
    ports:
      - "8554:8554"      # RTSP 流端口
      - "55123:55123"    # Web UI 端口
    volumes:
      - ./ring-mqtt:/data


4. Steps

  1. Start services: docker compose up -d
  2. Check Ring-MQTT logs: docker logs -f ring-mqtt → Access WebUI at http://<host_ip>:55123/ and generate your Ring token.
  3. Test recording manually: ffmpeg -i rtsp://localhost:8554/<DEVICE_ID>_live -t 30 test.mp4
  4. Verify recordings are saved under ./recordings/.

5. Common Issues & Fixes

  • Cannot connect RTSP → Ensure token generated & container restarted.
  • Recorder container fails → Use correct <DEVICE_ID>_live instead of camera name.
  • Files not saved → Check docker logs -f ring-recorder, confirm volume mounts.

6. Security Considerations

  • Always hide ring_token and <DEVICE_ID> in public configs.
  • Avoid continuous 24/7 recording if using battery-powered Ring devices.
  • Plan for storage growth if recording continuously.

7. Advanced Reference (Motion-triggered Recording)

By default, recording runs continuously, which can drain battery.
With MQTT events, we can start recording only when motion is detected.

Script Example

record_on_motion.sh

#!/bin/bash

DEVICE_ID="<DEVICE_ID>"       # Camera ID (hidden)
DURATION=90             # 每次录制时长(秒)
SAVE_PATH="./recordings"
LOG_FILE="./record_on_motion.log"

mkdir -p "$SAVE_PATH"

log() {
    MSG="[$(date +"%Y-%m-%d %H:%M:%S")] $1"
    echo "$MSG" | tee -a "$LOG_FILE"
}

# 持续订阅 motion 事件
mosquitto_sub -h localhost -t "ring/+/camera/$DEVICE_ID/motion/state" | while read state
do
    if [ "$state" == "ON" ]; then
        TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
        FILE="$SAVE_PATH/Front_$TIMESTAMP.mp4"
        log "Motion detected, start recording: $FILE (duration $DURATION seconds)"

        ffmpeg -rtsp_transport tcp -i rtsp://localhost:8554/${DEVICE_ID}_live \
            -t $DURATION -c copy "$FILE" >>"$LOG_FILE" 2>&1

        log "Recording finished: $FILE"
    fi
done

⚠️ Replace <DEVICE_ID> with your Ring camera’s internal ID.

Usage

chmod +x record_on_motion.sh
./record_on_motion.sh

→ When motion is detected, a short recording is automatically created.

8. Directory Layout

~/dev/ring
├── docker-compose.yml
├── record_on_motion.sh
├── mosquitto
│   ├── data
│   ├── log
│   └── mosquitto.conf
├── recordings
└── ring-mqtt
    ├── config.json
    ├── go2rtc.yaml
    └── ring-state.json

9. Appendix: Port Explanations

MQTT → 1883

  • Purpose: Message broker for events (motion, doorbell).
  • Who connects: record_on_motion.sh, Home Assistant, automation systems.

WebUI → 55123

  • Purpose: Token generation interface for Ring authentication.
  • Who connects: You (via browser, one-time login).

RTSP → 8554

  • Purpose: Provides camera video stream as RTSP.
  • Who connects: ffmpeg, VLC, recording service.

Quick Reference Table

PortProtocol/ServiceFunctionWho Uses It
1883MQTT brokerTransmit event messagesMotion script, Home Assistant, automations
55123WebUI (HTTP)Generate/manage Ring tokenYou (browser login)
8554RTSP video streamProvide live video streamffmpeg, VLC, recording service

Install Nextcloud on Ubuntu 25.04 (with HTTPS and Common Issues Fixed)


1. Update the System

sudo apt update && sudo apt upgrade -y

2. Install Apache, MariaDB, PHP and Extensions

sudo apt install -y apache2 mariadb-server libapache2-mod-php \
php php-mysql php-gd php-curl php-xml php-zip php-mbstring php-bz2 \
php-intl php-gmp php-imagick unzip wget -y

3. Create Database and User

sudo mysql -u root

Inside MariaDB:

CREATE DATABASE nextcloud;
CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'yourPassword';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

4. Download and Install Nextcloud

cd /tmp
wget https://download.nextcloud.com/server/releases/latest.zip
unzip latest.zip
sudo mv nextcloud /var/www/
sudo chown -R www-data:www-data /var/www/nextcloud

5. Configure Apache

5.1 HTTP → HTTPS Redirect (Port 80)

This avoids the issue where Apache’s default page shows up or ZeroTier IP access fails.
Create a global redirect config:

sudo tee /etc/apache2/sites-available/nextcloud-http.conf >/dev/null <<'EOF'
<VirtualHost *:80>
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</VirtualHost>
EOF

sudo a2enmod rewrite
sudo a2ensite nextcloud-http.conf

5.2 HTTPS VirtualHost

sudo nano /etc/apache2/sites-available/nextcloud-ssl.conf

Example content (replace with your real IP/domain):

<VirtualHost *:443>
    ServerName 192.168.xx.xx
    ServerAlias 192.168.yy.yy

    DocumentRoot /var/www/nextcloud
    <Directory /var/www/nextcloud>
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews
    </Directory>

    SSLEngine on
    SSLCertificateFile /etc/ssl/nextcloud/nextcloud-selfsigned.crt
    SSLCertificateKeyFile /etc/ssl/nextcloud/nextcloud-selfsigned.key

    ErrorLog ${APACHE_LOG_DIR}/nextcloud_ssl_error.log
    CustomLog ${APACHE_LOG_DIR}/nextcloud_ssl_access.log combined
</VirtualHost>

6. Generate a Self-Signed SSL Certificate

sudo mkdir -p /etc/ssl/nextcloud
cd /etc/ssl/nextcloud

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
  -keyout nextcloud-selfsigned.key \
  -out nextcloud-selfsigned.crt

Tip: For Common Name (CN) enter the IP or domain you plan to use.
If you need to support multiple IPs (LAN + ZeroTier), generate a SAN certificate.


7. Enable Modules and Sites

sudo a2enmod ssl headers env dir mime
sudo a2ensite nextcloud-ssl.conf
sudo systemctl reload apache2

8. Configure Firewall (if UFW is enabled)

sudo ufw allow 80
sudo ufw allow 443

9. Finish Nextcloud Setup

9.1 Access the Installer

Open in browser:

https://192.168.xx.xx
https://192.168.yy.yy   (ZeroTier IP)

Both should now work.


9.2 Fill in Setup Details

  • Admin username & password
  • Data folder (recommended: /var/nextcloud-data, not a VMware hgfs share)
  • Database user: nextclouduser
  • Database password: the strong password you set earlier
  • Database name: nextcloud

9.3 Fix Data Directory Permissions

If on a native Linux disk:

sudo mkdir -p /var/nextcloud-data
sudo chown -R www-data:www-data /var/nextcloud-data
sudo chmod -R 770 /var/nextcloud-data

If on VMware hgfs/Windows share, chmod won’t work → add to config.php:

'check_data_directory_permissions' => false,

9.4 Configure Trusted Domains

Edit:

sudo nano /var/www/nextcloud/config/config.php

Add your LAN and ZeroTier IPs:

'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '192.168.xx.xx',
    2 => '192.168.yy.yy',
  ),

This prevents the “Access through untrusted domain” error.


10. Client Notes

In the Nextcloud mobile app:

  • Yes → delete file on server and all synced devices.
  • Remove locally → only delete the local copy, file remains on the server.

📌 Key Takeaways

  • Default Apache page issue → solved by disabling 000-default.conf or global 80→443 redirect.
  • ZeroTier IP access issue → solved by adding ServerAlias and global redirect.
  • Data directory permission issue → solved by correct 770 on native disk or disabling check in config.
  • Untrusted domain error → solved by adding all used IPs/domains into trusted_domains.
  • HTTPS → self-signed is fine for testing; for production, use Let’s Encrypt.

VMware Ubuntu 25.04 Bridged Networking Setup Notes


During the setup of Ubuntu 25.04 on VMware Workstation, several common networking issues were encountered when configuring bridged networking.
This note documents the problems and their solutions in detail.


1. Initial Situation

  • After installation, the VM network defaults to NAT mode, with an IP in the 172.x.x.x range.
  • This allows Internet access, but all traffic goes through the host. The VM cannot be directly reached from other devices on the LAN.

2. Issue 1: Missing VMnet0 (Bridged Network)

  • Opening the Virtual Network Editor only showed:
    • VMnet1 (Host-only)
    • VMnet8 (NAT)
  • VMnet0 (bridged network) was missing.

Solution

  1. In the Virtual Network Editor, click Add Network (E).
  2. Select VMnet0 and set it to Bridged mode.
  3. In Bridged to (G):, avoid “Automatic” and instead manually bind VMnet0 to the physical adapter:
    • If the host uses Wi-Fi → choose the wireless adapter (Realtek / Intel Wireless).
    • If the host uses Ethernet → choose the wired Ethernet adapter.

3. Issue 2: VM Does Not Receive LAN IP

  • Even after enabling bridged networking, ip a still showed a NAT IP (172.17.x.x).
  • Cause: VMnet0 was not correctly bound to the physical NIC.

Solution

  1. In Virtual Network Editor, manually bind VMnet0 to the correct NIC (Wi-Fi or Ethernet).
  2. Inside the VM, request a new DHCP lease: sudo dhclient -4 ens33
  3. The VM should then receive a LAN IP, such as 192.168.1.63.

4. Issue 3: Other PCs Cannot Ping the VM

  • The VM can reach the Internet and ping other LAN devices.
  • But other LAN PCs cannot ping the VM.
  • Checking ARP tables shows the VM’s IP maps to the host’s Wi-Fi MAC, not the VM’s MAC.
  • This is a Wi-Fi bridging limitation: wireless NICs often do not allow VMs to use separate MAC addresses.

Solution Options

Option A: Use Wired Ethernet (most stable)

  • Plug in a LAN cable and bridge VMnet0 to the Ethernet adapter.
  • The VM becomes a fully independent LAN node, accessible from other devices.

Option B: Edit VMX Configuration

  • Edit the VM’s .vmx file and add: ethernet0.noPromisc = "FALSE" ethernet0.noForgedTransmit = "FALSE" ethernet0.noMACOverride = "FALSE"
  • Save and restart the VM.
  • ⚠️ Note: Not all Wi-Fi adapters support promiscuous mode. Success depends on hardware.

5. Verification Steps

  • Inside Ubuntu VM: ip a Confirm the VM has an IP in the same LAN subnet (e.g., 192.168.1.x).
  • Test Internet connectivity: ping -4 google.com
  • Test LAN access from another PC: ping <VM-IP> If reachable → bridged networking works.
    If unreachable → likely a Wi-Fi bridging limitation.

6. Summary

  • NAT mode: Internet access works, but LAN cannot reach the VM.
  • Bridged mode (VMnet0): The VM should act as a LAN node, but Wi-Fi bridging often fails.
  • Solutions:
    • Wired bridge (Ethernet) → most stable.
    • Wi-Fi + VMX config tweaks → may work, hardware dependent.

Getting Started with Seeed Studio XIAO ESP32S3 Sense: Camera Streaming


1. Setting Up the Development Environment

I recommend using PlatformIO (VS Code extension) instead of Arduino IDE. PlatformIO has native support for the XIAO ESP32S3 Sense, so you don’t need to fall back on “ESP32S3 Dev Module.”

  • Install VS Code
  • Install PlatformIO IDE extension
  • Create a new project, and select:
    • Board: Seeed Studio XIAO ESP32S3
    • Framework: Arduino

Your platformio.ini should look like this:

[env:seeed_xiao_esp32s3]
platform = espressif32
board = seeed_xiao_esp32s3
framework = arduino
monitor_speed = 115200


2. LED Blink Test

Always start simple. Run a blink sketch to confirm that the board and toolchain are working.

#include <Arduino.h>
#define LED_BUILTIN 21   // Yellow onboard LED

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);
}

If the yellow LED blinks, your setup is good to go.


3. Camera Initialization & Web Streaming

The XIAO ESP32S3 Sense comes with an OV2640 camera module. Below is a simplified snippet of the setup code (PlatformIO + Arduino framework):

#include "esp_camera.h"
#include <WiFi.h>
#include <WebServer.h>

#define XCLK_GPIO_NUM  10
#define SIOD_GPIO_NUM  40
#define SIOC_GPIO_NUM  39
#define Y9_GPIO_NUM    48
#define Y8_GPIO_NUM    11
#define Y7_GPIO_NUM    12
#define Y6_GPIO_NUM    14
#define Y5_GPIO_NUM    16
#define Y4_GPIO_NUM    18
#define Y3_GPIO_NUM    17
#define Y2_GPIO_NUM    15
#define VSYNC_GPIO_NUM 38
#define HREF_GPIO_NUM  47
#define PCLK_GPIO_NUM  13

const char *ssid = "YourWiFi";
const char *password = "Password";

WebServer server(80);

void startCameraServer() {
  server.on("/", HTTP_GET, []() {
    server.send(200, "text/html", "<h1>ESP32S3 Camera</h1><img src=\"/stream\">");
  });
  server.begin();
}

When successful, you’ll see an IP address in the Serial Monitor (e.g. 192.168.1.104).
Open http://192.168.1.104/stream in a browser to view the camera feed.


4. WiFi Connection & Debugging

A very common beginner issue is WiFi not connecting. Here are some tips:

  • ESP32 supports only 2.4GHz WiFi (no 5GHz support).
  • Keep your SSID and password simple (no unusual characters).
  • Use a WiFi scan to confirm available networks:
Serial.println("Scanning WiFi...");
int n = WiFi.scanNetworks();
for (int i = 0; i < n; i++) {
  Serial.printf("%d: %s (%d dBm)\n", i+1, WiFi.SSID(i).c_str(), WiFi.RSSI(i));
}
  • Print connection status codes while connecting:
    • 1 = WL_NO_SSID_AVAIL → AP not found
    • 3 = WL_CONNECTED → Connected successfully
    • 4 = WL_CONNECT_FAILED → Wrong password

5. Power Supply Pitfalls (The Biggest Trap!)

Here’s the #1 issue I ran into:

  • When powered via PC USB → everything worked, video stream was fine.
  • When powered via a cheap USB adapter or power bank → black screen, page not loading, or extreme lag.

Why? The ESP32S3 + Camera can draw 500–700mA at peak. Many USB adapters and thin cables can’t supply this reliably.

Fixes

  • Use a stable 5V / 2A USB power adapter
  • Use a short, thick USB cable (30–50 cm, rated for 2A current)
  • If you must use a weak power source, lower the camera load:
config.frame_size   = FRAMESIZE_QQVGA;   // 160x120
config.jpeg_quality = 20;                // High compression
config.xclk_freq_hz = 10000000;          // Lower clock speed
config.fb_count     = 1;                 // Single framebuffer

6. Common Issues & Solutions

  • Black screen → Power supply too weak / camera init failed
  • Page loads but extremely slow → WiFi unstable or CPU overloaded with JPEG compression
  • WiFi won’t connect → Check 2.4GHz availability, WPA2-PSK(AES) recommended
  • High latency → Either power issue or resolution too high

7. Suggested Beginner Workflow

  1. Verify development environment with LED Blink
  2. Test WiFi connectivity with a network scan
  3. Connect to WiFi and run basic camera streaming
  4. Solve power supply issues for stability
  5. Fine-tune resolution, frame rate, and JPEG quality for your use case

8. Changing PlatformIO Default Project Directory

By default, PlatformIO creates all new projects under:

~/Documents/PlatformIO/Projects/

On Linux, this path expands to something like:

/home/username/Documents/PlatformIO/Projects/

If you prefer to keep your projects in another location (for example, under ~/dev/platformio_projects), you can change this setting inside VS Code.

Steps:

  1. Open VS Code.
  2. Press Ctrl+Shift+P → type Preferences: Open User Settings (JSON).
  3. In the settings.json, add the following line: "platformio-ide.projectsDir": "/home/yourname/dev/platformio_projects"
  4. Save and restart VS Code.

From now on, all new PlatformIO projects will be created under your custom directory.


Getting Started with Seeed Studio XIAO ESP32S3 Sense + Arduino IDE (LED Blink Test)


If you’ve just received your Seeed Studio XIAO ESP32S3 Sense, this step-by-step guide will walk you through setting up the Arduino IDE, installing the correct board support, and running your first LED blink test.


1. Install Arduino IDE


2. Install ESP32 Board Support

  1. Open Arduino IDE → File → Preferences
  2. In Additional Board Manager URLs, add the following link:
https://espressif.github.io/arduino-esp32/package_esp32_index.json
  1. Click OK to save.
  2. Go to Tools → Board → Board Manager.
  3. Search for esp32, then install esp32 by Espressif Systems (latest version, currently 3.3.0).

⚠️ Important:
Do not use Arduino ESP32 Boards by Arduino. That package has incomplete support. Always use Espressif Systems (official).


3. Select the Correct Board

Navigate to:
Tools → Board → esp32 → ESP32S3 Dev Module

(Even though the XIAO ESP32S3 is not explicitly listed, selecting “ESP32S3 Dev Module” works perfectly.)


4. Select the Serial Port

Go to Tools → Port and choose your device, e.g.:

/dev/ttyACM0

If you don’t see it:

  • Try a different USB cable (must be a data cable, not a charge-only cable).
  • On Linux, you may need to add your user to the dialout group:
sudo usermod -a -G dialout $USER

Log out and log back in.


5. Test the LED (Blink Example)

Create a new sketch (.ino) and paste the following code:

#define LED_BUILTIN 21   // Onboard yellow LED on GPIO21

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn LED on
  delay(500);
  digitalWrite(LED_BUILTIN, LOW);   // turn LED off
  delay(500);
}
  • Click Upload (→).
  • If the small yellow LED starts blinking, everything is working! 🎉

6. Troubleshooting

  • LED doesn’t blink
    • The power LED (always on) cannot be controlled. The correct controllable LED is the small yellow LED on GPIO21.
  • Compilation error: missing partition CSV
    • Ensure you selected ESP32S3 Dev Module.
  • No /dev/ttyACM0 port found
    • Check your USB cable (use a proper data cable).
    • Add user to dialout group (Linux).

✅ Conclusion

At this point, your XIAO ESP32S3 Sense is successfully set up with Arduino IDE. You can now control the onboard LED and are ready to explore more advanced features such as WiFi and the camera module.

AWS CLI Setup and Configuration on Windows


1. Install AWS CLI

Download and install the AWS CLI v2 for Windows:
👉 AWS CLI v2 MSI Installer (64-bit)

Verify installation:

aws --version

2. Create Access Keys

In the AWS Console:

  • Go to Security credentials
  • Under Access keys, click Create access key
  • Save both:
    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY (⚠️ only shown once)

3. Configure Credentials

Run in PowerShell:

aws configure

Enter:

AWS Access Key ID: <your_key_id>
AWS Secret Access Key: <your_secret_key>
Default region name: ap-northeast-1
Default output format: json

4. Verify Setup

aws sts get-caller-identity

Expected output:

{
  "UserId": "...",
  "Account": "123456789012",
  "Arn": "arn:aws:iam::123456789012:user/your-user"
}

✅ Done! You are now ready to use AWS CLI on Windows.
Example:

aws s3 ls

Docker/主机上用 nftables 做透明代理端口改写


场景:当容器或主机访问 xx.xx.xx.xx:5668 / 9100 时,自动改写为 yy.yy.yy.yy.yy:26880 / 26881。


主机上执行(PREROUTING)

# 新建一个名为 nat 的 IPv4 表;若系统已存在同名表会报错,可用 `nft list tables` 先检查
sudo nft add table ip nat

# 在 ip nat 表下创建基础链 prerouting;用于 NAT,挂载在 prerouting hook(路由前处理进入本机的包),priority -100 是常见优先级
sudo nft add chain ip nat prerouting '{ type nat hook prerouting priority -100; }'

# 规则:当目标 IP=xx.xx.xx.xx 且 TCP 端口=5668 时,做 DNAT,把目标改写为 yy.yy.yy.yy.yy:26880
sudo nft add rule ip nat prerouting ip daddr xx.xx.xx.xx tcp dport 5668 dnat to yy.yy.yy.yy.yy:26880

# 规则:当目标 IP=xx.xx.xx.xx 且 TCP 端口=9100 时,做 DNAT,把目标改写为 yy.yy.yy.yy.yy:26881
sudo nft add rule ip nat prerouting ip daddr xx.xx.xx.xx tcp dport 9100 dnat to yy.yy.yy.yy.yy:26881

# 查看当前 prerouting 链规则,确认是否写入成功(会显示 handle 编号,可用于回滚删除)
sudo nft list chain ip nat prerouting


(可选)容器内做出站透明代理(OUTPUT)

# 仅在容器内部执行;容器需要具备 CAP_NET_ADMIN
sudo nft add table ip nat

# 在 ip nat 表下创建 output 链;用于 NAT,挂载在 output hook(处理容器自己发出的包),priority -100 常见
sudo nft add chain ip nat output '{ type nat hook output priority -100; }'

# 规则:容器内发向 xx.xx.xx.xx:5668 的连接,DNAT 到 yy.yy.yy.yy.yy:26880
sudo nft add rule ip nat output ip daddr xx.xx.xx.xx tcp dport 5668 dnat to yy.yy.yy.yy.yy:26880

# 规则:容器内发向 xx.xx.xx.xx:9100 的连接,DNAT 到 yy.yy.yy.yy.yy:26881
sudo nft add rule ip nat output ip daddr xx.xx.xx.xx tcp dport 9100 dnat to yy.yy.yy.yy.yy:26881

# 查看当前 output 链规则,确认是否写入成功
sudo nft list chain ip nat output


PREROUTING vs OUTPUT 对比表

场景使用链生效时机适用对象典型用途
主机 / 宿主机执行prerouting路由前处理进入主机的数据包外部请求、容器出网经过主机转发的流量拦截发往特定 IP:PORT 的连接并转发到代理
容器内执行output容器自己发出的数据包刚产生时容器内进程主动发起的连接在容器内部“透明代理”出站连接

PREROUTING是“从外面拦截”,不跨命名空间、不要容器权限、不依赖容器DNS;OUTPUT是“从里面改写”,容易踩权限/命名空间/DNS的坑,更容易出问题。

Two Must‑Do Keys to Make RustDesk + ZeroTier Work Reliably from Outside Your Home LAN

1) ZeroTier Managed Routes (both are required)

  • <ZT_CIDR>:(LAN): the ZeroTier overlay subnet (ensures traffic to ZeroTier members goes through the tunnel)
  • <LAN_CIDR> via <ZT_SERVER_IP>:via : route all traffic to the home LAN via the server node (so the phone can reach the home LAN hbbr/target PCs)

How to set:

  • ZeroTier Central → your Network → Routes → Add
  • Ensure the phone’s ZeroTier client is Authorized and Online

2) Quick fix for common issue
“ID does not exist”
Check:

  • ID Server:
  • Relay Server:
  • Public Key: the full content of the server’s id_ed25519.pub

Client service not started:

  • Open the RustDesk Client GUI, click “Start service” at the bottom, wait until the status shows “Ready,” then try again

ZeroTier + LAN Route Fix (Windows)

  • Force LAN traffic to use the physical router with highest priority, persistent across reboots. route add 192.168.1.0 mask 255.255.255.0 192.168.1.1 metric 1 -p
  • Remove the static route above to revert to default behavior. route delete 192.168.1.0 mask 255.255.255.0 192.168.1.1 

Both require Administrator privileges and take effect immediately.

How to Integrate Anthropic Models into Open WebUI


If you already have Open WebUI running properly in a Docker environment, simply follow these steps to add Anthropic models support:

  1. Open your Open WebUI in a browser (your server address) and log in with your account.
  2. Click your username at the bottom left corner to enter the Admin Panel.
  3. In the Admin Panel, select “Connections”. Change the API address to http://your server address:9099, and set the API Key to 0p3n-w3bu!.
  4. Open a new terminal (or Docker container terminal) and enter your openwebui directory.
    If you are using Docker, make sure the pipelines service is reachable by the Open WebUI container. You can run the following steps on your host machine or inside the container.
  5. Clone the pipelines project and enter the directory:
    git clone https://github.com/open-webui/pipelines && cd pipelines
  6. Install required dependencies and start the pipelines service:
    pip install -r requirements.txt
    ./start.sh
  7. In your browser, visit https://openwebui.com/f/justinrahb/anthropic.
  8. On that page, click Get, then click Open WebUI URL, and then click Import to WebUI. This will integrate the Anthropic model provider into your local Open WebUI instance.
  9. After import is successful, click the gear icon next to “Functions” to set your Anthropic API Key (you can obtain your key at https://console.anthropic.com/settings/keys).
  10. Save your settings.
  11. Restart both services/terminals if needed (for Docker, restart containers; for terminal, Ctrl+C and rerun pipelines and Open WebUI).
  12. Return to your Open WebUI home – now you can use Anthropic models with streaming capability!

Notes:

  • For Docker deployment, ensure the pipelines service’s 9099 port can be accessed from the Open WebUI container. You might need to set up port mappings or use the same Docker network.
  • If you have firewall, SELinux, or other security software, make sure to allow access to port 9099.
  • If you encounter loading or error issues, check that both the pipelines service and Open WebUI are running, and that network/ports are correctly configured.

That’s it! Now you can harness the power of Anthropic’s state-of-the-art language models right inside your local Open WebUI.


🔧 Update: Support for Claude 4.5 and New Pipelines Behavior

If you see a 403 Forbidden or Not authenticated error when connecting, set the following environment variable before starting Pipelines:

export PIPELINES_API_KEY="0p3n-w3bu!"
./start.sh

Then, in Open WebUI → Admin Panel → Connections, set the same API Key value (0p3n-w3bu!).


Anthropic API Key Now Configured Separately

After importing the anthropic_manifold_pipeline.py, go to Settings → Pipelines → anthropic_manifold_pipeline, and enter your official Anthropic API key (sk-ant-...) under Anthropic API Key.

Do not enter 0p3n-w3bu! here — that one is only for the WebUI ↔ Pipelines connection.


If Claude 4.5 Models Don’t Show Up

Edit the file:

examples/pipelines/providers/anthropic_manifold_pipeline.py

And add these lines inside the get_anthropic_models() list:

{"id": "claude-sonnet-4-5-20250929", "name": "claude-4.5-sonnet"},
{"id": "claude-haiku-4-5-20251001", "name": "claude-4.5-haiku"},

Then restart Pipelines and re-import the .py file from the WebUI.


Uploading or Installing the Pipeline

Option 1: Upload directly

Via Settings → Pipelines → “Click here to select a .py file” and choose your local anthropic_manifold_pipeline.py.

Option 2: Install from GitHub Raw URL

https://raw.githubusercontent.com/open-webui/pipelines/main/examples/pipelines/providers/anthropic_manifold_pipeline.py

Verify the Connection

Run:

curl -H "Authorization: Bearer 0p3n-w3bu!" http://127.0.0.1:9099/models

If it returns a JSON list of models (including claude-4.5-sonnet and claude-4.5-haiku), your Pipelines service and Open WebUI are now properly connected.


References:

Gemini CLI Installation Guide


🔧 Installation Methods

Method 1: Quick Installation with npx (Recommended)

Features: No need for global installation, ideal for temporary use

npx https://github.com/google-gemini/gemini-cli

Method 2: Global Installation

Features: Suitable for continuous use

npm install -g @google/gemini-cli

🚀 How to Start

After installation, launch Gemini CLI with the following command:

gemini

🔑 Setting Your API Key

1. Obtain Your API Key

🛠️ Steps to set up API key in GCP:

  • Log in to GCP and enable the Gemini API:
    Access: https://console.cloud.google.com/
  • Enable: search for “Generative Language API” and enable it.
  • Create API key: “APIs & Services” > “Credentials” > Create API key

2. Set the API Key Environment Variable

For Linux / macOS:

export GEMINI_API_KEY="your-api-key"

For Windows:

set GEMINI_API_KEY="your-api-key"

📚 References

Official Repository:
https://github.com/google-gemini/gemini-cli


⚠️ Notes

  • Make sure to manage permissions appropriately in production environments.
  • Always check the official documentation for the latest information.
在 WordPress.com 上免费创建您自己的网站。创建您自己的网站。
免费开始