What is Coder?
Coder is an open-source cloud development environment (CDE) that you host in your cloud or on-premises. With Coder, you can deploy environments that provide the infrastructure, IDEs, and tools your developers need.
What is VS Code?
Visual Studio Code, commonly referred to as VS Code, is an integrated development environment (IDE) developed by Microsoft for Windows, Linux, macOS and web browsers.
Pre-requisites
Before we discuss how to install Coder on AlmaLinux VPS and connect Workspace to VS Code, be sure you have the following:
- AlmaLinux VPS Server (AlmaLinux 8/AlmaLinux 9)
- Familiarity with the Linux command-line.
Install Coder on AlmaLinux VPS and Connect Workspace to VS Code
To install Coder on AlmaLinux VPS and connect workspace to VS Code, follow the steps below:
Install and Start Coder
- Login to your VPS via SSH.
- Update the server packages:
sudo dnf update -y
- Install Docker:
sudo dnf install -y yum-utils device-mapper-persistent-data lvm2 dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo curl -sSL https://get.docker.com | sh sudo dnf install -y docker-ce docker-ce-cli containerd.io sudo systemctl start docker sudo systemctl enable docker
For more details, visit:
- Assign your user to the Docker group:
sudo usermod -aG docker $USER
- RunΒ
newgrpΒ to activate the groups changes:newgrp docker
You might need to log out and back in or restart the machine for changes to take effect.
- Install Coder:
curl -L https://coder.com/install.sh | sh
- For standalone binaries, system packages, or other alternate installation methods, refer to theΒ latest release on GitHub.
- Start Coder:
coder server
Configure Coder with a New Workspace
- Locate the message in your terminal that reads,
View the Web UI: https://<CUSTOM-STRING>.<TUNNEL>.try.coder.app. The server begins to stream logs immediately and you might have to scroll up to find it.
- Access the URL in your browser.
- On theΒ Welcome to CoderΒ page, enter the information to create an admin user, then selectΒ Create account.
- On theΒ WorkspacesΒ page, selectΒ Go to templatesΒ to create a new template.
- For this guide, use a Docker container. LocateΒ Docker ContainersΒ and selectΒ Use template.
- Give the template aΒ Name that youβll recognize both in the Coder UI and in command-line calls. The rest of the template details are optional, but will be helpful when you have more templates.
- SelectΒ Create template.
- After the template is ready, selectΒ Create Workspace.
- Give the workspace a name and selectΒ Create Workspace.
- Coder starts your new workspace:
- SelectΒ VS Code DesktopΒ to install the Coder extension and connect to your Coder workspace.
Using VS Code
After VS Code loads the remote environment, you can select Open Folder to explore directories in the Docker container or work on something new.
To clone an existing repository:
- SelectΒ Clone RepositoryΒ and enter the repository URL.
For example, to clone the Coder repo, enterΒhttps://github.com/coder/coder.git.
Learn more about how to find the repository URL in theΒ GitHub documentation. - Choose the folder to which VS Code should clone the repo. It will be in its own directory within this folder.
Note that you cannot create a new parent directory in this step. - After VS Code completes the clone, selectΒ OpenΒ to open the directory.
- You are now using VS Code in your Coder environment!
Conclusion
You now know how to install Coder on AlmaLinux VPS and connect workspace to VS Code.














