Skip to content
/ setup Public

A collection of quick-reference commands for managing linux servers

Notifications You must be signed in to change notification settings

B00TK1D/setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 

Repository files navigation

Server Setup Quickstart

  • Install generally useful server utils:
    • sudo apt update && apt install -y zip gzip iputils-ping traceroute htop tmux neovim tcpdump gh wireguard resolvconf
  • Log into github
    • gh auth login
  • Install docker
    • curl -fsSL https://get.docker.com | sh
  • Install golang
    • curl -fsSLo- https://s.id/golang-linux | bash
  • Install tailscale
    • curl -fsSL https://tailscale.com/install.sh | sh
      tailscale up
  • Set up subdomains with SSL:
    1. Install nginx and certbot
    sudo apt install -y nginx certbot python3-certbot-nginx
    1. Set /etc/nginx/sites-enabled/default to:
    server {
        listen 80;
        server_name subdomain1.domain.com;
    
        # Require basic authentication for all requests
        auth_basic "Restricted Area";
        auth_basic_user_file /etc/nginx/.htpasswd;
    
        # Proxy requests
        location / {
            proxy_set_header Host $host;
            proxy_pass http://127.0.0.1:3434;
            proxy_redirect off;
        }
    }
    server {
        listen 80;
        server_name subdomain2.domain.com;
        
        # Require basic authentication for all requests
        auth_basic "Restricted Area";
        auth_basic_user_file /etc/nginx/.htpasswd;
    
        # Proxy requests
        location / {
            proxy_set_header Host $host;
            proxy_pass http://127.0.0.1:3435;
            proxy_redirect off;
        }
    }
    ...
    1. htpasswd -c /etc/nginx/.htpasswd admin
      sudo certbot --nginx -d subdomain1.domain.com -d subdomain2.domain.com
      sudo service nginx restart
  • Generate random passwords
    • openssl rand -hex 16
  • Move files around
    1. Compress files
    tar -czvf files.tar.gz /path/src
    1. SCP files between hosts
    scp /local/dst user@remote:/src
    1. Decompress files
    tar -xvzf files.tar.gz -C /local/dst

About

A collection of quick-reference commands for managing linux servers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published