[How-To] Create or change your server's hostname in Directadmin DA forum
-
- Setup domain to host email only DA forum
Commands before installation of DA:
Via SSH as root:
hostnamectl set-hostname server.mydomain.com
after that check your /etc/hostname file to see if the hostname is fully in there.
So it should read: server.mydomain.com
After that check your /etc/hosts file. Adjust it if needed. Should look like:
127.0.0.1 localhost.localdomain localhost
::1 ip6-localhost ip6-loopback
192.168.0.1 server.mydomain.com serverJust to be sure reboot your server/vps and issue these commands check if they return the correct hostname.
hostname
and
hostname -f
both commands should give the full server.mydomain.com hostname as a result.
Then your fine and the DA setup will take over your hostname.
- How to Convert Addon Domain to separate DA Account DA forum
- Move site and domain of admin to another account DA forum
- Move domain/website to another user DA forum
- How do I setup proper NS & DNS construction and settings? DA forum
- Maintaining domains, users, resellers DA docs
- Securing the system DA docs
- Securing DirectAdmin DA docs
- AMCE For Server Hostname DA docs
- How can I disable telnet DA forum
- What should I change on the DirectAdmin control panel to make my server more secure? forumweb.hosting
- How to Enable Hotlink Protection in DirectAdmin asiagb.com
You can restart DirectAdmin by running systemctl restart directadmin or service directadmin restart via SSH as the root user.
- System mail accounts https://forum.directadmin.com/threads/system-mail-accounts-returning-550-no-such-recipient-here.59446/
- All directadmin.conf values https://docs.directadmin.com/directadmin/general-usage/all-directadmin-conf-values.html
- Directories and locations https://docs.directadmin.com/directadmin/general-usage/directories-and-locations.html
- Customizing Admin https://docs.directadmin.com/directadmin/customizing-workflow/customizing-admin.html
- Customizing Users https://docs.directadmin.com/directadmin/customizing-workflow/customizing-users.html
- Customize-everything https://docs.directadmin.com/custombuild/customize-everything.html
- Pre-defined options installation, also directadmin.conf possible? And other questions https://forum.directadmin.com/threads/pre-defined-options-installation-also-directadmin-conf-possible-and-other-questions.68921/
- Customizing Nginx+Apache https://docs.directadmin.com/webservices/nginx_apache/customizing-nginx-apache.html
- Main DirectAdmin configuration file https://docs.directadmin.com/directadmin/general-usage/configuring-da.html
- How to enable notifications for account creation in DirectAdmin https://www.plothost.com/kb/notifications-account-creation-directadmin/
- How to block a user from sending emails https://www.plothost.com/kb/block-smtp-user-directadmin/
Besides of options listed in the directadmin.conf, the panel itself uses some pre-defined defaults. To list all current configuration options:
/usr/local/directadmin/directadmin configor short form:
da cIf you are looking for a specific option, just grep it, like so (using 'letsencrypt' as an example):
/usr/local/directadmin/directadmin config | grep letsencryptInstead of editing the directadmin.conf directly, you may use the da config-set functionality to change the options:
# before v1.710
da config-set NAME VALUE
# since v1.710
da config-set NAME VALUE
da config-set NAME=VALUEAdd --restart flag to have directadmin restarted. Since v1.710, directadmin.service is reloaded/restarted by default, this can be turned off with --no-reload flag.
For example, to set dns_ttl to 1, execute the commands:
# before v1.710
da config-set dns_ttl 1 # manual reload required
da config-set dns_ttl 1 --restart
# since v1.710
da config-set dns_ttl 1
da config-set dns_ttl=1
da config-set dns_ttl=1 --no-reload # manual reload requiredIf the setting has been changed successfully, directadmin will exit with code 0.
https://docs.directadmin.com/directadmin/general-usage/configuring-da.html
Use the new diradmin_envelope option, which allows you to override the default "diradmin@host.name.com" in the Return-Path as desired:
da config-set diradmin_envelope your@email.com
systemctl restart directadminBy default, this is disabled and relies on your hostname being set up/resolving correctly.
The msg_sys=Message System setting in DirectAdmin defines the sender name ("From" display name) used for automated system notification emails.
How to Change the Setting
- Open the DirectAdmin configuration file via SSH using a text editor:
nano /usr/local/directadmin/conf/directadmin.conf- Locate or add the
msg_sysvariable and change it to your desired name (such as your hosting company or server name):
msg_sys=Your Hosting Company Name- Save the file and restart DirectAdmin to apply the changes:bashservice directadmin restart
service directadmin restart- Perfect E-Mail Setup DA docs
- Generate new DKIM keys/DNS records DA forum
- Send E-mails from another server? DA forum
- https://docs.directadmin.com/other-hosting-services/exim/troubleshooting.html
- Solving ‘From’ Address Issues in Email Forwarding with DirectAdmin and Exim directadminhosting.eu
- Sending outbound email through remote mail server DA docs
- root emails DA forums