DEV Community

Ben Adrian Sarmiento
Ben Adrian Sarmiento

Posted on

Programming in my gaming desktop (not WSL)

I have now successfully setup a development environment on my gaming desktop (Windows 10) that I am able to use for any programming language I choose. All that I needed to do was install Visual Studio Code and the Remote SSH extension. I am essentially connecting to a remote Linux machine and only doing the code editing in Windows. Others might consider this cheating but I think this is a lot better than setting up WSL especially with Docker containers (I don't want VMs in Windows.

Alt Text

The setup feels like I'm doing local development. I can access the remote terminal from inside Code, so all the git and docker stuff goes in there. I can even do code ~/.zshrc and it will open in my editor which I find really convenient.

Let me narrate to you step-by-step how I set it up.

I first bought a 1GB ram VPS from BuyVM for $3.5/month (my affiliate link). Storage won't be an issue even if there's only 20GB SSD storage in there as BuyVM offers a 1TB block storage for only $5/month. Please note that when paying by PayPal, use your PayPal email when signing up with them as it's one of their policies.

I logged in to the server as root, changed the root password then created a non-root sudo user. I copied my SSH key to that user with ssh-copy-id. Logged in again and upgraded everything, installed zsh shell and oh-my-zsh as I'm very used to those. Disabled root login and password login in my SSH server settings and then rebooted. I logged in again just to make sure everything works, installed Docker, configured git, etc.

Then I setup a subdomain for bensarmiento.com so I don't have to remember my IP address all the time. I used Cloudflare for this, it's free so I use it for all my domains.

Now in my gaming desktop, I fired up Code, installed the Remote SSH extension and configured a new host - ssh user@dev.bensarmiento.com or something like that. I tried connecting to it, typed in my key's passphrase and everything seems to work perfectly. Opened a folder which triggered a new window opening again and Code asked me again for my key's passphrase to connect to the remote host. Hmm... not ideal. It seems like Windows doesn't have a keychain agent running.

After a few googling, all I had to do is run this inside a root PowerShell

Set-Service ssh-agent -StartupType Automatic
Start-Service ssh-agent

Now Windows and Code will remember the passphrase the first time I type it in.

If you want the same behavior happening inside your VM (say when pushing to GitHub) I found the Apt package keychain solved this issue for me.

And that's it. Currently I'm working on this project called moon-http in my gaming desktop but the Lua/MoonScript runtime are all inside my VPS. I don't really mind paying $3.5/month to do this because I also use that VPS for other things such as a WireGuard server, etc.

Latest comments (0)