Skip to content

yorch/ubuntu-server-bootstrap

Repository files navigation

Ubuntu Server Bootstrap

A slightly opinionated and straightforward script to setup base Ubuntu 18+ servers environment with:

This script is intended to be run as root.

When deploying a VPS in many providers (like Digital Ocean, Vultr, OVH, Contabo, etc), you will get the instance with only the root by default. Make sure to create a user for your daily use.

It's tested with the following Ubuntu LTS versions:

  • 18.04
  • 20.04
  • 22.04

Although, most likely would work without problems in other Ubuntu non LTS versions.

Installation

Just need to run:

wget -q -O - https://raw.githubusercontent.com/yorch/ubuntu-server-bootstrap/main/bootstrap.sh | bash

Or with curl if already installed:

curl -s https://raw.githubusercontent.com/yorch/ubuntu-server-bootstrap/main/bootstrap.sh | bash

This will take a few minutes, after its done, you might want to restart the box in case there is a newer kernel installed that just got installed.

At the minimum, you should log out and log in again so zsh gets activated on your session.

Docker

You can test or use this script with Docker. First clone this repo and follow the next steps.

Build the Docker image with:

docker build -t bootstrapped-ubuntu .

And finally, run it in interactive mode:

docker run -it bootstrapped-ubuntu

License

MIT, see LICENSE for details.