DTC-Xen Installation

DTC-Xen / Dom0 Howtos

DTC-Xen / DomU Howtos


DTC Howtos




Devel docs

Wiki - i18n

Wiki - Meta

Debian Express Setup

For those who wants to give it a try, here is the best way to have a (fast) setup of the DTC control panel. But first, to make it very quick for experts, here's the steps:

  • Check that your hostname is (unless you know what you are doing)
  • Add GPLHost's Debian repo (see addresses below) and apt-get update (use "gplhost-archive-keyring" package for our repo. key)
  • apt-get install dtc-toaster
  • /usr/share/dtc/admin/install/install
  • apache2ctl start
  • Enjoy and browse:

Now, the more detailed explanations to make sure every point is 100% clear.


You will need a freshly installed Debian stable with a hard drive partition of at least 1.2 GB, plus all the space you will need for you hosted files (mail, web and db). The absolute minimum amount of RAM to run DTC is 128 MB of RAM with 256 MB of swap space, but it's highly recommended to use it with 6 or 700 MB of RAM, so you have enough to do mail content scanning and filtering. DTC doesn't use some memory by itself (as it's made only of sh and php scripts), but there's a lot of daemon running to run all the system. To give a rough idea, with about 1000 domains, you will absolutely need something like 2GB as a start, but with a reasonable traffic, 4 or even 8GB seems a good idea.

DO NOT INSTALL on DEBIAN 7. DTC is not ready for it. If you are ready to see some breakage, and put some time in fixing various things, you can take a look at this temporary page regarding installation on Wheezy: Wheezy installation specific notes

GPLHost Debian repository
If you are using Etch, first of all, add the debian repository (select the closest to you, the .fr and .sg mirrors are synchronized hourly). Note that if you are using Lenny, DTC is directly available from your closest Debian mirror, BUT it's version is outdated and you'd better use the GPLHost repositories below, unless you want to use something older than the stable release. If you are using Squeeze, DTC has been removed from it upon request from the DTC developers (because the new version couldn't get in).

Here are the addresses of our mirrors:

Location FTP HTTP
Atlanta, IPV6
Singapore 1 (Acenix / NME)
Singapore 2 (Qala):
Kuala Lumpur (Malaysia):
Seattle (USA, WA state):
Atlanta (USA, Georgia):
London (UK):
Paris (France):
Haifa (Israel):
Zurich (Switzerland):

PLEASE, use FTP as much as possible.

Let's say you are using our Tampa mirror (if you don't replace in all what is below by the mirror you have selected):

   echo "deb lenny main" >>/etc/apt/sources.list

If you are using Squeeze, replace "lenny" by "squeeze":

   echo "deb squeeze main" >>/etc/apt/sources.list

NEW: add our repository key:

   wget -q -O - | apt-key add -

Then OF COURSE, run apt-get update. Alternatively, you can run:

   apt-get install gplhost-archive-keyring

Here is a full /etc/apt/sources.list for lenny (replace CC by your country code):

   # Binary repositories:
   deb lenny main
   deb lenny/updates main
   deb lenny/volatile main
   deb lenny main

   # Source repositories:
   #deb-src lenny main
   #deb-src lenny/updates main
   #deb-src lenny/volatile main
   #deb-src lenny main

Note that you don't really need the source repositories, or contrib and non-free. DTC and it's dependencies are all fully free, included in "main". If you are using Squeeze, you can use the following:

   # Binary repositories:
   deb squeeze main
   deb squeeze/updates main
   # volatile has been discontinued on squeeze
   # see: sites)
   # deb squeeze-updates main
   deb squeeze main

   # Source repositories:
   #deb-src squeeze main
   #deb-src squeeze/updates main
   #deb-src squeeze-updates main
   #deb-src squeeze main

You will notice that DTC pulls really A LOT of dependencies. This is because by default, Lenny install all the packages that are in the Recommends: section of each dependencies. If you want to avoid that, simply put this in your /etc/apt/apt.conf.d/20norecommends:

   APT {
      Install-Recommends "false";

Another way to do it is:

   echo 'APT::Install-Recommends "0";' >> /etc/apt/apt.conf

this 2nd way seems working better on latest Debian.

Doing this will pull 100 less (not really needed) packages at least, and save a lot of disk space by pulling only what is absolutely necessary, which is best in a server environment.

Before the setup

Open ports !!!

DNS - 53, SMTP - 25 (TLS - 465), IMAP - 143 (TLS - 993), POP3 - 110 (TLS - 995), FTP -21

Check that you have a valid hostname entered, or amavisd-new will complain about it and refuse to setup. Try this command, as this is the one that amavis will use:

    hostname --fqdn

it should return the fully qualified domain name of your mx server that should be something like "" (this is best option). Check that

   cat /etc/hostname

returns and that

   cat /etc/hosts

returns something like: mx

The order of the host names after the IP seems to matter. The below reverse order does NOT seem to work on Debian Etch when running "hostname --fqdn":  mx

Also, you can make it so the reverse DNS for also replies as many SMTP servers out there check for it. The reverse for the DNS server is less important, and you can always use mx instead of ns1 (in that case, you will change it later in dtc -> general configuration -> named zone files once DTC is installed).

check your hostname ( /etc/hostname ) hostname -d gives only
hostname -s gives only mx
hostname -f gives the
if not, correct it by editing /etc/hostname then run /etc/init.d/ start

Something like "" in /etc/hostname sounds to be the correct setup (otherwise you need some more customization).

Don't forget that once you've changed /etc/hosts or /etc/hostname you'll have to reboot your server so the changes are effective.

Then check that "uname -a" is returning the correct FQDN.

If you are still running a kernel older than 2.6.24 (for example if you run Etch), the capability module has to be loaded. Another way is to recompile pure-ftpd-mysql with the option not to use this kernel module. You can find how to do this here.

the default debconf is set to high, dtc will miss some questions. Resolve this with:

   dpkg-reconfigure debconf

choose Dialog, the default, and then medium. This way you dont miss questions when configuring your packages at install time.

Remember that you HAVE to use the debian volatile repository to have clamav and spamassassin working. The default one simply does NOT work. So don't forget to add this repository:

   deb lenny/volatile main

For Debian "Squeeze," the volatile repository has been eliminated and has been merged into squeeze-updates, so use this:

   deb squeeze-updates main

Installing dtc-toaster

Then do a apt-get update and apt-get install dtc-toaster. Answer the few questions, and that's it, you are DONE !

If you have the issue that exim4 is on the way, you might need to explicitely install postfix as well, doing like this:

   apt-get install postfix postfix-tls dtc-toaster

Installing dtc-core

If you want a server using a lot less memory, then you can use dtc-core. It has as few dependencies as possible, to allow you to have a minimal install. It even doesn't have a dependency on mysql, so you can use a remote MySQL server. It also allows you to choose what kind of package you want for everything. Here's an example on how to setup:

   apt-get install dtc-core postfix postfix-tls postfix-mysql mysql-server-5.0

Then the rest of is as usual, knowing that you wont have mail content scanning and such. Note that if you are running a not-so-busy server, then 256 MB of RAM is enough with this kind of setup, while dtc-toaster requires quite more RAM.

This is a very common mistake: dtc-xen is NOT to be setup under the same server where dtc is installed. It's to be setup on your dom0, while dtc itself would be typically installed in a domU. If you don't know what dom0 is, read the Xen documentation.

Important answers to debconf

Here is some side notes about what to answer to debconf when doing the setup.
- Create directories for web-based administration ? -> yes.
- Postfix general type of configuration? -> Internet Site. Answer when it asks for the mail name as this is the default in DTC.
- Run pure-ftpd from inetd or as a standalone server? -> standalone. Note you will need the capability kernel module to run pure-ftpd (can be found under the security screen in the make menuconfig).

Later, you will need to activate spamassassin and saslauthd in /etc/default, as Debian leave it not activated at boot time (See Post Install section).

The other options don't matter a lot, select what you feel is good for you.

Note that if you didn't had any question for the MySQL root password, or for pure-ftpd-mysql, that means that your debconf priority was set to high and that you need to reconfigure these package:

  • dpkg-reconfigure pure-ftpd-common
  • dpkg-reconfigure mysql-server-5.0

Its a good idea to run the "dpkg-reconfigure pure-ftpd-common" regarless, as the config has been known to periodically fail.

If you use Roundcube with a MySQL back-end, and it gives a database error at runtime, try installing php-mdb2-driver-mysql, but in the normal case, you'd be using roundcube-sqlite, which doesn't need it.

Post install

Debian has a policy which prevents a required post-install script from running. To complete the setup of DTC, the following script must be run as administrator: /usr/share/dtc/admin/install/install

** Note - You may need to open /etc/courier/authdaemonrc and change a line to read: \\ authmodulelist="authmysql"
to avoid the "pop3 login error" as the configuration generation screen.

When done, you should also initialize the sbox_copy folder in /var/lib/dtc. This is done like this:

   cd /usr/share/dtc/admin

Note that you should run the update_sbox_bootstrap_copy after an upgrade of DTC, since this script might have been updated with new features.

You should also check that you have the aufs module installed. In Squeeze, it's there by default, but in Lenny, you should do:

   apt-get install aufs-modules-2.6-amd64

If you are running DTC in a Xen server, you could do instead:


Now, you may want to learn more about SBOX and how it works! It's very important that you read this document, so that you understand the basic concept of the Apache chroot under DTC:

Special note for Ubuntu users

Someone wrote here:

"I get root@ubuntu:/usr/share/dtc/admin/install# ./install bash: ./install: Permission denied so I chmod 777 install, then it worked but failed at the end with -> Managing ldconfig exec: 17: /sbin/ldconfig.real: not found. In Kubuntu ldconfig is a script that calls ldconfig.real - Rename ldconfig to ldconfig.real in the /usr/share/dtc/admin/install/functions script"

This is because the Ubuntu package was never updated. We DID the necessary modifications in our package, but it didn't reach Ubuntu yet. In that case, make sure to use the package from GPLHost, and not the outdated one from Ubuntu.

You should also check the /etc/default folder so it starts daemons automaticaly. These files must have the excute bit set. If they dont, run these commands:

   chmod +x /etc/default/saslauthd
   chmod +x /etc/default/spamassassin
   chmod +x /etc/default/apache2

In ubuntu Maildrop requires rights to function correctly: Add them to /etc/rc.local so that they run each time on startup chown dtc.dtcgrp /var/run/courier/authdaemon/ chown dtc.dtcgrp /var/run/courier/authdaemon/socket


Log in with:

Username: dtc

Password: What you chose during the package configuration.

If it doesn't work, try using the IP address directly instead of (as your DNS setting might be wrong). Something like:

Now if you want to help gplhost, you can "vote" for us by installing the popcon package (apt-get install popcon) to participate to the Debian packages popularity contest.

Post install Cleanup

These are just optional things you may want to do to clean up your installation:

Add "-4" in /etc/default/bind9 options to look like this OPTIONS="-4 -u bind" . This will prevent you geting your syslog flooded with "named[1608]: error (network unreachable) resolving" error messages.

Add "|| [ $? -eq 1 ]" to the fetchmail command line in /etc/cron.d/dtc. Mine looks like this: */15 * * * * dtc [ -d /usr/share/dtc/admin -a -s /var/lib/dtc/etc/fetchmailrc ] && fetchmail -N -n -f /var/lib/dtc/etc/fetchmailrc || [ $? -eq 1 ] 2>&1 This is because when there is no mail to fetch the fetchmail program exits with code 1 which denotes an error to cron and get reported.

Squirrelmail won't install most of the time from the META package pull. So you may have have to do it manuall with "apt-get install squirrelmail"


Finally, if you want to help us, install the popularity-contest package to report to Debian that you are using our packages. This will help us to get a higher score and help people to see that many are using our packages.

How to get out of the tracks with specific setup

Note that dtc-toaster is a meta package that will install apache 2, mysql 5.0, postfix and courier. If you want to use cyrus, qmail, dovecot, apache 1.3, or any other specific things, you need to install them first with apt-get, then apt-get install dtc-core and it will detect what you have selected. This is also the way to go when you want to use the Cyrus delivery and pop3/imap system.

Here is the link to the howto for Debian Express Setup Old Version. If you want more explanations, you can go on the forums install faq here or on the dtc faq on this wiki (see the left menu...).

Editing this page means accepting its license.

Page last modified on January 29, 2015, at 05:24 PM EST