This directory contains everything you need to deploy a RustDesk server on Ubuntu using Docker.
Transfer the entire Rust_Server directory to your Ubuntu server:
# Using scp (from your local machine)
scp -r Rust_Server/ user@your-server-ip:/home/user/
# Or upload via your preferred method (SFTP, etc.)On your Ubuntu server, navigate to the directory and run:
cd Rust_Server
./install.shThat's it! The script will:
- Install Docker and Docker Compose
- Configure the firewall
- Build and start the RustDesk server
- Display connection information
- Docker Engine - Container runtime
- Docker Compose - Multi-container orchestration
- RustDesk Server - Signal and relay servers
- Firewall Rules - UFW configured for RustDesk ports
Use the management script for easy server control:
# Start the server
./manage.sh start
# Stop the server
./manage.sh stop
# Restart the server
./manage.sh restart
# Check status
./manage.sh status
# View logs
./manage.sh logs
# Show connection info
./manage.sh info
# Update server
./manage.sh update
# Create backup
./manage.sh backupAfter installation, configure your RustDesk clients with:
- ID Server:
your-server-ip:21116 - Relay Server:
your-server-ip:21117
21115(TCP) - Signal Server21116(TCP/UDP) - Signal Server21117(TCP) - Relay Server21118(TCP) - Relay Server21119(TCP) - Relay Server
Rust_Server/
├── Dockerfile # Docker image definition
├── docker-compose.yml # Container orchestration
├── install.sh # One-click installation
├── manage.sh # Server management
├── .env # Environment variables
├── README.md # This file
├── data/ # Server data (created during install)
└── logs/ # Server logs (created during install)
./manage.sh status./manage.sh logs# Start
docker-compose up -d
# Stop
docker-compose down
# Rebuild
docker-compose build --no-cache# Check UFW status
sudo ufw status
# Manually open ports if needed
sudo ufw allow 21115:21119/tcp
sudo ufw allow 21116/udp# Add user to docker group
sudo usermod -aG docker $USER
# Then logout and login again- The server runs as a non-root user inside the container
- Firewall is automatically configured
- Data is persisted in local directories
- Regular backups can be created with
./manage.sh backup
To update the RustDesk server:
./manage.sh updateThis will rebuild the container with the latest version and restart the services.
If you encounter issues:
- Check the logs:
./manage.sh logs - Verify firewall settings:
sudo ufw status - Ensure Docker is running:
sudo systemctl status docker - Check port availability:
netstat -tulpn | grep 2111
You can modify settings in the .env file:
RUSTDESK_VERSION- Version to installRUSTDESK_RELAY_SERVER- Relay server address- Port configurations
- Logging levels
After changing .env, restart the server:
./manage.sh restart