Loading repository data…
Loading repository data…
lantongxue / repository
🚀This is an open source Api server based on the open source RustDesk client, the implementation of the client all Api interfaces, and provides a Web-UI for the management of data.
See https://github.com/lantongxue/rustdesk-api-server-pro/issues/30
This is an open source Api server based on the open source RustDesk client, the implementation of the client all Api interfaces, and provides a Web-UI for the management of data.
We strive to achieve functionality with the simplest possible code and structure!
CDN acceleration and security protection for his project are sponsored by Tencent EdgeOne.
Best Asian CDN, Edge, and Secure Solutions - Tencent EdgeOne

1.4.6translate_mode enabled at >=1.4.6)rustdesk install --version supports both 1.4.6 and Branch_1.4.6cd backend && go test ./...cd soybean-admin && pnpm typecheck && pnpm lint && pnpm buildlogin, devices, users, auditsoybean-admin/tests/e2ecd backend
go run . sync
go run . user add admin admin123456 --admin
E2E_SKIP_CAPTCHA=true go run . start
cd soybean-admin
pnpm i
npx playwright install chromium
cd soybean-admin
E2E_ADMIN_USER=admin E2E_ADMIN_PASS=admin123456 pnpm test:e2e
build-release.yml supports optional full-stack Playwright E2E.workflow_dispatch with run_playwright_e2e=true.docker pull ghcr.io/lantongxue/rustdesk-api-server-pro:latest
cat > /your/path/server.yaml <<EOF
signKey: "sercrethatmaycontainch@r$32chars" # this is the token signing key. change this before start server
debugMode: true # debug mode
db:
driver: "sqlite"
dsn: "./server.db"
timeZone: "Asia/Shanghai" # setting the time zone fixes the database creation time problem
showSql: false
# driver: "mysql"
# dsn: "root:123@tcp(localhost:3306)/test?charset=utf8mb4"
httpConfig:
printRequestLog: true
staticdir: "/app/dist"
port: ":12345" # api server port
smtpConfig:
host: "127.0.0.1"
port: 1025
username: "test"
password: "test"
encryption: "none" # none ssl/tls starttls
from: "test@localhost.com"
jobsConfig:
deviceCheckJob:
duration: 30
EOF
docker run \
--name rustdesk-api-server-pro \
-d \
-e ADMIN_USER=admin \ #Administrator account (optional)
-e ADMIN_PASS=yourpassword \ #Administrator password (optional)
-e TZ=Asia/Shanghai \ #must match the 'timeZone' setting in server.yaml
-p 8080:8080 \
-v /your/path:/app/data \
ghcr.io/lantongxue/rustdesk-api-server-pro:latest
docker exec rustdesk-api-server-pro rustdesk-api-server-pro user add admin yourpassword --admin
The container image listens on port
8080by default.
Default configuration file path
/app/data/server.yaml, you can specify your own configuration file with-v.
services:
rustdesk-api-server-pro:
container_name: rustdesk-api-server-pro
image: ghcr.io/lantongxue/rustdesk-api-server-pro:latest
environment:
- "ADMIN_USER=youruser"
- "ADMIN_PASS=yourpassword"
- "TZ=Asia/Shanghai"
volumes:
- ./server.yaml:/app/data/server.yaml
network_mode: host
restart: unless-stopped
| Variables | Default Values | Description |
|---|---|---|
| ADMIN_USER | - | Default administrator account |
| ADMIN_PASS | - | Default administrator password |
| TZ | - | Container OS timezone; must match the app setting in YAML file |
git clone https://github.com/lantongxue/rustdesk-api-server-pro.git
cd backend && go build
cd soybean-admin && pnpm i && pnpm build
Assuming the compiled binary file is called rustdesk-api-server-pro.exe.
rustdesk-api-server-pro.exe sync
rustdesk-api-server-pro.exe user add admin yourpassword --admin
--admin is optional, when enabled the added user is an administrator user, otherwise it is a regular user
rustdesk-api-server-pro.exe start
Listening on port
8080by default
For this step you need a web server software (e.g. nginx, apache, etc.), by copying the packaged product to the web root directory.
Typically, the packaged product is in the soybean-admin/dist directory.
Reverse Proxy Configuration, you need to configure reverse proxy in nginx or other WEB servers, through the reverse proxy server can access the interface address correctly.
Here's my backend reverse proxy configuration for you to refer to:
#PROXY-START /api for rustdesk client
location ^~ /api
{
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host 127.0.0.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
add_header X-Cache $upstream_cache_status;
}
#PROXY-END/
#PROXY-START /admin for web-ui
location ^~ /admin
{
proxy_pass http://127.0.0.1:8080/admin;
proxy_set_header Host 127.0.0.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
add_header X-Cache $upstream_cache_status;
}
#PROXY-END/
Usage:
rustdesk-api-server-pro [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
rustdesk About rustdesk-server command
start Start the api-server
sync The api-server database synchronization
user User management
Flags:
-h, --help help for rustdesk-api-server-pro
Use "rustdesk-api-server-pro [command] --help" for more information about a command.
We will continue to follow up the RustDesk client and implement the corresponding interfaces, which will be a long-term plan.
If you found this project helpful, why not buy the developers a cup of coffee :)
Thank you for your sponsorship
You can view the full license here
This project is under the terms of the MIT license.