└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Free Windows Server 2022 With RDP For Lifetime 2 | This repository is all about getting free windows server 2022 with rdp using github jobs & ngrok tunnel. In this github repositoyr i added the step by step guide to have a free windows vsp server thorugh github and accessing it via remote desktop connection. 3 | 4 | ## Watch Full Video Guide on My YouTube Channel 5 | 6 | [![alt text](https://img.youtube.com/vi/LrjrFWa64Mw/maxresdefault.jpg)](https://youtu.be/LrjrFWa64Mw) 7 | 8 | ## Steps To Create Windows Server 9 | * Sign Up a GitHub Account : https://github.com/ 10 | * Create a Private Repository, Go to repository settings > Secrets and variables > Actions > New Repository Secrets 11 | * Sign Up a Ngrok Account : https://ngrok.com/ 12 | * Copy the auth key from ngrok and add to github repository secrets 13 | * Setup New Workflow Manually the Put the following code in main.yml and commit changes 14 | ``` 15 | name: CI 16 | 17 | on: [push, workflow_dispatch] 18 | 19 | jobs: 20 | build: 21 | 22 | runs-on: windows-latest 23 | 24 | steps: 25 | - name: Download 26 | run: Invoke-WebRequest https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-windows-amd64.zip -OutFile ngrok.zip 27 | - name: Extract 28 | run: Expand-Archive ngrok.zip 29 | - name: Auth 30 | run: .\ngrok\ngrok.exe authtoken $Env:NGROK_AUTH_TOKEN 31 | env: 32 | NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} 33 | - name: Enable TS 34 | run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0 35 | - run: Enable-NetFirewallRule -DisplayGroup "Remote Desktop" 36 | - run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1 37 | - run: Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "P@ssw0rd!" -Force) 38 | - name: Create Tunnel 39 | run: .\ngrok\ngrok.exe tcp 3389 40 | 41 | ``` 42 | * Run The WorkFlow and take note of credentials (runneradmin:P@ssw0rd!) 43 | * Get the ngrok endpoint url and use it as ip or address in Remote Desktop Connection with credentials 44 | 45 | ## Thanks! 46 | --------------------------------------------------------------------------------