https://github.com/lantongxue/rustdesk-api-server-pro
🚀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.
https://github.com/lantongxue/rustdesk-api-server-pro
rustdesk rustdesk-api-server
Last synced: 6 months ago
JSON representation
🚀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.
- Host: GitHub
- URL: https://github.com/lantongxue/rustdesk-api-server-pro
- Owner: lantongxue
- License: agpl-3.0
- Created: 2024-06-17T15:48:39.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-12-03T07:44:37.000Z (8 months ago)
- Last Synced: 2025-12-05T00:57:43.377Z (8 months ago)
- Topics: rustdesk, rustdesk-api-server
- Language: TypeScript
- Homepage:
- Size: 6.58 MB
- Stars: 222
- Watchers: 9
- Forks: 48
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## This project will be rewrite
See https://github.com/lantongxue/rustdesk-api-server-pro/issues/30
Rustdesk Api Server Pro
============
[English](https://github.com/rustdesk/rustdesk) | [ç®€ä½“ä¸æ–‡](https://github.com/lantongxue/rustdesk-api-server-pro/blob/master/README_CN.md)
This is an open source Api server based on the open source [RustDesk](https://github.com/rustdesk/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!
## Special Sponsor
CDN acceleration and security protection for his project are sponsored by Tencent EdgeOne.
Best Asian CDN, Edge, and Secure Solutions - Tencent EdgeOne

## Features
- Synchronized RuskDesk version (Currently adapted client: 1.2.7)
- Pure Go implementation of all interfaces
- Visual management interface
- Internationalization support
- Statistics panel
- User Management
- 2FA & Email Verify Code
- Session Management
- Log Audit
- Lightweight & Cross Platform
- Minimal sqlite
- Support for major operating systems and architectures
## Deploying with Docker(recommend)
1. pull image
```shell
docker pull ghcr.io/lantongxue/rustdesk-api-server-pro:latest
```
2. create config
```shell
cat > /your/path/server.yaml < The container image listens on port `8080` by default.
> Default configuration file path `/app/data/server.yaml`, you can specify your own configuration file with `-v`.
### Docker compose
```yaml
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
```
### Environment variables
| 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 |
## Build from source
### Required
- Golang >= 1.21.4
- NodeJs ~= latest(recommend LTS)version
- pnpm ~= latest
### Build
1. Get source code
```shell
git clone https://github.com/lantongxue/rustdesk-api-server-pro.git
```
2. Build the api-server
```shell
cd backend && go build
```
3. Build the frontend
```shell
cd soybean-admin && pnpm i && pnpm build
```
### Run
#### api-server
Assuming the compiled binary file is called `rustdesk-api-server-pro.exe`.
1. Synchronize the database table structure
```shell
rustdesk-api-server-pro.exe sync
```
2. Add your first user
```shell
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
3. Start the server
```shell
rustdesk-api-server-pro.exe start
```
> Listening on port `8080` by default
#### Web Management Interface
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:
```nginx
#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/
```
## CLI help
```shell
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.
```
## Follow-up plan
We will continue to follow up the RustDesk client and implement the corresponding interfaces, which will be a long-term plan.
## Sponsorship
If you found this project helpful, why not buy the developers a cup of coffee :)

**Thank you for your sponsorship**
## License
> You can view the full license [here](https://github.com/lantongxue/rustdesk-api-server-pro/blob/master/LICENSE)
This project is under the terms of the **MIT** license.