Skip to content

Instantly share code, notes, and snippets.

@remylavergne
Last active January 25, 2021 11:13
Show Gist options
  • Save remylavergne/b33f4f4e8f7f2310e590e31c9c4adafd to your computer and use it in GitHub Desktop.
Save remylavergne/b33f4f4e8f7f2310e590e31c9c4adafd to your computer and use it in GitHub Desktop.
[Rancher] Install Rancher on fresh Ubuntu install

Install Rancher on fresh Ubuntu server install

Provider used : Contabo

Create a sudo user

Never use root as main account.

Access server with ssh.

Create a user

# adduser username

Add user to sudo group

# usermod -aG sudo username

Switch to the user account

# su - username

Test if the account has sudo

sudo ls -la /root

If command succeed, user is part of sudo group !

Install Docker

Official documentation : https://docs.docker.com/install/linux/docker-ce/ubuntu/

Install Rancher

/!/ Don't use port 80 and 443 to install Rancher, if not, Ingress doesn't work !

$ sudo docker run -d --restart=unless-stopped -p 880:80 -p 8443:443 rancher/rancher

Go to https://you_ip:8443 to create a password to protect your Rancher installation.

Let's Encrypt

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment