From 8f72adcb995fc736c80c513f9de109481a141d28 Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Wed, 29 Jan 2020 15:31:02 -0500 Subject: [PATCH 01/11] Initialize with bashrc/tmux.conf --- .gitignore | 2 + README.md | 3 ++ bashrc | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++ tmux.conf | 16 ++++++++ 4 files changed, 136 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 bashrc create mode 100644 tmux.conf diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..5f67ac0d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.swo +*.swp diff --git a/README.md b/README.md new file mode 100644 index 00000000..282b7e39 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Sia Skynet Production Server Setup Guide + +TODO: import dropbox paper stuff into here diff --git a/bashrc b/bashrc new file mode 100644 index 00000000..2834d407 --- /dev/null +++ b/bashrc @@ -0,0 +1,115 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + alacritty|xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + #alias grep='grep --color=auto' + #alias fgrep='fgrep --color=auto' + #alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +#alias ll='ls -l' +#alias la='ls -A' +#alias l='ls -CF' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi +export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin +export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/home/skynet/go/bin diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 00000000..0314d36f --- /dev/null +++ b/tmux.conf @@ -0,0 +1,16 @@ +# remap prefix from 'C-b' to 'C-a' +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix + +# split panes using | and - +bind | split-window -h +bind - split-window -v +unbind '"' +unbind % + +# reload config file (change file location to your the tmux.conf you want to use) +bind r source-file ~/.tmux.conf + +set -g visual-activity off +set -g mouse on From aec7f6eff7c379e265dea6d4dc7654ea32dfc432 Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Wed, 29 Jan 2020 15:46:44 -0500 Subject: [PATCH 02/11] Add setup script --- bashrc | 1 - setup.sh | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100755 setup.sh diff --git a/bashrc b/bashrc index 2834d407..e9a3ddf0 100644 --- a/bashrc +++ b/bashrc @@ -111,5 +111,4 @@ if ! shopt -oq posix; then . /etc/bash_completion fi fi -export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/home/skynet/go/bin diff --git a/setup.sh b/setup.sh new file mode 100755 index 00000000..d0f65031 --- /dev/null +++ b/setup.sh @@ -0,0 +1,38 @@ +#! /usr/bin/env bash +set -e + +# Copy over basic configuration files. +cp ./tmux.conf ~/.tmux.conf +cp ./bashrc ~/.bashrc +source ~/.bashrc + +# Nodejs install prerequisite. From official documentation. +curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash - + +# Yarn install prerequisite. +curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + +# Apt installations. +sudo apt-get update +sudo apt-get -y install tmux htop nload nginx nodejs gcc g++ make yarn git + +# Install pm2 +sudo npm i -g pm2 + +# terminfo for alacritty terminal via ssh +wget -c https://raw.githubusercontent.com/alacritty/alacritty/master/extra/alacritty.info +sudo tic -xe alacritty,alacritty-direct alacritty.info +rm alacritty.info + +# Install Go 1.13.7. +wget -c https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.13.7.linux-amd64.tar.gz +rm go1.13.7.linux-amd64.tar.gz + +# Sanity check that will pass if go installed correctly. +go version + +# Install Sia +git clone https://gitlab.com/NebulousLabs/Sia +cd Sia && git checkout viewnode && make From bb01f95812a110835476cc354c510c66a52970aa Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Wed, 29 Jan 2020 16:41:20 -0500 Subject: [PATCH 03/11] Add firewall/nginx setup --- setup.sh | 22 +++++++++++++++++++++- skynet-nginx.conf | 31 +++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 skynet-nginx.conf diff --git a/setup.sh b/setup.sh index d0f65031..05aae8f8 100755 --- a/setup.sh +++ b/setup.sh @@ -15,7 +15,8 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/source # Apt installations. sudo apt-get update -sudo apt-get -y install tmux htop nload nginx nodejs gcc g++ make yarn git +sudo apt-get -y install ufw tmux ranger htop nload nginx certbot \ + python-certbot-nginx nodejs gcc g++ make yarn git # Install pm2 sudo npm i -g pm2 @@ -36,3 +37,22 @@ go version # Install Sia git clone https://gitlab.com/NebulousLabs/Sia cd Sia && git checkout viewnode && make + +# Setup nginx config +sudo cp ./skynet-nginx.conf /etc/nginx/sites-available/skynet +sudo nginx -t +sudo systemctl reload nginx + +# Setup firewall +sudo ufw enable +sudo ufw allow 'Nginx Full' +sudo ufw delete allow 'Nginx HTTP' + +sudo certbot --nginx -d siasky.net -d www.siasky.net +sudo certbot renew --dry-run +sudo ln -s /etc/nginx/sites-available/skynet /etc/nginx/sites-enabled/skynet + + +git clone https://gitlab.com/NebulousLabs/siawebviewer +git checkout logging +yarn diff --git a/skynet-nginx.conf b/skynet-nginx.conf new file mode 100644 index 00000000..ef0dc34c --- /dev/null +++ b/skynet-nginx.conf @@ -0,0 +1,31 @@ +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name siasky.net www.siasky.net; + + location / { + proxy_pass http://localhost:3000; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } +} + +server { + listen 80 default_server; + listen [::]:80 default_server ipv6only=on; + + server_name siasky.net www.siasky.net; + + location / { + proxy_pass http://localhost:3000; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } +} From 6e42ef45426165688a588050d6ef4247e7a29244 Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Wed, 29 Jan 2020 17:30:40 -0500 Subject: [PATCH 04/11] Add pm2 command and fixups --- setup.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 05aae8f8..d6292bef 100755 --- a/setup.sh +++ b/setup.sh @@ -31,7 +31,7 @@ wget -c https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.13.7.linux-amd64.tar.gz rm go1.13.7.linux-amd64.tar.gz -# Sanity check that will pass if go installed correctly. +# Sanity check that will pass if go was installed correctly. go version # Install Sia @@ -52,7 +52,11 @@ sudo certbot --nginx -d siasky.net -d www.siasky.net sudo certbot renew --dry-run sudo ln -s /etc/nginx/sites-available/skynet /etc/nginx/sites-enabled/skynet - -git clone https://gitlab.com/NebulousLabs/siawebviewer +# Setup skynet frontend. +cd ~/ +git clone https://gitlab.com/NebulousLabs/siawebviewer && cd siawebviewer git checkout logging yarn + +# Start the frontend. +pm2 --name skynet start npm -- start From 9b4858974ad6812e65a31fa5197ae24d9812092a Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Thu, 30 Jan 2020 11:17:44 -0500 Subject: [PATCH 05/11] skynet -> user --- bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashrc b/bashrc index e9a3ddf0..3cc9f795 100644 --- a/bashrc +++ b/bashrc @@ -111,4 +111,4 @@ if ! shopt -oq posix; then . /etc/bash_completion fi fi -export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/home/skynet/go/bin +export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/home/user/go/bin From 608b7d949e12745766b0a8a85b178fff63de0fda Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Thu, 30 Jan 2020 11:21:47 -0500 Subject: [PATCH 06/11] Move lets-encrypt commands to separate script --- letsencrypt-setup.sh | 5 +++++ setup.sh | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100755 letsencrypt-setup.sh diff --git a/letsencrypt-setup.sh b/letsencrypt-setup.sh new file mode 100755 index 00000000..49487ae8 --- /dev/null +++ b/letsencrypt-setup.sh @@ -0,0 +1,5 @@ +#! /usr/bin/env bash +set -e + +sudo certbot --nginx -d siasky.net -d www.siasky.net +sudo certbot renew --dry-run diff --git a/setup.sh b/setup.sh index d6292bef..d0c67e06 100755 --- a/setup.sh +++ b/setup.sh @@ -29,6 +29,7 @@ rm alacritty.info # Install Go 1.13.7. wget -c https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.13.7.linux-amd64.tar.gz +source ~/.bashrc rm go1.13.7.linux-amd64.tar.gz # Sanity check that will pass if go was installed correctly. @@ -48,10 +49,6 @@ sudo ufw enable sudo ufw allow 'Nginx Full' sudo ufw delete allow 'Nginx HTTP' -sudo certbot --nginx -d siasky.net -d www.siasky.net -sudo certbot renew --dry-run -sudo ln -s /etc/nginx/sites-available/skynet /etc/nginx/sites-enabled/skynet - # Setup skynet frontend. cd ~/ git clone https://gitlab.com/NebulousLabs/siawebviewer && cd siawebviewer From 08f08f6844ba197553ae5fe5e076ad0c3f4dd5ed Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Thu, 30 Jan 2020 11:31:48 -0500 Subject: [PATCH 07/11] Add ssh setup --- authorized_keys | 2 ++ setup.sh | 9 +++++++++ ssh_config | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 authorized_keys create mode 100644 ssh_config diff --git a/authorized_keys b/authorized_keys new file mode 100644 index 00000000..05fb88c0 --- /dev/null +++ b/authorized_keys @@ -0,0 +1,2 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGYvvU/12GHURRz1wg/8goacZbktAwI/288TlxnYJne3 marcin.jachymiak1@gmail.com +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCpBsw5mPBVIvVd5GX43VXWHWuLeR2h0lfw8vRyDFgmV0TqC9r0POfmWOdSo/QlxHOeI+7S8Ahj/JdDarrx3vJ2vJQkK/tN2bPS30tR0pbCkr0vE/lUWsEuVxOXK132wtFQ/pF3CoVipI8THUS7/Dtap/9fujcEm59dIi3obYGc9F+UetmNtrc+mb6KJ6a1hkaXjD12qP03srSQSDBjch/7nbFFzrRwCZ9DJntMu6Ux6NZ7RcFuXPCg0dK0lggEX/Agzh3KHe69dgiMh8sG0WwCb9vWqd6dtapCt7XKZSnEvyFE1YVZgpsd7bCnGe4vPS3kLsvxeojruDo8Oj3b0exHL9+3Rr4ndVVNHkDxhvlQFbGrd5eiG/brvGjS+ibscTuNukLeiCmBrI5KULObynI2dEQVQKREVywU/qX+xm68noEGBbiRt2L2ImyJvgpNdlyCkDyFhBTo/HtH1WHP1WJijfCHM3jxigeLPRV0GChKK1RbYjZIi6JNsalW7yad/qzHDzht+jBHHAjD4qGlfuNtzP4hs3FErGiQMVZ8g9Tgq8SxPLNOULpcCSwsLLlzfrLYdv52IgkwTIAFR9W+xHGrWypCba9pfskXWXlRNM61qYf3//H0BGHxtuNAASkJrVWwcCuOVN6/EcJOTS9qkg3JiWqs79z0F2I14+AfPFgBKQ== david@nebulouslabs.com diff --git a/setup.sh b/setup.sh index d0c67e06..4746cf94 100755 --- a/setup.sh +++ b/setup.sh @@ -36,9 +36,12 @@ rm go1.13.7.linux-amd64.tar.gz go version # Install Sia +cwd=$(pwd) git clone https://gitlab.com/NebulousLabs/Sia cd Sia && git checkout viewnode && make +cd $cwd + # Setup nginx config sudo cp ./skynet-nginx.conf /etc/nginx/sites-available/skynet sudo nginx -t @@ -57,3 +60,9 @@ yarn # Start the frontend. pm2 --name skynet start npm -- start + +# Add SSH keys and set SSH configs +cd $cwd +sudo cp ./ssh_config /etc/ssh/ssh_config +mkdir -p ~/.ssh +cp ./authorized_keys ~/.ssh/authorized_keys diff --git a/ssh_config b/ssh_config new file mode 100644 index 00000000..1b80182d --- /dev/null +++ b/ssh_config @@ -0,0 +1,51 @@ + +# This is the ssh client system-wide configuration file. See +# ssh_config(5) for more information. This file provides defaults for +# users, and the values can be changed in per-user configuration files +# or on the command line. + +# Configuration data is parsed as follows: +# 1. command line options +# 2. user-specific file +# 3. system-wide file +# Any configuration value is only changed the first time it is set. +# Thus, host-specific definitions should be at the beginning of the +# configuration file, and defaults at the end. + +# Site-wide defaults for some commonly used options. For a comprehensive +# list of available options, their meanings and defaults, please see the +# ssh_config(5) man page. + +Host * +# ForwardAgent no +# ForwardX11 no +# ForwardX11Trusted yes + PasswordAuthentication no +# HostbasedAuthentication no +# GSSAPIAuthentication no +# GSSAPIDelegateCredentials no +# GSSAPIKeyExchange no +# GSSAPITrustDNS no +# BatchMode no +# CheckHostIP yes +# AddressFamily any +# ConnectTimeout 0 +# StrictHostKeyChecking ask +# IdentityFile ~/.ssh/id_rsa +# IdentityFile ~/.ssh/id_dsa +# IdentityFile ~/.ssh/id_ecdsa +# IdentityFile ~/.ssh/id_ed25519 +# Port 22 +# Protocol 2 +# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc +# MACs hmac-md5,hmac-sha1,umac-64@openssh.com +# EscapeChar ~ +# Tunnel no +# TunnelDevice any:any +# PermitLocalCommand no +# VisualHostKey no +# ProxyCommand ssh -q -W %h:%p gateway.example.com +# RekeyLimit 1G 1h + SendEnv LANG LC_* + HashKnownHosts no + GSSAPIAuthentication yes From daa3b413b31f9a57cbc47548402fb8da27286c07 Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Thu, 30 Jan 2020 11:40:44 -0500 Subject: [PATCH 08/11] Fixup nginx commands --- setup.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 4746cf94..9d2e511a 100755 --- a/setup.sh +++ b/setup.sh @@ -16,7 +16,7 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/source # Apt installations. sudo apt-get update sudo apt-get -y install ufw tmux ranger htop nload nginx certbot \ - python-certbot-nginx nodejs gcc g++ make yarn git + python-certbot-nginx nodejs gcc g++ make yarn git vim # Install pm2 sudo npm i -g pm2 @@ -37,6 +37,7 @@ go version # Install Sia cwd=$(pwd) +cd ~/ git clone https://gitlab.com/NebulousLabs/Sia cd Sia && git checkout viewnode && make @@ -45,12 +46,16 @@ cd $cwd # Setup nginx config sudo cp ./skynet-nginx.conf /etc/nginx/sites-available/skynet sudo nginx -t +sudo ln -s /etc/nginx/sites-available/skynet /etc/nginx/sites-enabled/skynet +sudo rm /etc/nginx/sites-enabled/default sudo systemctl reload nginx # Setup firewall +# TODO: disable plain HTTP eventually sudo ufw enable +sudo ufw allow ssh sudo ufw allow 'Nginx Full' -sudo ufw delete allow 'Nginx HTTP' +sudo ufw allow 'Nginx HTTP' # Setup skynet frontend. cd ~/ From 12d8231df2fe636247932cd313a744a915e63132 Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Thu, 30 Jan 2020 13:38:14 -0500 Subject: [PATCH 09/11] Update README.md --- README.md | 20 ++++++++++++++++++-- setup.sh | 3 +-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 282b7e39..fc2e563d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ -# Sia Skynet Production Server Setup Guide +# Skynet Portal Setup Scripts -TODO: import dropbox paper stuff into here +This directory contains a setup guide and scripts that will install and +configure some basic requirements for running a Skynet Portal. The assumption is +that we are working with a Debian Buster Minimal system or similar. + +## Initial Setup +(Assumes we are logged in as root on a fresh installation of Debian) + +1. `apt-get update && apt-get install sudo` +2. `adduser user` +3. `usermod -a -G sudo user` +4. QUIT SSH SESSION +5. ON LOCAL COMPUTER: `ssh-copy-id user@ip-addr` +6. ON LOCAL COMPUTER: `ssh user@ip-addr` +7. (LOGGED IN AS USER): `sudo apt-get install git` +8. `git clone https://github.com/NebulousLabs/skynet-webportal` +9. `cd skynet-webportal/setup-scripts && ./setup.sh` +10. Once DNS records are set you can run: `./letsencrypt-setup.sh` diff --git a/setup.sh b/setup.sh index 9d2e511a..1c305e01 100755 --- a/setup.sh +++ b/setup.sh @@ -59,8 +59,7 @@ sudo ufw allow 'Nginx HTTP' # Setup skynet frontend. cd ~/ -git clone https://gitlab.com/NebulousLabs/siawebviewer && cd siawebviewer -git checkout logging +git clone https://github.com/NebulousLabs/skynet-webportal && cd skynet-webportal yarn # Start the frontend. From 66d5b2d478cc08014dc939c248083026198d5dd0 Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Thu, 30 Jan 2020 13:39:56 -0500 Subject: [PATCH 10/11] Move setup scripts in dir --- README.md | 20 +------------------ setup-scripts/README.md | 19 ++++++++++++++++++ .../authorized_keys | 0 bashrc => setup-scripts/bashrc | 0 .../letsencrypt-setup.sh | 0 setup.sh => setup-scripts/setup.sh | 0 .../skynet-nginx.conf | 0 ssh_config => setup-scripts/ssh_config | 0 tmux.conf => setup-scripts/tmux.conf | 0 9 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 setup-scripts/README.md rename authorized_keys => setup-scripts/authorized_keys (100%) rename bashrc => setup-scripts/bashrc (100%) rename letsencrypt-setup.sh => setup-scripts/letsencrypt-setup.sh (100%) rename setup.sh => setup-scripts/setup.sh (100%) rename skynet-nginx.conf => setup-scripts/skynet-nginx.conf (100%) rename ssh_config => setup-scripts/ssh_config (100%) rename tmux.conf => setup-scripts/tmux.conf (100%) diff --git a/README.md b/README.md index fc2e563d..bfa4af69 100644 --- a/README.md +++ b/README.md @@ -1,19 +1 @@ -# Skynet Portal Setup Scripts - -This directory contains a setup guide and scripts that will install and -configure some basic requirements for running a Skynet Portal. The assumption is -that we are working with a Debian Buster Minimal system or similar. - -## Initial Setup -(Assumes we are logged in as root on a fresh installation of Debian) - -1. `apt-get update && apt-get install sudo` -2. `adduser user` -3. `usermod -a -G sudo user` -4. QUIT SSH SESSION -5. ON LOCAL COMPUTER: `ssh-copy-id user@ip-addr` -6. ON LOCAL COMPUTER: `ssh user@ip-addr` -7. (LOGGED IN AS USER): `sudo apt-get install git` -8. `git clone https://github.com/NebulousLabs/skynet-webportal` -9. `cd skynet-webportal/setup-scripts && ./setup.sh` -10. Once DNS records are set you can run: `./letsencrypt-setup.sh` +# Skynet Portal diff --git a/setup-scripts/README.md b/setup-scripts/README.md new file mode 100644 index 00000000..fc2e563d --- /dev/null +++ b/setup-scripts/README.md @@ -0,0 +1,19 @@ +# Skynet Portal Setup Scripts + +This directory contains a setup guide and scripts that will install and +configure some basic requirements for running a Skynet Portal. The assumption is +that we are working with a Debian Buster Minimal system or similar. + +## Initial Setup +(Assumes we are logged in as root on a fresh installation of Debian) + +1. `apt-get update && apt-get install sudo` +2. `adduser user` +3. `usermod -a -G sudo user` +4. QUIT SSH SESSION +5. ON LOCAL COMPUTER: `ssh-copy-id user@ip-addr` +6. ON LOCAL COMPUTER: `ssh user@ip-addr` +7. (LOGGED IN AS USER): `sudo apt-get install git` +8. `git clone https://github.com/NebulousLabs/skynet-webportal` +9. `cd skynet-webportal/setup-scripts && ./setup.sh` +10. Once DNS records are set you can run: `./letsencrypt-setup.sh` diff --git a/authorized_keys b/setup-scripts/authorized_keys similarity index 100% rename from authorized_keys rename to setup-scripts/authorized_keys diff --git a/bashrc b/setup-scripts/bashrc similarity index 100% rename from bashrc rename to setup-scripts/bashrc diff --git a/letsencrypt-setup.sh b/setup-scripts/letsencrypt-setup.sh similarity index 100% rename from letsencrypt-setup.sh rename to setup-scripts/letsencrypt-setup.sh diff --git a/setup.sh b/setup-scripts/setup.sh similarity index 100% rename from setup.sh rename to setup-scripts/setup.sh diff --git a/skynet-nginx.conf b/setup-scripts/skynet-nginx.conf similarity index 100% rename from skynet-nginx.conf rename to setup-scripts/skynet-nginx.conf diff --git a/ssh_config b/setup-scripts/ssh_config similarity index 100% rename from ssh_config rename to setup-scripts/ssh_config diff --git a/tmux.conf b/setup-scripts/tmux.conf similarity index 100% rename from tmux.conf rename to setup-scripts/tmux.conf From d24f3bd5549b8c24dda450144f1407f968e9010f Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Thu, 30 Jan 2020 17:19:38 -0500 Subject: [PATCH 11/11] Add copy-paste to tmux --- setup-scripts/tmux.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup-scripts/tmux.conf b/setup-scripts/tmux.conf index 0314d36f..043bab9f 100644 --- a/setup-scripts/tmux.conf +++ b/setup-scripts/tmux.conf @@ -14,3 +14,5 @@ bind r source-file ~/.tmux.conf set -g visual-activity off set -g mouse on +# This copies highlighted text. +set -g mouse-select-window on