Skip to content

Latest commit

 

History

History
164 lines (121 loc) · 7.35 KB

directadmin.md

File metadata and controls

164 lines (121 loc) · 7.35 KB

DA Hostname

[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 server

Just 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.


Moving DA and general structure

  • 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 DirectAdmin

  • 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

Restart Directadmin

You can restart DirectAdmin by running systemctl restart directadmin or service directadmin restart via SSH as the root user.


Mail Accounts


Customizing

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 config

or short form:

da c

If you are looking for a specific option, just grep it, like so (using 'letsencrypt' as an example):

/usr/local/directadmin/directadmin config | grep letsencrypt

Instead 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=VALUE

Add --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 required

If the setting has been changed successfully, directadmin will exit with code 0.


How to change the Return Path for diradmin emails

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 directadmin

By default, this is disabled and relies on your hostname being set up/resolving correctly.


directadmin set msg_sys=Message System

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

  1. Open the DirectAdmin configuration file via SSH using a text editor:
nano /usr/local/directadmin/conf/directadmin.conf
  1. Locate or add the msg_sys variable and change it to your desired name (such as your hosting company or server name):
msg_sys=Your Hosting Company Name
  1. Save the file and restart DirectAdmin to apply the changes:bashservice directadmin restart
service directadmin restart

Exim setup

  • Perfect E-Mail Setup DA docs
  • Generate new DKIM keys/DNS records DA forum
  • Send E-mails from another server? DA forum

Troubleshooting Exim