Skip to content

Instantly share code, notes, and snippets.

@ilfey
Created March 10, 2024 09:15
Show Gist options
  • Select an option

  • Save ilfey/123116fe91af457ac2f92cfe454a5491 to your computer and use it in GitHub Desktop.

Select an option

Save ilfey/123116fe91af457ac2f92cfe454a5491 to your computer and use it in GitHub Desktop.
Server setup

1 Update & upgrade packages

sudo apt update
sudo apt upgrade -y

2 Installing openssh and git

sudo apt install -y openssh-server git

3 Shh setup

3.1 Check ssh daemon status

sudo systemctl status shhd

3.2 Check firewall

sudo ufw status ssh

4 Check shh connection

4.1 Remember address

hostname -I

4.2 connect (from other system)

ssh <user>@<address>

5 Docker installing

5.1 Add repository

sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

5.2 Install docker

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

5.3 Try hello world from docker

sudo docker run hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment