Sign inSign up

oaklight/rdp_vm

By oaklight

•Updated about 1 year ago

Ubuntu XFCE4 desktop in Docker with XRDP and RustDesk access, plus persistent storage.

Image
0

1.1K

oaklight/rdp_vm repository overview

⁠RDP VM with Persistent Storage

A Docker-based remote desktop environment with Ubuntu, XFCE4, XRDP, and RustDesk support, featuring persistent storage capabilities.

⁠Features

  • Ubuntu Desktop Environment: Full XFCE4 desktop with Firefox browser
  • Remote Access: Both XRDP (port 3389) and RustDesk support
  • Persistent Storage: All user data, configurations, and installed applications persist between container restarts
  • File Sharing: Host directory mounting for easy file transfer

⁠Quick Start

  1. Start the RDP VM with persistent storage:

    make start
    
  2. Connect via RDP:

    • Host: localhost or your server IP
    • Port: 3389
    • Username: ubuntu
    • Password: ubuntu
  3. Stop the RDP VM:

    make stop
    
⁠Available Commands
CommandDescription
make buildBuild the Docker image
make startBuild and start RDP VM with persistent storage
make stopStop the RDP VM
make restartRestart the RDP VM
make logsView container logs
make statusShow container status
make cleanClean up Docker images
make clean-allClean up everything including Docker images
make clean-dataRemove all persistent data directories
make setup-dirsCreate necessary local directories
make pushPush image to registry
⁠Using Docker Directly (No Persistence)
# Build the image
make build

# Run without persistence
docker run -d -p 3389:3389 oaklight/rdp_vm:latest

⁠Persistent Storage

The Docker Compose setup uses local directories for persistent storage:

  • User Home Directory (./data/home → /home/ubuntu): All user files, desktop settings, and personal data
  • System Configuration (./data/etc → /etc): System-wide configuration files
  • Application Data (./data/opt → /opt): Installed applications and their data
  • Variable Data (./data/var → /var): Logs, databases, and other variable content
  • Shared Directory (./shared → /home/ubuntu/shared): Host directory for file transfer

All persistent data is stored in local directories under ./data/ making it easy to backup, inspect, and manage.

⁠File Sharing

The ./shared directory on the host is mounted inside the container at /home/ubuntu/shared. Use this directory to:

  • Transfer files between host and container
  • Share files with the RDP session
  • Backup important data

⁠Remote Access Options

⁠1. RDP (Remote Desktop Protocol)
  • Port: 3389
  • Client: Any RDP client (Windows Remote Desktop, Remmina, etc.)
  • Credentials: ubuntu/ubuntu
⁠2. RustDesk
  • RustDesk is automatically installed and available in the desktop environment
  • Provides cross-platform remote access capabilities
  • Can be used as an alternative to RDP

⁠Customization

⁠Changing Default Password

Edit the docker-compose.yml file and modify the PASSWORD environment variable:

environment:
  - PASSWORD=your_new_password
⁠Adding More Software

You can install additional software by:

  1. Connecting via RDP
  2. Using the terminal to install packages with apt
  3. All installations will persist due to volume mounting

Or modify the Dockerfile to include additional packages in the build process.

⁠Troubleshooting

⁠Container Won't Start
# Check logs
make logs

# Check status
make status
⁠Reset Everything
# Remove Docker images and containers
make clean-all

# Remove all persistent data (WARNING: This deletes all user data!)
make clean-data
⁠Permission Issues

If you encounter permission issues with the shared directory:

sudo chown -R 1020:1020 ./shared

⁠Security Notes

  • Default credentials are ubuntu/ubuntu - change them in production
  • The container runs with limited privileges but includes SYS_ADMIN capability for desktop functionality
  • Consider using a VPN or firewall to restrict access to port 3389 in production environments

⁠Requirements

  • Docker
  • Docker Compose
  • At least 2GB RAM recommended
  • 5GB+ disk space for persistent data directories
  • Sufficient permissions to create directories in the project folder

Tag summary

Content type

Image

Digest

sha256:921333d08…

Size

420.7 MB

Last updated

about 1 year ago

docker pull oaklight/rdp_vm