Helps you create your own remote web development environment using Linode.
- zsh, oh-my-zsh, powerlevel10k, zsh-autosuggestions, and zsh-syntax-highlighting
- Keybase
- Go
- Node Version Manager
- pyenv
- Docker
- byobu
- spacevim
- bat
- direnv
- stow
- Homebrew
- A terminal with Bash or something similar. For Windows, you can use Windows Terminal or Git Bash. You can check my current settings for Windows Terminal.
- Your local SSH key pair. See GitHub's guide for more details.
- A GitHub account.
- A Keybase account for storing your GPG keys.
- A Linode account. You can go to their docs to get a $100 promo code.
- Visual Studio Code.
Follow GitHub's guide to generate your SSH key pair. For Windows users, you may need to check this guide from Microsoft to enable SSH in your machine.
Afterwards, add the key to your GitHub and Linode account.
Create a new SSH Key for your new Linode instance. Save this for now as we'll use this later.
Follow this guide to generate a GPG key using Keybase.
NOTE: For Windows, if you already installed the Keybase app, you should have the CLI app will be ready to use (no need to install via brew).
Again, you need to add this key to your GitHub account.
- Open the StackScripts page and click Create StackScript.
- Copy the contents of web.sh. This will only work on Debian 10.
- Click Deploy New Linode.
- Fill out the fields and then click Create Linode.
- Wait for your instance to be provisioned.
- If all goes well, the status will change to Running and you can then connect to your instance.
Start the ssh-agent in the background:
# linux/macos
$ eval `ssh-agent -s`
> Agent pid 59566
# windows
Start-Service ssh-agent
Add your SSH private key to the ssh-agent. If you created your key with a different name, or if you are adding an existing key that has a different name, replace id_ed25519 in the command with the name of your private key file.
ssh-add ~/.ssh/id_ed25519
Then connect via SSH:
ssh <NON_ROOT_USERNAME>@<LINODE_IPV4_ADDRESS> -p <SSH_PORT>
Alternatively, you can create a config file to make it easier to connect to your remote host.
# ~/.ssh/config
Host <ALIAS>
User <NON_ROOT_USERNAME>
HostName <LINODE_IPV4_ADDRESS>
Port <SSH_PORT>
IdentityFile <PRIVATE_KEY_FILE_LOCATION>
ssh <ALIAS>
Congratulations! You can now connect to your remote server instance.
NOTE: You can already connect via SSH even if the StackScript has not yet been completed. To check its status, you can check the logs using cat /var/log/stackscript.log
.
The essentials are already installed in your instance. However, we need to configure a few applications we will use.
IMPORTANT: You also need to install the recommended fonts for the theme to display properly.
IMPORTANT: If you are using Windows, you can use Windows Terminal. You can check my current settings for Windows Terminal.
If you enabled UPGRADE_SHELL_EXPERIENCE
, zsh, oh-my-zsh, and the powerlevel10k zsh theme will be installed.
On your first login via SSH, it will ask you to configure your theme. To run the wizard again, you can run:
p10k configure
Due to StackScripts not yet having a multiple-line UDF, the line breaks for our private key was removed.
Update the .ssh/$HOSTNAME
with the correct version.
# login
keybase login
# check if you have more than one key saved
keybase pgp export
# if yes, specify the id in the commands below
# keybase pgp export -q 31DBBB1F6949DA68 | gpg --import
# import public key
keybase pgp export | gpg --import
# import private key
keybase pgp export --secret | gpg --allow-secret-key-import --import
# check imported key
gpg --list-secret-keys --keyid-format LONG
# /Users/pstadler/.gnupg/secring.gpg
# ----------------------------------
# pub 2048R/DEADBEEF 2012-08-16
# uid Name (Comment) <[email protected]>
# sub 2048R/86D2FAC6 2012-08-16
Notice the hash DEADBEEF
. We will use this in the next section.
# add your basic information
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
# sign all commits using your GPG key
git config --global user.signingkey DEADBEEF
git config --global commit.gpgsign true