Are you looking for a way to use Duck DNS for your Minecraft server? Look no further!
In this tutorial, we will guide you through the process of setting up Duck DNS and connecting it to your Minecraft server. By the end of this article, you’ll be able to access your Minecraft server using a custom domain name.
What is Duck DNS?
Duck DNS is a free dynamic DNS service that allows you to assign a domain name to your home network’s public IP address. It provides an easy way to access devices on your network without having to remember the IP address each time.
Step 1: Sign Up for Duck DNS
To get started, visit the Duck DNS website at www.org and sign up for an account. You’ll need to choose a subdomain name that will be used as part of your custom domain. For example, if you choose “myminecraftserver” as your subdomain, your custom domain will be myminecraftserver.org.
Step 2: Install the Duck DNS Updater
Once you have signed up for Duck DNS, you’ll need to install the Duck DNS updater on the machine where your Minecraft server is running. The updater will periodically check for changes in your public IP address and update the DNS records accordingly.
- Open a terminal window.
- Navigate to the location where you want to install the updater. For example,
- Create a new directory with the command:
- Move into the newly created directory:
- Download the updater script using the command:
wget https://www.org/update\?domains=your-subdomain&token=your-token&ip=$(wget -qO- http://ipecho.net/plain).
- Make the updater script executable with the command:
chmod +x duck.sh.
- Edit the updater script using a text editor and replace “your-subdomain” with your actual subdomain and “your-token” with your token obtained from Duck DNS.
- Schedule the script to run every 5 minutes by adding an entry to your crontab file.
Open your crontab file with the command:
crontab -e. Add the following line to the file:
* * * * * /opt/duckdns/duck.sh >/dev/null 2>&1. Save and exit the text editor.
- Download and install Python from the official website (www.org/downloads/) if you haven’t already.
- Create a new directory in a location of your choice, e.g., “C:\duckdns”.
- In that directory, create a new Python script file named “duck.py” using a text editor.
- Add the following code to “duck.py”:
url = 'https://www.org/update?domains=your-subdomain&token=your-token&ip=' + requests.get('http://ipecho.net/plain').text
response = requests.get(url)
- Replace “your-subdomain” with your actual subdomain and “your-token” with your token obtained from Duck DNS.
- Save the file and exit the text editor.
- To run the updater script, open a command prompt, navigate to the directory where you saved “duck.py”, and run the command:
- You can also create a shortcut to the script and place it in your Startup folder to ensure it runs automatically on system startup.
Step 3: Configure Port Forwarding
In order for your Minecraft server to be accessible from outside your home network, you’ll need to configure port forwarding on your router to forward incoming connections on port 25565 (default Minecraft server port) to the internal IP address of your Minecraft server. Consult your router’s documentation or visit www.portforward.com for detailed instructions on how to set up port forwarding for your specific router model.
Step 4: Test Your Setup
To test if Duck DNS is working correctly, simply open a web browser and enter your custom domain name, e., myminecraftserver. If everything is set up correctly, you should see the Duck DNS landing page or be redirected to your Minecraft server.
That’s it! You now know how to use Duck DNS for your Minecraft server.
With a custom domain, accessing your server will be much easier and more convenient. Enjoy playing Minecraft with your friends!
Note: It’s important to keep in mind that Duck DNS relies on your public IP address, which may change periodically depending on your internet service provider. The updater script will automatically update the DNS records whenever your IP address changes.