Skip to content

Instantly share code, notes, and snippets.

@rma92
Last active November 16, 2024 17:41
Show Gist options
  • Save rma92/134b1e94b767c317b45e4affdf01b5b8 to your computer and use it in GitHub Desktop.
Save rma92/134b1e94b767c317b45e4affdf01b5b8 to your computer and use it in GitHub Desktop.
Fast RDP server on Alpine Linux on Vultr

The following cloud-init user data can be used to set up a system with RDP, and a user, and a password:

#!/bin/sh
adduser --gecos "" --disabled-password user
adduser user wheel
echo user:thelongchickenpassword | chpasswd
setup-desktop xfce
apk add xrdp xorgxrdp doas ublock-origin
rc-update add xrdp
rc-update add xrdp-sesman
echo permit persist :wheel >> /etc/doas.conf
ufw allow 3389
reboot
  • The system will reboot, it took about 3 minutes from clicking Deploy to the server rebooting, then coming up. At that point, you can RDP in. Change the password.

Quickly build an RDP server on vultr using Alpine Linux

  • Create an Alpine Linux VM. SSH in as root:
setup-desktop xfce
reboot
  • After the reboot, SSH in again.
apk add xrdp xorgxrdp doas
rc-update add xrdp & rc-update add xrdp-sesman & ufw allow 3389
adduser user
  • You will be prompted for a password for the user.
adduser user wheel
echo 'permit persist :wheel' >> /etc/doas.conf
reboot
  • Once the system comes up, you can RDP in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment