Sorry in advance for what is probably an easy solution but being the newbie that I am I haven't figured it out yet.  I've downloaded and set up a couple of apps that require a domain name during set up.  I'm running the apps via virtual box and I don't have a registered domain name (nor do I want to use one).  What setting(s) do I need to change to use the apps?  For example in phpbb I can see the front page but I can't do anything past that point because it tries to go to a domain name that doesn't exist.  Any help would be greatly appreciated! 

Jeremy Davis's picture

Welcome to TurnKey! :) No problem at all.

You have a few choices:

1. Possibly the quickest and easiest is to use the server's IP address (instead of the domain). You will need to ensure that your server has a static IP address though.

2. Set up a local DNS server on your network. You can then set up a custom LAN based domain (e.g. home.lan) and give your servers a subdomain of that. This is possibly the "best" and most robust option, but I suggest probably overkill for VirtualBox VMs running on your local PC.

DNS queries for other domains can be forwarded to your DNS provider of choice. Again, you'll need to ensure that the domain maps to IP address. Either give your servers a static IP address, or use a combined DHCP/DNS such as dnsmasq (don't forget to disable other DHCP if you go that route).

3. If you're the only user and/or you're only doing early stage testing (which sounds likely), then adding an entry to your hosts file is pretty easy. Before asking a nameserver for DNS records, your PC will check it's local hosts file. So you can set any domain to point to any IP address within your hosts file. Google something like "edit hosts file MY_OS" (where "MY_OS" is your PC operating system) for instructions on how to do that.

Assuming that you have already set a (non-existent) domain for these appliances, unless you use your local hosts file (see #3 above), you'll want to reset the domain to a new custom one. To do that you'll need to re-run the firstboot scripts. You can always rerun all of them via the turnkey-init command. Alternatively, you can just run the specific appliance firstboot script. You'll almost always find that as /usr/lib/inithooks/bin/ E.g. rerun the phpBB specific firstboot scripts like this:


Thank you very much for the help!  I'll probably use that easy solution (#1) but I appreciate the other suggestions and will look in to them as well!  Also thank you for the info on the firstboot scripts.  I was wondering how to do that since I've re-created the same VM a few times trying to figure it out on my own lol!

Jeremy Davis's picture

Good luck with it all and please feel free to post back with any further questions and/or feedback you have. :)

Add new comment