Connecting to Your Service via SSH
SSH access is available only for runtime services and web servers.
Database services, message brokers, and object storage are not accessible via SSH.
SSH connections should not be used for making persistent changes to your service:
- In HA mode, changes via SSH affect only the current container
- Container replacements or scaling events will deploy the original application version
- For persistent changes across all containers, use:
Connection Methods
You can connect to your services using two methods:
Web Terminal (Always Available)
For quick debugging and inspection, use the Remote Web Terminal available in each service's detail page. This browser-based terminal:
- Always accessible regardless of SSH isolation settings
- Requires no VPN setup
- Provides instant access to your containers
- Perfect for quick debugging sessions and emergency access
SSH via VPN (Full Access)
For full SSH capabilities and persistent connections, connect through the Zerops VPN.
Setting Up SSH Access
1. Configure VPN Connection (For SSH Access)
The Zerops CLI (zCLI) comes bundled with the Zerops VPN client. To connect to your Zerops project:
2. Establish SSH Connection via VPN
Once your VPN session is active, you can connect to any service using its hostname via SSH:
Example:
When connecting for the first time, you may receive this security prompt:
Type yes to trust the host and prevent future prompts.
Connecting to Specific Containers
To access a specific container instead of the service as a whole, use the container's hostname:
Example:
When using HA mode, connecting to the service hostname will route you to a random container within that service.
Container Naming Conventions
Each container in your project has a unique hostname following these patterns:
- Format 1:
node-id-<number>.runtime.app.zerops - Format 2:
node<number>.runtime.app.zerops
When your application scales horizontally:
- New containers receive incremental hostnames
- Decommissioned container hostnames are not recycled
- You might see non-sequential container numbers (e.g.,
node-id-5andnode-id-12) - Container hostnames may change as your service scales
Never connect to containers using their local IP addresses, as these addresses are dynamic and may change.
SSH Access Control
Zerops provides fine-grained control over SSH access through SSH Isolation. It is configured with the sshIsolation project variable. This security feature determines who can connect to your services via SSH, controlling both VPN connections and service-to-service SSH access.
Default Behavior
By default, sshIsolation is set to vpn, which means: