skip to content
ccdocs

cc tunnel

Open an SSH tunnel to a remote Odoo.sh PostgreSQL database for the active environment.

Usage

cc tunnel                 # start a tunnel for the active environment
cc tunnel myenv           # start a tunnel for a specific environment
cc tunnel --stop          # stop the active tunnel
cc tunnel --status        # list all active tunnels

Arguments

ArgumentDescription
nameEnvironment name (tab-completable). Defaults to the active environment.

Flags

FlagDescription
--stopStop the active tunnel for the environment
--statusList all active tunnels with PIDs

What It Does

Forwards the remote Odoo.sh PostgreSQL port to local port 5433 over SSH. Once running, you can connect to the SH database from your local machine as if it were local.

On first use per environment, CC prompts for:

  • SSH host (e.g. project-31002026.dev.odoo.com)
  • SSH user (e.g. 31002026)
  • SSH key path (stored in CC settings)

Subsequent runs use the saved values.

Files

PathPurpose
~/.cc-cli/tunnels/<env>.pidPID file for the active tunnel

Examples

cc tunnel
# → Starts tunnel to active env's SH database on localhost:5433

cc tunnel staging
# → Starts tunnel for the 'staging' environment

cc tunnel --status
# → Lists active tunnels and their PIDs

cc tunnel --stop
# → Stops the active env's tunnel
  • cc db — manage the local database linked to an environment
  • cc sh — open the Odoo.sh project page in the browser

On this page