A set of shell scripts to automate the setup of an Ubuntu 20.04.0x and above server, by:
- Updating and upgrading the fresh install;
- changing the default user's password;
- changing the default user's name;
- setting up ssh keys for remote connection;
- configuring the ssh server;
- configuring ufw;
- configuring fail2ban;
- configuring the timezone;
- configuring git;
- installing docker; and
- setting some environment variables for docker usage.
Clone the repository, and submodules, then switch to the repository directory with:
git clone --recursive https://github.com/papalozarou/linux-setup.git && \
cd ~/linux-setup
Run the first script:
sudo ./01-initialise-setup.sh
Once completed, run subsequent scripts following instructions and prompts.
When all scripts have been executed, it's safe to delete the repo with:
sudo rm -R ~/linux-setup
This leaves the .config/linux-setup
directory in place for reference.
Script change-username.sh
kills all processes and requires logging in with a temporary user which is set up as part of the script.
The scripts are not particularly robust in terms of error handling. Soz like.
- Fix docker validation
- Move all service installs to using
installRemovePackage
function - Add timezone and NTP setup
- Robust error handling