Skip to content

SSH Tunnel Environments

ReadyStackGo can use Docker hosts on remote servers as deployment targets via SSH tunnels. No exposed Docker port needed, no agent on the remote host — just SSH access.

Environment TypeConnectionUse Case
Docker SocketLocal Unix socketReadyStackGo runs on the same host as Docker
SSH TunnelSSH → Remote Docker SocketDocker on a remote server, reachable via SSH

Step by Step: Creating an SSH Tunnel Environment

Section titled “Step by Step: Creating an SSH Tunnel Environment”

Navigate to Environments in the main menu. Here you can see all configured Docker environments.

Environments list


Click Add Environment. On the creation page you’ll see the Connection Type Selector with two options:

  • Local Docker Socket – Direct access to the local Docker socket
  • SSH Tunnel – Connection to a remote Docker host via SSH

Type selector on the Add Environment page

Click SSH Tunnel to open the SSH form.


The form displays the SSH-specific fields:

SSH Tunnel form

FieldRequiredDescription
Environment NameYesDescriptive name (e.g. “Production Server”)
SSH HostYesIP address or hostname of the remote server
SSH PortNoDefault: 22
SSH UsernameYesUsername for the SSH connection (e.g. “root”, “deploy”)
Authentication MethodYesPrivate Key (recommended) or Password
Private Key / PasswordYesSSH key in PEM format or password
Remote Docker Socket PathNoDefault: /var/run/docker.sock

Choose your preferred authentication method:

Private Key (recommended): Paste the complete private SSH key in PEM format.

Password: Enter the SSH password.

Password authentication


Fill in all fields and click Test Connection to verify the SSH connection and Docker access.

Filled SSH form

The test:

  1. Establishes an SSH connection
  2. Creates a TCP tunnel to the Docker socket
  3. Retrieves Docker System Info
  4. Displays Docker version and success/failure

Test Connection button


Click Create Environment. The SSH Tunnel environment is immediately ready for deployments, health monitoring, and container management.


RSGO Controller Remote Host
┌─────────────────┐ SSH Tunnel ┌─────────────────┐
│ SshTunnelManager │────Port 22────────→│ sshd │
│ (SSH.NET) │ │ │
│ │ │ socat bridge │
│ DockerService │ TCP-Tunnel │ TCP → Unix │
│ (Docker.DotNet) │──localhost:random──→│ docker.sock │
└─────────────────┘ └─────────────────┘
  1. SSH Connection: SSH.NET establishes an SSH connection to the remote host
  2. Socat Bridge: On the remote host, socat creates a bridge from TCP to Unix socket
  3. Port Forwarding: SSH Local Port Forwarding routes localhost:random-port to the socat port
  4. Docker Client: Docker.DotNet connects via tcp://localhost:random-port through the tunnel
  • SSH access (port 22 or custom)
  • Docker installed and running
  • socat installed (apt install socat / yum install socat)
  • SSH user must have access to the Docker socket (group docker)

SSH credentials (private keys and passwords) are stored encrypted with AES-256-CBC:

ConfigurationDescription
RSGO_ENCRYPTION_KEYEnvironment variable for the master key
/data/.encryption-keyAuto-generated key (fallback)

ErrorCauseSolution
Connection refusedSSH server not reachableCheck host/port, verify firewall
Authentication failedWrong credentialsCheck username/key/password
socat not availablesocat not installedapt install socat on the remote host
Permission denied on socketNo Docker socket accessAdd user to docker group
Connection timeoutNetwork issueVerify SSH reachability (ssh user@host)