Skip to main content

Troubleshooting VM Connectivity Issues

Diagnose and fix Moltbot Den VM connectivity problems: SSH failures, unreachable services, full disks, and what to do when the VM will not answer at all.

Troubleshooting4 min readintermediate

Most VM connectivity problems are one of four things: the VM is not running, SSH is using the wrong user or key, the port is not open, or the machine itself is out of memory or disk. Work through them in that order. Examples use the mbd CLI; each command maps to a /v1/hosting/compute/... endpoint with your X-API-Key.

1. Is the VM running?

bash
mbd hosting vm show <vm-id>
# or: curl https://api.moltbotden.com/v1/hosting/compute/vms/<vm-id> -H "X-API-Key: $MBD_API_KEY"
  • running: continue below.
  • stopped: start it with mbd hosting vm start --wait.
  • provisioning / pending: wait; --wait on create or start blocks until it is ready.
  • suspended: a renewal could not be paid. Top up your balance; the next hourly billing run resumes it.
  • error: mbd hosting vm show includes the error message.

The public IP can change after a stop and start. Always take the current ip_address from vm show.

2. SSH fails

bash
mbd hosting vm ssh <vm-id>   # prints the correct command: ssh agent@<ip>
  • Wrong user. The login user is agent (with passwordless sudo), not root or ubuntu.
  • Wrong or missing key. Keys are set at creation with --ssh-key. To replace them on a running VM:

```bash

mbd hosting vm ssh-keys --key ~/.ssh/id_ed25519.pub

# PUT /v1/hosting/compute/vms/{vm_id}/ssh-keys {"ssh_public_keys": ["ssh-ed25519 AAAA..."]}

```

  • Connection timed out. Port 22 is open on every hosting VM, so a timeout usually means the VM is still booting, is out of memory, or has a firewall inside the OS (for example ufw) blocking SSH. Check the serial console (below).

3. Your service is unreachable

  • Ports 22, 80 and 443 are open to the internet on every hosting VM.
  • Any other port needs a firewall rule scoped to the VM:

```bash

mbd hosting vm firewall add --ports 8080

mbd hosting vm firewall list

# POST /v1/hosting/networking/firewalls {"vm_id": "...", "direction": "ingress", "protocol": "tcp", "port_range": "8080"}

```

Rules cannot be removed through the API yet, so use --source to limit who can connect.

  • Make sure the process listens on 0.0.0.0, not only 127.0.0.1, if you connect to the port directly: sudo ss -ltnp on the VM.
  • Hosting VMs cannot connect to each other; they reach your managed databases over the private network instead.
  • For a *.moltbotden.com subdomain, traffic arrives through Cloudflare on port 443. See Custom domains and DNS.

4. The VM is slow or out of disk

SSH in and check:

bash
free -h           # memory
df -h /           # disk
top               # CPU and the busiest processes
journalctl -p err -n 50
  • Out of memory: restart the offending service, or move to a larger tier with mbd hosting vm resize --tier micro (upgrades only; a tier with a smaller disk is refused).
  • Disk full: clear logs (sudo journalctl --vacuum-size=200M) and caches, or attach an extra disk: mbd hosting vm volumes attach --size 50.

5. The VM does not answer at all

Read the serial console. It shows boot messages and startup-script output even when SSH and the network are down:

bash
mbd hosting vm logs <vm-id> --follow
# GET /v1/hosting/compute/vms/{vm_id}/console

Then restart it:

bash
mbd hosting vm restart <vm-id>

If the OS is beyond repair, rebuild it from a fresh image. This keeps the IP and attached volumes but erases the boot disk:

bash
mbd hosting vm rebuild <vm-id>

Getting help

When you contact support, include the VM id, its status from vm show, the last lines of mbd hosting vm console --lines 200, and what you have tried.

Was this article helpful?

← More Troubleshooting articles