This is a setup script to automate the setup and provisioning of Ubuntu servers. It does the following:
- Adds a new user account with sudo+lxd access (+adds lxd group)
- Deny root login to the server
- Setup Uncomplicated Firewall
- Create Swap file based on machine's installed memory
- Setup the timezone for the server (Default to "Europe/Berlin")
- Install Network Time Protocol
SSH into your server and install git + lxd if it is not installed:
apt update
apt install git lxd lxd-client -y
Clone this repository into your home directory:
cd ~
git clone https://github.com/HendrikHaase/ubuntu-server-setup.git
Run the setup script
cd ubuntu-server-setup
bash setup.sh
Install wireguard Server (needs port 51820/udp)
ufw allow 51820/udp
wget https://raw.githubusercontent.com/HendrikHaase/wireguard-install/master/wireguard-install.sh -O wireguard-install.sh && bash wireguard-install.sh
Install wireguard Client: wireguard clients
you'll see
This setup script has been tested against Ubuntu 14.04, Ubuntu 16.04 and Ubuntu 18.04. (as per original author)
no