This guide installs nsupdate.info on a Linux host. nsupdate.info is a free Dynamic DNS (DDNS) service and software that allows you to host your own dynamic DNS service using Python/Django.
The easiest way to run nsupdate.info is using a Docker image.
# Run nsupdate.info with Docker
docker run -d \
-p 8080:80 \
-e SECRET_KEY=your_secret_key \
-e DATABASE_URL=postgresql://user:pass@postgres:5432/nsupdate \
jschwaeger/nsupdate.info:latest
With Docker Compose:
Create docker-compose.yml:
version: '3.8'
services:
nsupdate-info:
image: jschwaeger/nsupdate.info:latest
ports:
- "8080:80"
environment:
- SECRET_KEY=${NSUI_SECRET_KEY}
- DATABASE_URL=postgresql://nsupdate:${NSUI_DB_PASSWORD}@postgres:5432/nsupdate
depends_on:
- postgres
postgres:
image: postgres:15
environment:
- POSTGRES_DB=nsupdate
- POSTGRES_USER=nsupdate
- POSTGRES_PASSWORD=${NSUI_DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
# Start the stack
docker compose up -d
Step 1: Clone Repository
# Clone nsupdate.info repository
git clone https://github.com/nsupdate-info/nsupdate.info.git
cd nsupdate.info
Step 2: Create Virtual Environment
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip
Step 3: Install Dependencies
# Install Python dependencies
pip install -r requirements.txt
Step 4: Configure Database
# Install PostgreSQL (if not installed)
sudo apt install -y postgresql postgresql-contrib python3-psycopg2
# Create database
sudo -u postgres psql << EOF
CREATE DATABASE nsupdate;
CREATE USER nsupdate WITH PASSWORD 'your_secure_password';
GRANT ALL PRIVILEGES ON DATABASE nsupdate TO nsupdate;
EOF
Step 5: Configure Application
# Copy local settings template
cp src/nsupdate/local_settings.py.example src/nsupdate/local_settings.py
# Edit settings
nano src/nsupdate/local_settings.py
Update local_settings.py:
# Database configuration
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'nsupdate',
'USER': 'nsupdate',
'PASSWORD': 'your_secure_password',
'HOST': 'localhost',
'PORT': '5432',
}
}
# Secret key (generate a unique one)
SECRET_KEY = 'your-generated-secret-key-here'
# Allowed hosts
ALLOWED_HOSTS = ['ddns.example.com', 'localhost']
Step 6: Run Migrations
# Run database migrations
python manage.py migrate
# Create superuser
python manage.py createsuperuser
Step 7: Configure Web Server
Gunicorn + Nginx:
# Install Gunicorn
pip install gunicorn
# Create systemd service
sudo nano /etc/systemd/system/nsupdate-info.service
[Unit]
Description=nsupdate.info
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/path/to/nsupdate.info/src
ExecStart=/path/to/venv/bin/gunicorn --bind 127.0.0.1:8000 nsupdate.wsgi
[Install]
WantedBy=multi-user.target
# Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable nsupdate-info
sudo systemctl start nsupdate-info
# Configure Nginx
sudo nano /etc/nginx/sites-available/nsupdate-info
server {
listen 80;
server_name ddns.example.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
sudo ln -s /etc/nginx/sites-available/nsupdate-info /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Step 8: Configure DNS Backend (BIND9)
For RFC 2136 dynamic DNS updates:
# Install BIND9
sudo apt install -y bind9 bind9utils
# Configure BIND9 for dynamic updates
sudo nano /etc/bind/named.conf.local
zone "example.com" {
type master;
file "/var/lib/bind/example.com.zone";
allow-update { key "ddns-key"; };
};
Verify nsupdate.info installation:
# Check web server access
curl -I http://localhost:8000
# Test Django application
python manage.py check
# Test database connection
python manage.py dbshell
See nsupdate.info Configuration for detailed configuration guidance.
Setting up dynamic DNS updates requires careful configuration. We offer support for nsupdate.info deployments, including DNS provider integrations, API setups, and security hardening. Contact us at office@linux-server-admin.com or through our contact page.