Skip to content

slamach/personal-server-configuration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Personal server configuration

Hardware configuration

Sufficient configuration for several small projects:

  • x2 vCPU
  • 2-4GB RAM
  • 15+GB NVMe

My choice of OS: Ubuntu 20.04

Software configuration

Transferring files from a local machine

rsync -rlptoDzP ./local-directory/ user@example.com:/remote-path

Changing hostname

sudo hostnamectl set-hostname example-vs01
# Or change it here
sudo vim /etc/hostname

# Change all old references
sudo vim /etc/hosts

exec bash

Creating main user

sudo adduser user
sudo usermod -aG sudo user

Configuring SSH

# Add SSH-key to ~/.ssh/authorized_keys

sudo vim /etc/ssh/sshd_config
# Change PasswordAuthentication to no
# Make sure ChallengeResponseAuthentication is set to no

sudo systemctl restart ssh

Configuring firewall

sudo vim /etc/default/ufw
# Make sure IPV6 is set to yes

ufw allow OpenSSH

ufw enable

Configuring main user

My Bash configuration

touch ~/.hushlogin
touch /root/.hushlogin

# Replace ~/.bashrc and /root/.bashrc

Creating CI/CD user

Nice article about deploying with Github Actions

sudo adduser deployer
sudo usermod -aG sudo deployer

sudo su deployer

ssh-keygen -b 4096
cat .ssh/key-name.pub >> .ssh/authorized_keys

Installing packages

Updating existing packages

sudo apt update && sudo apt upgrade

Nginx

Detailed instruction

Let's Encrypt

Detailed instruction

Docker

Detailed instruction

About

My interpretation of a small personal server configuration

Topics

Resources

Stars

Watchers

Forks

Languages