VPS Configuration

style-notepad len:738 crease:41% color:3 rot:0

GCP VM Management (gcp )

curl -fsSLO joyus.org/vps/gcp && chmod +x gcp
./gcp login
./gcp projects
./gcp <project> create <label>
./gcp logout

VPS Setup (init )

Already executed automatically on first boot by gcp . To run manually:

curl -L joyus.org/vps/init | bash -s ymattw

Change Hostname

new="newhostname"
sudo hostnamectl set-hostname $new
sudo sed -i "s/\b$(hostname -s)\b/$new/g" /etc/hosts

Change Timezone

Auto-detect from server IP location:

tz=$(curl ip-api.com/line?fields=timezone)
sudo timedatectl set-timezone $tz

Or set manually (e.g., Zurich):

sudo timedatectl set-timezone Europe/Zurich

Xray Setup (xray )

curl -L joyus.org/vps/xray | bash -s xx.joyus.org

See also Shadowrocket Rules .

VPS Configuration

style-notepad len:738 crease:41% color:3 rot:0
Aug 9, 2020

GCP VM Management (gcp )

curl -fsSLO joyus.org/vps/gcp && chmod +x gcp
./gcp login
./gcp projects
./gcp <project> create <label>
./gcp logout

VPS Setup (init )

Already executed automatically on first boot by gcp . To run manually:

curl -L joyus.org/vps/init | bash -s ymattw

Change Hostname

new="newhostname"
sudo hostnamectl set-hostname $new
sudo sed -i "s/\b$(hostname -s)\b/$new/g" /etc/hosts

Change Timezone

Auto-detect from server IP location:

tz=$(curl ip-api.com/line?fields=timezone)
sudo timedatectl set-timezone $tz

Or set manually (e.g., Zurich):

sudo timedatectl set-timezone Europe/Zurich

Xray Setup (xray )

curl -L joyus.org/vps/xray | bash -s xx.joyus.org

See also Shadowrocket Rules .