New Environment Cheatsheet

Everything you need to set up a fresh Windows machine for Solanasis work. Run these in order. Total time: ~10 minutes.


Step 1: Dev Tools (dev-preflight.ps1)

Installs Git, GitHub CLI, Node.js, Python, 7-Zip, and Claude Code.

# Open elevated PowerShell (Run as Administrator)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
 
# Option A: Clone first, then run
gh repo clone dzinreach/solanasis-scripts C:\_my\_solanasis\solanasis-scripts
C:\_my\_solanasis\solanasis-scripts\dev-preflight.ps1
 
# Option B: Run directly from GitHub (if gh is already installed)
# Note: repo is private, so irm won't work without auth — clone first

After running:

  1. gh auth login — authenticate with GitHub
  2. Restart terminal to pick up PATH changes

Script location: solanasis-scripts/dev-preflight.ps1


Step 2: SSH Server (setup-ssh.ps1)

Sets up OpenSSH Server with key-based authentication. Pulls authorized public keys from GitHub — no manual key copying needed.

# Still in elevated PowerShell
C:\_my\_solanasis\solanasis-scripts\scripts\setup-ssh.ps1

What it does:

  • Installs and starts OpenSSH Server (auto-start on boot)
  • Sets default SSH shell to cmd.exe
  • Pulls your public keys from github.com/dzinreach.keys
  • Disables password authentication (key-only access)
  • Generates an ed25519 keypair for outbound SSH
  • Uploads the new key to GitHub via gh CLI
  • Shows network addresses, host key fingerprints, and troubleshooting tips

After running:

  1. Verify the new key was uploaded to GitHub (script does this automatically if gh is authed)
  2. Re-run the script on your other machines to pick up the new key

Parameters:

ParameterDefaultOptionsDescription
-GitHubUserdzinreachAny GitHub usernameWhere to pull authorized public keys from
-DefaultShellcmdcmd, pwshShell for SSH sessions

Key management model:

  • Public keys live on your GitHub account (https://github.com/settings/keys)
  • Each machine pulls authorized keys from https://github.com/dzinreach.keys
  • Add a new machine’s key to GitHub, then re-run the script on all other machines to refresh
  • Private keys never leave the machine they were generated on

Script location: solanasis-scripts/scripts/setup-ssh.ps1


Step 3: ERPNext Credentials (setup_erpnext_env.py)

Sets up API credentials for ERPNext access.

python solanasis-scripts/scripts/setup_erpnext_env.py

Stores credentials securely in ~/.config/solanasis/.env (restricted permissions).

Script location: solanasis-scripts/scripts/setup_erpnext_env.py


Step 4: Clone Remaining Repos

cd C:\_my\_solanasis
gh repo clone dzinreach/solanasis-docs
gh repo clone dzinreach/solanasis-data
gh repo clone dzinreach/solanasis-site

Step 5: Environment Variables

cd solanasis-scripts
copy .env.example .env
# Edit .env with your credentials (Baserow token, API keys, etc.)

SSH Quick Reference

Connecting between machines

FromToCommand
Any machineZasage (laptop)ssh zasya@zasage or ssh zasya@10.0.0.251
Any machineMsage (desktop)ssh zasya@msage or ssh zasya@10.0.0.230
Any machineZasage WSLssh zasage@zasage -p 2222

Common SSH tasks

TaskCommand
Refresh authorized keysRe-run setup-ssh.ps1 on the machine
Add a new machineRun setup-ssh.ps1 on it, then re-run on other machines
View your public keytype %USERPROFILE%\.ssh\id_ed25519.pub
Upload key to GitHubgh ssh-key add %USERPROFILE%\.ssh\id_ed25519.pub --title "MachineName"
Test connectivityTest-NetConnection hostname -Port 22

Troubleshooting

ErrorFix
REMOTE HOST IDENTIFICATION HAS CHANGEDRun ssh-keygen -R hostname on the client (the machine you’re connecting FROM), then reconnect
Permission denied (publickey)Your key isn’t authorized. Upload it to GitHub, then re-run setup-ssh.ps1 on the server (the machine you’re connecting TO)
Connection timed outCheck that both machines are on the same network. Verify firewall: Test-NetConnection hostname -Port 22
Connection refusedsshd isn’t running on the server. Run Start-Service sshd or re-run setup-ssh.ps1

Current Machine Inventory

MachineHostnameIPRoleOS
LaptopZasage10.0.0.251Dev + serverWindows 11 Pro
DesktopMsage10.0.0.230Dev + serverWindows 11
Laptop WSL(mirrored)Linux devUbuntu (port 2222)