Skip to content

Remote Access

These commands give you direct access to running containers and their attached services. All of them use the linked service context or accept an explicit workspace/project/env/service argument.

Open an interactive SSH session to a running container:

Terminal window
ancla ssh

Connect to a specific process type (defaults to web):

Terminal window
ancla ssh --process worker

With an explicit service path:

Terminal window
ancla ssh my-ws/my-project/production/my-service

The CLI requests ephemeral credentials from the Ancla API and launches ssh with them. You need OpenSSH installed locally. No SSH keys to manage; the platform handles authentication.

Similar to ssh, but uses the platform’s exec API directly. No SSH client needed.

Terminal window
ancla shell

Choose the process type and shell command:

Terminal window
ancla shell -p worker
ancla shell -c /bin/bash

Default process type is web. Default command is /bin/sh.

Connect to your service’s primary database:

Terminal window
ancla dbshell

The CLI detects the database engine and launches the right client:

  • PostgreSQLpsql
  • MySQLmysql
  • Other → prints the connection URL for manual use

Credentials come from the platform. You need psql or mysql installed locally.

Terminal window
ancla dbshell my-ws/my-project/production/my-service

With --json, the command prints connection details without opening a shell (passwords omitted):

Terminal window
ancla dbshell --json
{
"engine": "postgresql",
"host": "db-abc123.ancla.internal",
"port": 5432,
"name": "myservice_production",
"user": "myservice"
}

View cache service details:

Terminal window
ancla cache info
Engine: redis
Host: cache-abc123.ancla.internal
Port: 6379

Open an interactive Redis CLI session:

Terminal window
ancla cache cli

For Redis, this launches redis-cli with the right host, port, and auth. For other cache engines, it prints the connection URL.

Flush the cache:

Terminal window
ancla cache flush

This prompts for confirmation. Skip it with --yes:

Terminal window
ancla cache flush --yes

These commands launch local client binaries. Make sure you have the right ones installed:

CommandRequires
ancla sshssh (OpenSSH)
ancla dbshellpsql or mysql
ancla cache cliredis-cli (for Redis)

All other commands (shell, cache info, cache flush) work without extra dependencies.