Skip to content
Live $100 credit at signup, up to $300 total Offer ends December 31, 2026 Get started →

Rancher

Rancher is an open-source platform for deploying and managing Kubernetes clusters at scale. It gives you a single web console to provision, import, monitor, and operate clusters across clouds, data centres, and the edge, with centralised authentication, RBAC, and app catalogues. This guide runs the official single-node Rancher server in Docker.

ComponentVersion
Rancher2.14.3
DockerLatest stable
Ubuntu24.04 LTS

Set these optionally when you deploy from the marketplace. Leave a field blank to have a secure value generated.

VariableDescription
RANCHER_HOSTNAMEPublic Rancher hostname
BOOTSTRAP_PASSWORDRancher bootstrap password
ssh ubuntu@<your-vm-ip>

On the first boot, a setup script prepares persistent storage, starts Rancher with Docker Compose, imports the cached K3s system images, and waits for the API and dashboard. This can take several minutes. Track progress:

sudo journalctl -u rancher-first-boot.service -f

The login message (MOTD) confirms when Rancher is ready. You can also verify the container directly:

cd /opt/rancher && docker compose ps

The generated bootstrap password and setup details are stored in a root-only file:

sudo cat /etc/rancher/credentials.txt
FieldValue
Usernameadmin
PasswordValue of BOOTSTRAP_PASSWORD, or generated securely on first boot

Open a browser and navigate to your Rancher URL. If you set RANCHER_HOSTNAME at deploy time, use it and make sure a DNS record for that hostname resolves to the VM first:

https://<RANCHER_HOSTNAME>

If you left RANCHER_HOSTNAME unset, reach the VM directly by IP:

https://<your-vm-ip>

Rancher starts with a self-signed certificate, so your browser displays a warning. Accept the exception, sign in with the bootstrap password, then set a permanent administrator password.

Rancher runs as a Docker Compose stack in /opt/rancher.

# Check status
cd /opt/rancher && docker compose ps
# Restart
cd /opt/rancher && docker compose restart
# View logs
cd /opt/rancher && docker compose logs -f
PathPurpose
/opt/rancher/docker-compose.ymlDocker Compose configuration
/opt/rancher/.envBootstrap password and server URL
/data/rancher/Persistent Rancher data
/etc/rancher/credentials.txtBootstrap credentials and storage details

If the VM has an extra blank data disk at first boot, the image formats it as ext4, mounts it at /data, and stores Rancher data there. Otherwise, /data/rancher remains on the root filesystem.

Rancher uses port 80 for HTTP and port 443 for HTTPS. UFW is enabled and allows SSH (port 22) plus ports 80 and 443 by default.

To restrict web access to a specific IP:

sudo ufw delete allow 80/tcp
sudo ufw delete allow 443/tcp
sudo ufw allow from <trusted-ip> to any port 443

To access Rancher through an SSH tunnel:

# Run this on your local machine
ssh -L 8443:localhost:443 ubuntu@<your-vm-ip>
# Then open in your browser
https://localhost:8443

For production use, place Rancher behind a reverse proxy with a trusted TLS certificate. The single-node Docker installation is intended for development and testing. Rancher recommends a high-availability Kubernetes installation for production.

Last updated: