Ubuntu Desktop 22.04 Jammy Jellyfish
sudo snap refresh core snapd
sudo snap install ffmpeg --classic
sudo snap install telegram-desktop
sudo snap install code --classic
sudo snap install node --channel=18/stable --classic
sudo snap install beekeeper-studio
sudo apt install git -y
ssh-keygen
cat ~/.ssh/id_rsa.pub
git config --global user.name "joshxyzhimself"
git config --global user.email "joshxyzhimself@gmail.com"
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt install postgresql -y
sudo -u postgres psql
\password
exit
curl -O https://dl.typesense.org/releases/0.23.1/typesense-server-0.23.1-amd64.deb
sudo apt install ./typesense-server-0.23.1-amd64.deb
sudo systemctl status typesense-server
cat /etc/typesense/typesense-server.ini
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
sudo apt update
sudo apt install tailscale
sudo tailscale up
tailscale ip -4
curl -s https://install.zerotier.com | sudo bash
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version
npm --version
sudo sh -c ' echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql
sudo systemctl status postgresql
sudo -u postgres psql
\p assword
\q uit
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf ' https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf ' https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
sudo systemctl status caddy
nano /etc/caddy/Caddyfile
{
log {
output file /var/log/access.log
format json
}
}
legacy.jxyz.me {
handle {
header {
Cache-Control "no-cache"
Strict-Transport-Security "max-age=63072000"
defer
}
encode gzip
reverse_proxy 0.0.0.0:8080
}
tls joshxyzhimself@gmail.com {
protocols tls1.2 tls1.3
ciphers TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
}
}
jxyz.me {
handle {
header {
Cache-Control "no-cache"
Strict-Transport-Security "max-age=63072000"
defer
}
encode gzip
reverse_proxy 0.0.0.0:8080
}
tls joshxyzhimself@gmail.com {
protocols tls1.3
}
}
sudo systemctl stop caddy
sudo systemctl start caddy
curl -O https://dl.typesense.org/releases/0.23.1/typesense-server-0.23.1-amd64.deb
sudo apt install ./typesense-server-0.23.1-amd64.deb
sudo systemctl status typesense-server
cat /etc/typesense/typesense-server.ini
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo " deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $( lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis
sudo systemctl status redis-server
sudo ufw status
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw enable
sudo ufw status
nano /etc/ssh/sshd_config
Uncomment "ClientAliveInterval", set it to "60"
Uncomment "ClientAliveCountMax", set it to "60"
Use "CTRL + x", then "Y", then "Enter" to save the file.
ssh-keygen
cat ~ /.ssh/id_rsa.pub
npm install pm2 --global
pm2 startup
pm2 start ./index.mjs --name=example -- --production
pm2 save
git clone git@github.com:joshxyzhimself/example.git
{
"http_hostname" : " jxyz.me" ,
"http_port" : 8080
}
# restart
sudo shutdown -r now
Needs update:
References