This guide installs DomainMOD on a Linux host. DomainMOD is a web-based domain and DNS asset management tool that helps you track domains, SSL certificates, and registrar accounts.
allow_url_fopen enabledThe easiest way to run DomainMOD is using the official Docker image.
# Run DomainMOD with Docker
docker run -d \
-p 8080:80 \
-e DB_HOST=mysql \
-e DB_NAME=domainmod \
-e DB_USER=domainmod \
-e DB_PASS=your_secure_password \
-v domainmod_data:/var/www/domainmod/_files \
domainmod/domainmod:latest
With Docker Compose:
Create docker-compose.yml:
version: '3.8'
services:
domainmod:
image: domainmod/domainmod:latest
ports:
- "8080:80"
environment:
- DB_HOST=mysql
- DB_NAME=domainmod
- DB_USER=domainmod
- DB_PASS=${DOMAINMOD_DB_PASSWORD}
volumes:
- domainmod_data:/var/www/domainmod/_files
depends_on:
- mysql
mysql:
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=domainmod
- MYSQL_USER=domainmod
- MYSQL_PASSWORD=${DOMAINMOD_DB_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
volumes:
domainmod_data:
mysql_data:
# Start the stack
docker compose up -d
Step 1: Download DomainMOD
# Download latest release (v4.23.0)
cd /tmp
curl -LO https://github.com/domainmod/domainmod/archive/refs/tags/v4.23.0.tar.gz
tar -xzf v4.23.0.tar.gz
# Move to web directory
sudo mv domainmod-4.23.0 /var/www/domainmod
Step 2: Set Permissions
# Set ownership
sudo chown -R www-data:www-data /var/www/domainmod
# Set permissions
sudo chmod -R 755 /var/www/domainmod
sudo chmod -R 775 /var/www/domainmod/_files
Step 3: Create Database
# Create MySQL database
sudo mysql -u root -p << EOF
CREATE DATABASE domainmod CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'domainmod'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON domainmod.* TO 'domainmod'@'localhost';
FLUSH PRIVILEGES;
EOF
Step 4: Configure DomainMOD
# Copy sample configuration
cd /var/www/domainmod
cp _includes/config.SAMPLE.inc.php _includes/config.inc.php
# Edit configuration
sudo nano _includes/config.inc.php
Update the configuration file:
<?php
$system_dbhost = 'localhost';
$system_dbport = '3306';
$system_database = 'domainmod';
$system_dbuser = 'domainmod';
$system_dbpass = 'your_secure_password';
$system_encrypt = 'your_encryption_key';
?>
Step 5: Configure Web Server
Apache:
sudo nano /etc/apache2/sites-available/domainmod.conf
<VirtualHost *:80>
ServerName domains.example.com
DocumentRoot /var/www/domainmod
<Directory /var/www/domainmod>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/domainmod_error.log
CustomLog ${APACHE_LOG_DIR}/domainmod_access.log combined
</VirtualHost>
sudo a2ensite domainmod.conf
sudo systemctl reload apache2
Nginx:
sudo nano /etc/nginx/sites-available/domainmod
server {
listen 80;
server_name domains.example.com;
root /var/www/domainmod;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
sudo ln -s /etc/nginx/sites-available/domainmod /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Step 6: Run Installation Wizard
http://domains.example.com in your browserStep 7: Setup Cron Job
DomainMOD requires a cron job to run every 10 minutes:
sudo crontab -e
Add this line:
*/10 * * * * php /var/www/domainmod/cron.php
Note: Docker deployments handle cron automatically.
Verify DomainMOD installation:
# Check web server access
curl -I http://localhost
# Check cron job (manual run)
php /var/www/domainmod/cron.php
# Check database connection
mysql -u domainmod -p -e "SHOW DATABASES;" domainmod
See DomainMOD Configuration for detailed configuration guidance.
Managing domains across multiple registrars? We offer consulting services for DomainMOD deployments, including API integrations, SSL certificate automation, and custom reporting. Get in touch at office@linux-server-admin.com or through our contact page.