DEV Community

Justin Bauer
Justin Bauer

Posted on • Updated on

Setting Up A Node.JS Environment On A Steam Deck

In this article, we'll walk through the steps to set up a Node.js development environment on a Steam Deck. The Steam Deck runs on SteamOS, which is a flavor of GNOME KDE, and uses Konsole as its terminal program.

Table of Contents

  1. Prerequisites
  2. Setting up GitHub
  3. SSH Keys for GitHub
  4. SSH Keys for Azure DevOps
  5. Installing Node.js Using NVM

Prerequisites

Firstly, make sure you have curl and git installed. If they are not installed, open Konsole and run:

sudo apt update
sudo apt install curl git
Enter fullscreen mode Exit fullscreen mode

Setting up GitHub

After installing the required packages, it's time to configure your GitHub credentials:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Enter fullscreen mode Exit fullscreen mode

Replace "you@example.com" with your GitHub email address and "Your Name" with your GitHub username.

SSH Keys for GitHub

To interact with GitHub repositories more securely, you can set up SSH keys:

  1. Generate a new SSH key:

    ssh-keygen -t ed25519 -C "you@example.com"
    
  2. Add the SSH key to the ssh-agent:

    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_ed25519
    
  3. Copy the SSH key to your clipboard:

    sudo apt install xclip
    xclip -selection clipboard < ~/.ssh/id_ed25519.pub
    
  4. Finally, go to GitHub.com, navigate to Settings > SSH and GPG keys > New SSH key, and paste your key.

SSH Keys for Azure DevOps

If you are also using Azure DevOps, generating an SSH key compatible with it is pretty straightforward:

  1. Generate a new RSA SSH key:

    ssh-keygen -t rsa -b 4096 -C "your-email@example.com"
    
  2. Add the key to the ssh-agent:

    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_rsa_azure
    
  3. Copy the key and add it to Azure DevOps:

    cat ~/.ssh/id_rsa_azure.pub
    
  4. After copying the key, go to Azure DevOps settings and add the new SSH key.

Installing Node.js Using NVM

We'll use Node Version Manager (NVM) to manage Node.js versions:

  1. Install NVM:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
    
  2. Refresh your Konsole:

    source ~/.bashrc
    
  3. Install the LTS version of Node.js:

    nvm install --lts
    

That's it! You've now set up a full-fledged Node.js development environment on your Steam Deck. Whether you're working with GitHub, Azure DevOps, or any other platform, these steps should get you up and running.

Feel free to let me know if you have any questions or need further clarification on any of the steps. Happy coding!

Top comments (0)