Initial Setup of Ubuntu Server
This book covers the initial setup of ubuntu server 20.04 / 22.04, perfect for creating an environment for docker container deployments, hardening ssh access into the server and setting up essential monitoring tools.
Install Ubuntu Server
c'mon, I think you are more than capable of installing ubuntu server and coming to the terminal l...
Getting Started
Creating Bootable USB Here is a list of few things you need to do: Using a tool like Balena E...
1. Boot from Install Media
To trigger the installation process, perform the following: Put the Ubuntu DVD into your DVD d...
2. Choose your language
After the boot messages appear, a ‘Language’ menu will be displayed. As the message sugg...
3. Choose the correct keyboard layout
Before you need to type anything in, the installer will next display a menu asking you to select ...
4. Networking
The installer will automatically detect and try to configure any network connections via DHCP. ...
5. Configure Storage
The next step is to configure storage. The recommended install is to have an entire disk or parti...
6. Select a Device
This menu will allow you to select a disk from the ones detected on the system. To help ...
7. Confirm Partitions
With the target drive selected, the installer will calculate what partitions to create and pres...
8. Setup a Profile
The software is now being installed on the disk, but there is some more information the install...
9. Install Software
Once you have finished entering the required information, the screen will now show the progress o...
10. Installation Complete!
When the install is complete, you will see a message like this on the screen. Remember t...
User Configuration
Creating non-root user with sudo permission and hardening ssh access
1. Create Non-Root User with sudo permissions
If you entered a user at the start of the ubuntu server install, then you do not need to do this ...
2. Setting up key-based authentication
Key-based authentication is where the client machine authenticates with the host using a long str...
3. Hardeing SSH Access
Now that you've setup a non-root user with key-based authentication and sudo privileges, it is ti...
Installing Docker
This chapter covers the installation of the docker engine for Ubuntu Server, and you can use it d...
1. Install Docker
First, uninstall old versions of docker: sudo apt-get remove docker docker-engine docker.io cont...
2. Adding your user to docker group
Every single time, you want to run a docker command, you will have to sudo in front of it. This c...
3. Start Docker on Boot
Configure Docker Engine to start on boot: If you see yourself powering down your server at night...
4. Deploying Portainer
Portainer is a tool with a fantastic Web UI for managing your docker containers, deploying new on...
Portainer Optimizations
Simple Optimizations/Life Hacks for Portainer
Your Initial Setup is Complete!
You're done! You have now set everything up to begin hosting your application. Proceed to book I...