Server - Contents

The Fundamental Setup

- establishing a server accessible by an IP

revised: 18-Jan-2023

These first steps will create the server - a VPS based on the image: Debian 11 64bit "Bullseye" and establishing means to upload/download files together with a graphical comprehensive control panel[Webmin].

It is worthly to note here that one will be working within a "console/monitor" environment, very unlike the common graphical ones. The steps are presented in a manner to make this experience minimal - that said, it would be very useful to have some familiarity with this environment. Once the server is up and running, one may wish look at some very basic bash commands and Linux commands. Of the many such guides, have a look a this one: Linux commands to A Beginner's Guide to the BASH Terminal

The VPS intended in these pages, are for services only and not for significant data storage. Hence a server space of even 12Gb is more than enough.

The Steps

Step01 Establish an account with Linode (preferred) or DigitalOcean: Apart from establishing the usual username and password process, one is required to have a credit card. Once login, one will "Add a Linode" (it is highly recommended you choose one of at least 2Gb RAM. There is also the option to create a DigitalOcean "droplet", choosing in all cases, Debian 11.3 64bit as the operating system. Both providers will allow one to enter a public key (from one's SSH public/private key- see: More Secure Logon - SSH). If one has chosen not to use the SSH key pair (not recommended), either one of these providers will either send a welcome email containing two critical bits of information: the site IP address [a number with 4 parts eg. 127.0.0.1] and the user: 'root' password or provides the opportunity to set the 'root' password prior to the creation of the server

Step02 Using PuTTY, see reference: DigitalOcean - using SSH key with PuTTY. Open the application: PuTTY on your computer. PuTTY will open to its configuration page. In the dialogue box below the sub-heading "Host Name (or IP address)", copy and paste the IP address from the welcome email. The port can be left blank and the button active beside "SSH". As described in the linked tutorial, "Working with PuTTY's Public Key Format", set PuTTY to link up with one's private key. As PuTTY logins into your server, one will initially receive a warning: choose to 'accept' to continue.

Tip#1: After entering your IP number, if you also type in a label such as "MyServer" in the dialogue box below the sub-heading "Saved Sessions" and click on "Save", PuTTY will open in future to your server if you double clicked that label now appearing in the list.
Tip#2: There is a way to "Copy & Paste" text from the Windows environment to the Linux one. Having done the usual "copy" of some text, one clicks on the open PuTTY terminal, then right-click to enter text. This works for entering passwords - although no visible entry is seen.

Step03 At the first login with PuTTY, a dialog warning is produced -- accept the connection. The first request(if one has not used a SSH key-pair) from the PuTTY terminal will be [login as:] Enter the username: root and press the Enter/Return key. The second request will be for the password. From the initial server setup, one should have the root password, copy and paste (see Tip#2) this password and press the Return key.

Step04 One should now be successfully logged in to the server. Now create the password for user: root // one that has at least 12 characters. Should one need to create another password, one can create handy but a very strong and memorable password to replace it - for good suggestions see: Passwords With the new passward handy to copy, enter this command in the terminal: passwd that follows after '#'):

root# passwd

Step05 The following commands need to be entered (via cut & paste) and their actions completed sequencely:

root# apt update
root# apt -y upgrade

Step06 Installing and activating the Webmin control panel: Enter similarly the following three commands below:

root# wget https://prdownloads.sourceforge.net/webadmin/webmin_2.011_all.deb
root# apt install ./webmin_2.011_all.deb
root# /etc/webmin/start
root# ss -altnp | grep 100 // a simple check to see if it is running
root# systemctl status webmin // another check, use 'ctl-c' to exit.

Alternative approach: Install Webmin on Debian 11 by kafirunix.com - recommended section: Install Webmin using Webmin DEB binary The earlier presentation (same section) is also useful:Install Webmin on Debian 10

Step06 Opening Webmin: Once the install process is complete, type in this link in one's browser: https://[IP address]:10000. One will get the warning along the lines of "Connection not Protected". Ignore this warning and advanceto make the exception. Thereafter, this should lead one to the login page of the server's Webmin control panel.

The username for Webmin will be 'root' and its password.

Tip#3: Whenever one logs into Webmin, it alerts one to programmes on the server that need updating and there is a page within that makes this updating a one-click process. It is good practice and security to keep the server up-to-date.

Reaching and completing successfully Step06, one has now a functionally and accessible server. The graphical interface: Webmin now offers many advantages in future configuration work. However given the nature of the Internet, one needs to immediately secure the server with a firewall, the fail2ban app and finally Proftp as means to upload/down files.

Backing Up the Server - Service by the Providers

1. For USD2.50/month, Linode will automatically perserve a daily snapshot of the server and hold snapshots for 10 days. One can also force a snapshot to be taken at any given time. A snapshot enables one to restore the server to the time the snapshot was taken. More information can be found here: Intro to Backups.
2. For Digital Ocean, the cost is USD2.00/mo for the USD10 droplet. Information on how that works can be found at: Backups_Quickstart.

For other VPS -- that have provided no swap disk

Based on How to Add Swap Space on Ubuntu 20.04 by Linuxize.com These essential bash commands to provide a 2G swap disk:
root# fallocate -l 2G /swapfile
root# chmod 600 /swapfile
root# mkswap /swapfile
root# swapon /swapfile
root# nano /etc/fstab // paste at bottom of file
/swapfile swap swap defaults 0 0
root# swapon --show // check that it is operational
root# nano /etc/sysctl.conf// paste at bottom of file
vm.swappiness=10 // for a production server -- can be higher.
Server - Contents