Installation
SSH Portfolio can be installed via Docker or built from source with Go. This guide covers all installation methods and platform-specific instructions.Prerequisites
- Docker
- Go
Recommended for production deployments
- Docker Engine 20.10+
- Docker Compose 2.0+ (optional, for easier deployment)
- 50MB disk space for the image
Installation Methods
Method 1: Docker (Recommended)
Docker provides the easiest deployment with no Go toolchain required.Configure your portfolio
Build and run with Docker Compose
docker-compose.yml which:- Builds from the Dockerfile
- Maps port 22 to the host
- Creates a persistent volume for SSH keys
- Restarts automatically on failure
Docker Compose Configuration
The defaultdocker-compose.yml (lines 1-14):
docker-compose.yml
Method 2: Docker (Manual Build)
For more control over the Docker build process:Build the Docker image
- Builder stage: golang:1.24-alpine with Go compilation
- Runtime stage: Minimal alpine:3.21 with only the binary
Method 3: Build from Source with Go
For development or when Docker isn’t available:Download dependencies
github.com/charmbracelet/bubbleteav1.3.10 - TUI frameworkgithub.com/charmbracelet/lipglossv1.1.0 - Terminal stylinggithub.com/charmbracelet/ssh- SSH servergithub.com/charmbracelet/wishv1.4.7 - SSH middlewaregopkg.in/yaml.v3v3.0.1 - YAML parsing
go.mod (lines 5-11) for the complete list.Build the binary
ssh-portfolio in the current directory.Optional: Build for different platforms:
Method 4: Install via go install (Coming Soon)
Once published to a Go module repository:This method isn’t available yet. Use Method 3 (build from source) instead.
Post-Installation Setup
SSH Host Keys
SSH Portfolio automatically generates SSH host keys on first run:main.go:38:
Port Configuration
The server listens on port 2222 by default (main.go:25-29):SSH_PORT environment variable:
Systemd Service (Linux)
For production Linux servers, create a systemd service:Verification
Test your installation:Troubleshooting
Error: Failed to load config
Error: Failed to load config
Cause:
config.yaml not found or invalid YAML syntaxSolutions:- Check the file exists:
ls -l config.yaml - Verify YAML syntax:
yamllint config.yaml - Check the config path in code (config/config.go:63)
- Ensure file is readable:
chmod 644 config.yaml
Error: bind: address already in use
Error: bind: address already in use
Cause: Another process is using the portSolutions:
- Check what’s using the port:
lsof -i :2222ornetstat -tlnp | grep 2222 - Change the port:
SSH_PORT=3000 ./ssh-portfolio - Stop the conflicting service
Docker: permission denied on .ssh directory
Docker: permission denied on .ssh directory
Cause: SSH keys directory has wrong permissionsSolutions:
Go build: version error
Go build: version error
Cause: Go version is too oldSolution:
Upgrade Go to 1.24.3+:
Connection works locally but not remotely
Connection works locally but not remotely
Cause: Firewall blocking the portSolutions:
- Check firewall:
sudo ufw statusorsudo firewall-cmd --list-all - Open the port:
- Check cloud provider security groups (AWS, GCP, Azure)
SSH: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED
SSH: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED
Cause: Host key changed (e.g., regenerated keys or connecting to a different server)Solution:
Remove the old key:Or for remote hosts:
Upgrading
Docker
Go/Binary
Next Steps
Configuration
Learn how to customize your portfolio with config.yaml, ASCII art, and themes
Deployment
Deploy to production with nginx, custom domains, and monitoring