User Guide · for DomainMOD 4.27.0
Getting Started
On This Page
Project Home: https://domainmod.org
Project Demo: https://demo.domainmod.org
Documentation: https://domainmod.org/docs/
Support: https://domainmod.org/support/
Source Code: https://domainmod.org/source/
About
DomainMOD is a free, open source, self-hosted application for managing your domains, hosting services, SSL certificates, and other internet assets in one place. DomainMOD also includes a Data Warehouse framework that allows you to import your web server data so that you can view, export, and report on your live data. Currently the Data Warehouse only supports web servers running WHM/cPanel.
Live Demo
Not sure if DomainMOD is what you're looking for? Don't want to take the time to install it only to find out that it's not? We hate when that happens ourselves, which is why we've set up a live demo so you don't waste your time.
So go ahead, take the live demo for a test drive before you install: https://demo.domainmod.org
Requirements
Software: PHP 8.2-8.5, MariaDB 10.4-12.3 or MySQL 5.7-9.7
PHP Extensions: PDO (MariaDB/MySQL), cURL, OpenSSL, gettext, MySQLi
PHP Settings: allow_url_fopen
Folders: the web server can write to the 'temp' folder
Downloading
There are currently four options for downloading DomainMOD.
Option #1 -- Using Docker
Please see our official DomainMOD container on Docker Hub for more information: https://hub.docker.com/r/domainmod/domainmod
Option #2 -- Downloading a .zip file
Visit the following URL to download DomainMOD in a .zip file: https://domainmod.org/download/
Option #3 -- Using Git
To download using Git, change to the directory that will hold DomainMOD and run the following command, which puts it in a new domainmod folder there (this download option requires that you have Git installed on your server):
git clone https://github.com/domainmod/domainmod.git
Option #4 -- Installing via Softaculous
Softaculous is the web hosting industry's leading software auto-installer, and it has helped millions of users install applications with a few clicks of a mouse. Softaculous easily integrates into the leading control panels like cPanel, Plesk, DirectAdmin, InterWorx, H-Sphere, and more. Check your hosting control panel or contact your web host if you're not sure if they offer Softaculous.
To install DomainMOD simply open Softaculous, use the search feature to find DomainMOD, and then click the "Install Now" button. After you answer a few questions about your installation Softaculous will do the rest.
More Information: http://www.softaculous.com/softaculous/apps/others/DomainMOD/
Installing
If you installed DomainMOD using Docker or Softaculous in the previous step you can ignore the rest of this Installing section, as you should already have DomainMOD up-and-running.
If you downloaded the .zip file in the previous step, you will now need to upload the archive to your web server and then unpack it into the folder where you wish to install (or unpack it and then upload it, whichever you prefer).
If you used Git to retrieve the source code in the previous step, just change to the directory where you ran the git command and your files are already waiting for you in a folder called /domainmod/. Feel free to rename this folder to whatever you want.
Installation Steps
-
Create a MySQL database that will be used to store DomainMOD's data.
-
In the '_includes' folder, copy config.SAMPLE.inc.php to config.inc.php and then update config.inc.php to reflect your web server's settings (including the recommended
$secret_keyfor MFA). -
Make sure the web server can write to the 'temp' folder and the files in it, or restores are turned off. If your cron job runs as a different user, give both users write access to the folder.
-
In a web browser, visit the URL where you installed DomainMOD (for example, example.com/domainmod/) and work through the installer. When it's done, you'll be taken to the sign-in page.
-
Set up the cron job below on your web server.
The Secret Key
$secret_key is a long random value that DomainMOD uses to encrypt each user's MFA secret. It's best to set it when you install, before anyone turns on MFA. See Security and MFA for details.
The 'temp' Folder
DomainMOD keeps its restore lock and its lookup caches in the 'temp' folder, and restores are turned off until the web server can write to the folder and its restore.lock file. For example, if your web server runs PHP as www-data, run sudo chown -R www-data temp from the folder you installed DomainMOD in, and set up the cron job to run as www-data too.
The Installer
On Administrator Account, choose the username and password you'll sign in with. The password needs at least 8 characters and no more than 72 bytes: letters, numbers, and symbols on a standard English keyboard take one byte each, and characters such as é take more. On Ready to Install, check your choices and click Install DomainMOD.
Cron Job
DomainMOD includes a Task Scheduler that allows you to run various system jobs at specified times, which helps keep your DomainMOD installation up-to-date and running smoothly, as well as notifies you of important information, such as emailing you to let you know about upcoming domain, hosting service, and SSL certificate renewals.
The Task Scheduler is very powerful, and it enables features that you otherwise wouldn't be able to use, but in order for it to function you need to schedule the below cron job to run on your web server. Once the cron job is set up to run, the Task Scheduler will be live.
If you installed DomainMOD using Docker, the cron job will be set up and running automatically within the container, so there's nothing you need to set up manually.
Filename: /cron.php
Note
This file should be executed every 10 minutes.
If your cron job runs cron.php from the command line, the simplest setup is to run it as the same user PHP runs as for your web server, so both can write to DomainMOD's 'temp' folder.
By default, cron.php runs whenever its URL is opened, which is how many installations schedule it. As of v4.25.0, you can stop anyone else from running it by giving it a key. Add the following line to your config.inc.php file, replacing YourKeyHere with a long, random value:
$cron_key = 'YourKeyHere';
Once a key is set, cron.php only runs from the command line (php cron.php) or from a URL that includes the key, such as https://example.com/cron.php?key=YourKeyHere, so update your cron job to match. If cron.php is opened without the right key, it displays "This script needs its key" and doesn't run any tasks.
Security
Although we've done our best to secure DomainMOD, unfortunately there are many factors that could cause security holes, such as the software being run on insecure hardware, software like PHP and MySQL having out-of-date versions with known vulnerabilities, easy-to-guess passwords being used, and so on. Due to these factors we recommend the following steps to help secure your DomainMOD installation.
-
Secure your installation with an SSL Certificate.
-
If your database is on a different server than DomainMOD, encrypt the connection and check the server's certificate by adding
$dbsslmode = 'verify';to config.inc.php. See Encrypted Database Connections for details. -
Do not use easy-to-guess passwords. Ever.
-
Although DomainMOD has its own authentication system, we recommend that you also use HTTP authentication on your installation directory to add an extra layer of security.
-
Do not store your account passwords or API keys in DomainMOD. Although the ability to save this information exists, use it at your own risk. This information is fairly secure if you run DomainMOD on your local computer, but there's a much higher risk of someone gaining access to it if you host the site on a server that is accessible to the outside world.
Warning
Saving your API keys (and other relevant API connection information) in DomainMOD is necessary if you want to use your registrar's API to import domains through the Domain Queue or to refresh them (the Refresh button and the Refresh Domains task). Imports and refreshes using RDAP and WHOIS don't need them, but they can't read WHOIS privacy or auto renewal. If you don't need those, we recommend that you only save this information while you're using the Domain Queue, and that you remove it as soon as you're done.
-
Do not host DomainMOD on a public website or on an easy-to-guess URL.
If you do end up hosting DomainMOD on a public website, DomainMOD asks search engines not to index its pages. Don't block its URL in your website's robots.txt file, since search engines then can't see that request, and your DomainMOD URL may still end up in public search results.
-
Do not give the URL to anyone who does not need to access DomainMOD. You should treat the URL like a password.
-
Always use the most up-to-date version of DomainMOD. This will help protect you from any security vulnerabilities that are found and fixed.
-
Turn on multi-factor authentication (MFA) for your account, and consider requiring it for every user. See Security and MFA for details.
First Run
After you've installed DomainMOD you should go through the First Run section to finish getting the software ready to use.