Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wan't to publish my hostname so that I can access the server from anywhere I want. How can I possibly implement this in golang?

This can be related to defining java.rmi.sever.hostname to my IP address, does golang support this kind of binding?

share|improve this question

migrated from Jun 14 '13 at 13:07

This question came from our site for professional and enthusiast programmers.

How do you expect two different programs running on the same host to resolve the situation when each of them wants to set a different hostname? – jnml Apr 28 '13 at 16:49
I don't have such kind of scenario. I just have a single server which will accept connections and server requests. If the server is running on, say, my PC at home then I want to access the server from, say, my work place. I can only access it when I'm on the same network that the server is, apparently. But I'm looking for ways in which it can be accessed across the network, if there is one. – Karan Gurnani Apr 28 '13 at 17:33
Weird that your question got moved from stackoverflow to superuser. That doesn't make any sense. What is this? Wikipedia? – Ask Bjørn Hansen Jan 15 '14 at 10:01
up vote 2 down vote accepted

If you want to publish your hostname to DNS you can use a dynamic DNS update to an appropriately configured server with miekg's dns package. If you use dyndns then there's a dyndns go client, too, that you probably can adapt to be part of your program.

If you just want to publicize your service on the local network, then at least for Linux and OS X (including iOS) clients you can do it with multicast dns.

share|improve this answer
That helped, thanks! – Karan Gurnani Apr 29 '13 at 18:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.