When your game is first set up, you choose a domain name, like yourgame.aresmush.com. It’s kind of a pain to change this after the game is installed, but it can be done.
These instructions assume some technical know-how to edit files on the server shell. Don’t hesitate to ask for help if you run into trouble.
Note
Even if you try to keep the old domain name, it will only work on the web side. The game side (with a MU client) cannot listen on multiple domain names at once.
- Update your NEW domain host to point the new domain name to the game server.
- Ensure that the new domain is visible to the server. From the server shell, type
nslookup yourgame.somewhere.com.
- If the domain is visible, it will show a “non-authoritative answer” with your IP address.
- It may take up to 24 hours after changing domain information before the server can see the new domain.
- DO NOT PROCEED until the new domain is visible to the server.
- In the web portal, go to Admin->Setup and edit server.yml. Set
hostname to the new domain.
- Shut down the game engine.
- Edit the nginx configuration file and replace all instances of your old host with the new host name.
- You can edit this using
sudo nano /etc/nginx/sites-enabled/default.
- If you want to KEEP the old domain too, your
server_name will EITHER need to use the catchall (_) OR a list of domains: server_name YOUR_OLD_DOMAIN YOUR_NEW_DOMAIN;
- Restart the nginx web server using
sudo service nginx restart.
- If you had a security certificate installed, you will need to update certbot.
- To DELETE the old domain and just start from scratch with the new one:
- Remove the “managed by cerbot” lines from the nginx config.
- Restart the nginx web server using
sudo service nginx restart.
- Run
sudo certbot delete.
- Redo the HTTPS security certificate installation.
- To KEEP the old one and ADD the new one too:
- Run
sudo certbot --expand --nginx -d YOUR_OLD_DOMAIN -d YOUR_NEW_DOMAIN
- Reboot the server. When it comes back up, you should be good to go with your new host name.