Have I been setting up directadmin wrong all these years?

ceromus

New member
Joined
Oct 30, 2019
Messages
4
I have done the same steps for all of my servers for years but this time I held off on setting up SSL for hostname until after a restart and apparently revealed to myself that maybe i've been doing it wrong all these years? Here is what i've been doing:

1. Connect via SSH.

2. Issue commands to create a swap file:
sudo dd if=/dev/zero of=/swap count=8192 bs=1MiB
sudo chmod 600 /swap
sudo mkswap /swap
sudo swapon /swap
sudo echo "/swap swap swap sw 0 0" >> /etc/fstab

3. For centos 8 I do:
yum install iptables wget tar gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio \
libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed \
autoconf automake libtool which patch mailx bzip2-devel lsof glibc-headers kernel-devel expat-devel \
psmisc net-tools systemd-devel libdb-devel perl-DBI perl-libwww-perl xfsprogs rsyslog logrotate crontabs file \
kernel-headers hostname

4. Issue commands for directadmin setup:
wget -O setup.sh https://www.directadmin.com/setup.sh
chmod 755 setup.sh
./setup.sh auto

5. Login to directadmin and create the subdomain for the servers hostname like host.domain.com in the subdomain management.


Is step 5 incorrect? I realized this time since I had restarted the server before trying to setup SSL for the hostname that it will no longer place the SSL certs in /usr/local/directadmin/conf/ , I assume this is because it is trying to place them in whatever the location is for the normal domains? What is the proper way to setup your hostname in directadmin? Do i simply just go into administrator settings and type in the server hostname in the "Server's Hostname" and thats it?
 
Yes 5 is incorrect..... It'll be setup (with dns etc, but not dkim) when you run setup.sh, or, like you say, you can change it via the administrator settings page........
 
5. Login to directadmin and create the subdomain for the servers hostname like host.domain.com in the subdomain management.
Yes your hostname is not a subdomain.. Its the servers "name"
 
Not even then. When you run setup.sh it's created as a domain. Not a subdomain under subdomain management as stated.
That's what I mean, I should've said "It'll be setup as a hostname if you enter one (with dns etc, but not dkim) when you run setup.sh"
 
Yep, but if the hostname is setup as a domain, then it's not an error or mistake. I've seen people saying that it might be good to have DKIM working via hostname, thought it was Zeiter. I'll have to lookup the post.

Ah here you go:

and his next post (2 posts below that one).
 
Not an error no, but it's not recommended... I always setup my hostnames as server1, server2, etc, as a with my business domain and use Cloudflare for DNS, etc...... But I digress.......
 
Not an error no, but it's not recommended...
Says who? DA did it by default for years, and even Zeiter says something else. Never seen it wasn't recommended.

That having said, I've also always removed that one and put the hostname in my domain with an A record. But maybe that's why DKIM is not working on my hostname. ;)

Can you live with the thoughts we have on this @ceromus? Wrong as a subdomain, but hostname as domain is a choice. Some find it better to do not, others find it better to do it like that for certain reasons. So that's not wrong but a choice.

sudo chmod 600 /swap
I would create a swap partition during installation.

Do i simply just go into administrator settings and type in the server hostname in the "Server's Hostname" and thats it?
You should do that anyway, if it's not in there already. Should be there automatically when using /auto I thought.
 
Back
Top