SoftEther VPN ubuntu server

Update server and install essential package

sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get -y install build-essential wget curl

Install SoftEther RTM from source as systemd daemon

#!/usr/bin/env bash
RTM=$(curl http://www.softether-download.com/files/softether/ | grep -o 'v[^"]*e' | grep rtm | tail -1)
IFS='-' read -r -a RTMS <<< "${RTM}"

mkdir -p /tmp/softether
cd /tmp/softether || exit 1

wget "http://www.softether-download.com/files/softether/${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-${RTMS[4]}/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-linux-x64-64bit.tar.gz"

tar xzf "softether-vpnserver-${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-linux-x64-64bit.tar.gz"

cd vpnserver
sudo make

cd ..
sudo mv vpnserver /usr/local/

sudo chmod 0600 /usr/local/vpnserver/*
sudo chmod +x /usr/local/vpnserver/vpnserver
sudo chmod +x /usr/local/vpnserver/vpncmd

cat <<EOF >>/lib/systemd/system/vpnserver.service
[Unit]
Description=SoftEther VPN Server
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/vpnserver/vpnserver start
ExecStop=/usr/local/vpnserver/vpnserver stop

[Install]
WantedBy=multi-user.target
EOF

systemctl enable vpnserver.service
systemctl restart vpnserver.service

exit 0

Init first config

cd /usr/local/vpnserver/
sudo ./vpncmd

1


ServerPasswordSet

Installer script

Minecraft server on ubuntu

Update OS & package

sudo apt update && sudo apt -y full-upgrade

Install JAVA & other package

sudo apt -y install software-properties-common tmux glances nano wget curl openjdk-11-jdk-headless

Add minecraft user & login with minecraft

sudo adduser minecraft
su minecraft

Download minecraft server from https://yivesmirror.com/downloads/paper

mkdir server
cd server
curl -L https://yivesmirror.com/files/paper/Paper-latest.jar > minecraft_server.jar
echo "eula=true" > eula.txt

Exit to main user

exit

Add minecraft server to systemd service

sudo nano /etc/systemd/system/minecraft-server.service

With this unit

[Unit]
Description=start and stop the minecraft-server

[Service]
WorkingDirectory=/home/minecraft/server
User=minecraft
Group=minecraft
Restart=on-failure
RestartSec=20 5
Type=forking

ExecStart=/usr/bin/tmux new -s minecraft-server -d '/usr/bin/java -Xms512M -Xmx2048M -XX:+UseG1GC -XX:ParallelGCThreads=4 -jar minecraft_server.jar nogui'

ExecStop=/usr/bin/tmux send-keys -t minecraft-server:0.0 'say SERVER SHUTTING DOWN. Saving map...' C-m 'save-all' C-m 'stop' C-m
ExecStop=/bin/sleep 2

[Install]
WantedBy=multi-user.target
Alias=minecraft.service

Reload daemon and allow autostart

sudo systemctl daemon-reload
sudo systemctl enable minecraft-server

Start minecraft server

systemctl start minecraft-server

Stop minecraft server

systemctl stop minecraft-server

Get minecraft server status

systemctl status minecraft-server

ubuntu 16.04 + nvidia

#!/usr/bin/env bash
sudo apt purge "nvidia*"

sudo add-apt-repository -y ppa:graphics-drivers/ppa
sudo apt update && sudo apt -y full-upgrade

sudo apt install -y dkms
sudo apt install -y nvidia-378
sudo echo "blacklist nouveau" > /etc/modprobe.d/disable-nouveau.conf
sudo echo "options nouveau modeset=0" >> /etc/modprobe.d/disable-nouveau.conf

exit 0