Skip to main content

Bastion (SSH Access)

The Bastion container provides secure SSH access into your project's internal network. It runs inside your project's namespace and gives you private access to internal services like Volumes, MySQL, PostgreSQL, and Redis.

Use it when you want to:

  • Browse and manage volume files at /volumes/{name}
  • Import or export MySQL or PostgreSQL databases (e.g. using mysqldump or pg_dump)
  • Access Redis using the redis-cli
  • Run CLI tools or scripts within your project network
  • Create file or database backups

How Bastion Works

  • A lightweight container is deployed automatically in each project
  • It has internal access to all your services (volumes, databases, apps)
  • SSH access is authorized via your public SSH keys

The Bastion is not exposed to the public internet – only whitelisted users with keys can log in.


How to Connect

  1. Go to your Project → Bastion (SSH) tab
  2. Add your public SSH key
  3. Use the following command to log in:
ssh <project-id>@<region-bastion-host>

Example:

ssh hpr-123456@bastion.eu-west.hostim.dev

Once connected:

  • Your volumes are mounted under /volumes/{name}
  • You can use internal hostnames like mysql-db, postgres-db or redis-store to connect to your services

Example Use Cases

  • Back up a MySQL or PostgreSQL database:
mysqldump -h mysql-db -u user -p database > backup.sql
pg_dump -h postgres-db -U user database > backup.sql
  • Inspect volume contents:
cd /volumes/my-uploads
ls -lah
  • Restore a Redis dump or inspect keys:
redis-cli -h redis-store

Security and Access

  • SSH access is only available if you've added at least one public key
  • Each Bastion is fully isolated per project
  • All traffic stays inside the private internal network

Troubleshooting

SSH connection fails? Make sure:

  • You added a valid public key
  • You copied the login command correctly
  • Your project is running and has services

Still stuck? Use the support widget in the console.