Q: Emacs tabs strange behaviour .conf files Edit: Fresh install of emacs (emacs version from M-x emacs-version: GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21) of 2017-09-22, modified by Debian)
I had originall had emacs version 47.0 (that was from dpkg -l emacs which showed that as a metapackage) 
Server was new and never had it before.
I am not an emacs guru. I don't fiddle too much and I can just get around in it.
I set
tab-width 4
indent-tabs-mode nil
I tried it before setting tab-stop-list and then setting it to nil and to "4 8 12" and to "0 4 8" but it didn't change the behaviour I describe below. In fact none of the settings I changed seemed to affect anything for this.
I then tried searching for the problem, and I tried everything mentioned (c-basic-offset, standard-indent, etc) nothing seemed to help.
I am simply trying to edit conf files.
This is an example
settings.conf:
setting name {
    param1=1
    param2={
        s1="test"
        s2=5
    }

}

however when I hit the tab key the behaviour is all over the place.
[a1]
setting name {
[a2]
    param1=1
    param2={
[a3]
        s1="test"
        s2=5
    }
}



*

*in [a1] - tab is 4 spaces - I can hit  all day and its fine - perfect

*in [a2] hitting tab from the start of the line:
first tab key inserts a tab (size of 4 spaces but backspace deletes it as a whole) and then 3 spaces
second tab key inserts 3 tabs (each the size of 4 spaces)
third tab key inserts 2 tabs (4 spaces size) and then 3 spaces  

*in [a3] hitting  from the start of the line:
first tab key inserts a tab (size 4 spaces)
second tab key inserts a tab (4 spaces) and then 3 individual spaces
third tab key seems to move forward 1 space and converts the 3 individual spaces from before and its newly added 1 space to a tab character as backspace deletes a size of 4 spaces in 1 go
I have no idea what is going on and except for those settings mentioned above that I change through M-x customize I haven't touched anything else at all.
Only other thing I can say is I am running emacs on Ubuntu 18.04 (edit from 20.04 - my mistake, sorry) on a server I ssh too.
By C-h k  I get the following:
TAB runs the command indent-for-tab-command (found in global-map),
which is an interactive compiled Lisp function in 'indent.el'.
It is bound to TAB.
(indent-for-tab-command &optional ARG)
Indent the current line or region, or insert a tab, as appropriate.
This function either inserts a tab, or indents the current line,
or performs symbol completion, depending on 'tab-always-indent'.
The function called to actually indent the line or insert a tab
is given by the variable 'indent-line-function'.
If a prefix argument is given, after this function indents the
current line or inserts a tab, it also rigidly indents the entire
It works in 'text-mode" but I don't want to switch to 'text-mode' (in which it works) as I like the highlighting it does.
*Edit (from comment): 
I need to edit files that are listed as .conf and .cnf. There are hundreds of them in total. Some are for internal applications. The .cnf file are for nagios, and the .conf files are for icinga
Any help is appreciated.
Thanks.
