rustdesk

ID服务器 desk.lsmir2.com

API服务器 https://desk.lsmir2.com

key: 5ZbJXrNU4Gb8QQT8JPoAnb2bnEYlsq8Qpfvo8y4EPlQ=

1Panel 编排.

networks:
    1panel-network:
        external: true
services:
    rustdesk:
        container_name: ${CONTAINER_NAME}
        deploy:
            resources:
                limits:
                    cpus: ${CPUS}
                    memory: ${MEMORY_LIMIT}
        environment:
            - RELAY=${HOST_ADDRESS}:${PANEL_APP_PORT_HBBR}
            - ENCRYPTED_ONLY=1
        image: rustdesk/rustdesk-server-s6:latest
        labels:
            createdBy: Apps
        networks:
            - 1panel-network
        ports:
            - ${HOST_IP}:${PANEL_APP_PORT_NAT}:21115
            - ${HOST_IP}:${PANEL_APP_PORT_HBBS}:21116
            - ${HOST_IP}:${PANEL_APP_PORT_HBBS}:21116/udp
            - ${HOST_IP}:${PANEL_APP_PORT_HBBR}:21117
            - ${HOST_IP}:${PANEL_APP_PORT_WEB_CLIENT_1}:21118
            - ${HOST_IP}:${PANEL_APP_PORT_WEB_CLIENT_2}:21119
        restart: always
        volumes:
            - ./data/hbbs:/data
    rustdesk-api-server:
        container_name: rustdesk-api-server
        deploy:
            resources:
                limits:
                    cpus: ${CPUS}
                    memory: ${MEMORY_LIMIT}
        environment:
            - CSRF_TRUSTED_ORIGINS=https://desk.lsmir2.com #跨域配置
            - ID_SERVER=desk.lsmir2.com         #配置域名
        image: ghcr.io/kingmo888/rustdesk-api-server:latest
        networks:
            - 1panel-network
        ports:
            - ${HOST_IP}:21114:21114
        restart: unless-stopped
        volumes:
            - ./data:/rustdesk-api-server/db
            - ./data:/etc/timezone:ro
            - ./data:/etc/localtime:ro
version: "3"

反向代理 127.0.0.1:21114 即可

如果没用反向代理 直接连接端口 CSRF_TRUSTED_ORIGINS=域名:端口

CSRF_TRUSTED_ORIGINS=https://desk.lsmir2.com:21114