A Developer's Guide to Setting Up a Free Windows Server 2025 RDP
In this article, we will walk through the process of setting up a Windows Server 2025 RDP. We have explored a similar method previously with Windows Server 2022, and this guide will detail the simple and straightforward steps to get you started quickly.
Initial GitHub Setup
First, you'll need a GitHub account. The process of creating one is widely documented, so we'll begin from the point of having an active account.
Important Note: It is highly recommended to use a secondary GitHub account for this process. Avoid using your primary account, especially if it's linked to your professional work. This precaution ensures that if the account is banned or suspended for any reason, your main work and projects remain unaffected.
- Navigate to CodeSpaces and select a new blank template.
- Once the template is created, return to the CodeSpaces dashboard. You will see the new codespace listed.
- Click the three dots next to the codespace name, select Change machine type, and choose the 4-core option to ensure optimal performance. Click Update.
- Click the three dots again and select Stop. Close the tab that was opened.
- Refresh the page, then select Open in browser. Wait for the environment to be created. The purpose of stopping and restarting is to apply the machine type change from a 4-core to an 8-core configuration.
- Once the environment loads, click Restart to reboot the machine.
Configuring the Tunneling Service
While the codespace is preparing, we will set up an account with a tunneling service like playit.gg to expose our RDP to the internet.
- Go to the service's website and click Login.
- Use a temporary email service to create a new account.
- Create an account using the temporary email and a secure password.
- Verify your email address by clicking the link sent to your temporary inbox. Activating the account now prevents issues later in the process.
Setting Up the RDP Environment
Now, return to the CodeSpaces terminal to run the necessary setup commands. These commands should be executed in the specified order.
When you first paste a command, you may be prompted to allow it. Select Allow and Don't show again to proceed smoothly.
# Command 1: Download necessary setup files
# (Example command, replace with actual script)
wget https://example.com/setup.sh
# Command 2: Update the system packages
sudo apt-get update
# Command 3: Install the desktop environment
# (Example command, replace with actual script)
sudo apt-get install xfce4 -y
Next, you will link your tunneling service account.
# Command 4: Authenticate the tunneling client
# (Example command)
playit-cli authenticate
This command will generate a URL. Press Ctrl + Click to open it in a new tab. Because you already logged in and verified your account, this step should complete without any issues. Wait for the settings to be applied.
Back in the playit.gg dashboard:
1. Click Create.
2. Keep the Free plan selected.
3. Choose the third option, TCP/IP.
4. Confirm Yes.
5. Again, choose the third option and set the port to 3389.
6. Click Add.
The service will now generate a public IP address and port that you will use to connect. Keep this information handy in a notepad.
# Example IP and Port
1.tcp.eu.playit.gg:12345
Return to the CodeSpaces terminal and press Ctrl + C to stop the current process. Now, you need to retrieve your secret key from the tunneling service.
# Command 5: Get the secret key
# (Example command)
playit-cli get-secret
This will display your configuration file. Look for the secret key, copy it, and save it in your notepad.
Configuring the GitHub Actions Workflow
Now, we will set up a GitHub repository and an Actions workflow to run the RDP.
- Go to your GitHub homepage and create a new repository. Make it Public and give it a descriptive name, such as
rdp-vm. - Initialize the repository with a
README.mdfile. - Navigate to the Actions tab in your new repository.
- Click on set up a workflow yourself.
- You will be presented with a YAML editor. Paste the entire workflow script here.
# Example Workflow Content
# (This is a placeholder. You should use the full, correct script.)
name: Windows RDP Workflow
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run RDP Setup
run: echo "Setting up RDP..." # Replace with actual setup commands
- Commit the new workflow file.
- Go to the repository's Settings tab, then navigate to Secrets and variables > Actions.
- Click New repository secret.
- Name the secret
Band paste the long secret key you saved earlier from the tunneling service. - Return to the Actions tab. You will see your workflow listed. Click on it, then select Run workflow.
Wait a few moments and refresh the page. The workflow will start executing. You can click on the running job to view the logs in real-time.
Connecting to Your RDP
Once the workflow is running, you can connect to the server.
- Open your Remote Desktop client.
- Use the IP address and port you saved from the tunneling service to connect.
You will be prompted for a username and password. You can find these credentials within the workflow logs in the GitHub Actions tab.
- Username:
admin - Password:
admin@123
Copy and paste the credentials to log in. When prompted, accept the certificate to establish the connection.
Note: Do not close the browser tab where the workflow is running. Closing it will terminate the connection and shut down the RDP session.
Exploring Your New Server
Once connected, you can explore the machine's specifications.
- Storage: You will find you have access to over 140 GB of disk space.
- Performance: The machine is configured with a 64-core processor and 16 GB of RAM, though your usage is based on the 4-core, 16 GB RAM Codespace plan.
- Operating System: The server runs Windows Server 2025, and audio is fully functional.
The internet speed is exceptionally fast, with tests showing download and upload speeds reaching over 2.5 GB/s and sometimes peaking at more than 3 GB/s. This setup provides a powerful and efficient remote environment that can remain active for six hours or even longer.