User Tools

Site Tools


software:server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
software:server [2021/03/22 07:49] – created vektratsoftware:server [2022/01/09 08:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Server ======+====== Initial server config ====== 
 +//In this case, a Hetzner server// 
 + 
 +====== Basic server configuration ====== 
 + 
 +=== Update packages === 
 +<code bash> 
 +sudo apt update 
 +sudo apt upgrade 
 +</code> 
 + 
 +=== Register local workstation SSH key === 
 +Take ~/.ssh/id_rsa.pub and paste it in `/root/.ssh/authorized_keys` 
 + 
 +==== Create new user === 
 +<code bash> 
 +adduser vektrat 
 +</code> 
 + 
 +=== Add user to sudoers === 
 +<code bash> 
 +visudo 
 +</code> 
 + 
 +Resulting file should be like this 
 +<code bash> 
 +# User privilege specification 
 +root    ALL=(ALL:ALL) ALL 
 +vektrat ALL=(ALL) NOPASSWD:ALL 
 +</code> 
 + 
 +=== SSH config === 
 +<code bash> 
 +cp -r .ssh /home/vektrat/ 
 +chown -R vektrat .ssh 
 +chgrp -R vektrat .ssh 
 +</code> 
 + 
 +Reboot and try to access via ssh with the new user 
 + 
 +=== Disable password login === 
 +<code bash> 
 +sudo vi /etc/shadow 
 +</code> 
 + 
 +Edit the file to remove hashed password (careful with the rest of the info) 
 +<code bash> 
 +vektrat:*:19000:0:99999:7::: 
 +</code> 
 + 
 +====== Firewall configuration (optional) ====== 
 +We choose to do so at the provider's location and allow those basic services: 
 +| **Direction** | **Protocol** | **Port** | **Service** | 
 +| inbound       | TCP          | 22       | SSH         | 
 +| inbound       | TCP          | 80       | HTTP        | 
 +| inbound       | TCP          | 443      | HTTPS       | 
 + 
 +====== Install basic applications and services ====== 
 +==== Docker ===== 
 +=== Install docker-ce === 
 +Following [[https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04|those guidelines]] 
 + 
 +=== Install docker-compose === 
 +<code bash> 
 +sudo apt get install docker-compose 
 +</code>
  
software/server.1616399393.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki