<title>Gopher Server | ENiGMA½ BBS Software</title>
<metaname="generator"content="Jekyll v4.2.1"/>
<metaproperty="og:title"content="Gopher Server"/>
<metaproperty="og:locale"content="en_US"/>
<metaname="description"content="The Gopher Content Server The Gopher content server provides access to publicly exposed message conferences and areas over Gopher (gopher://) as well as any other content you wish to serve in your Gopher Hole!"/>
<metaproperty="og:description"content="The Gopher Content Server The Gopher content server provides access to publicly exposed message conferences and areas over Gopher (gopher://) as well as any other content you wish to serve in your Gopher Hole!"/>
{"datePublished":"2022-09-09T03:31:32+00:00","description":"The Gopher Content Server The Gopher content server provides access to publicly exposed message conferences and areas over Gopher (gopher://) as well as any other content you wish to serve in your Gopher Hole!","mainEntityOfPage":{"@type":"WebPage","@id":"/enigma-bbs/servers/contentservers/gopher.html"},"url":"/enigma-bbs/servers/contentservers/gopher.html","@type":"BlogPosting","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"/enigma-bbs/assets/images/enigma-logo.png"}},"headline":"Gopher Server","dateModified":"2022-09-09T03:31:32+00:00","@context":"https://schema.org"}</script>
<p>The Gopher <em>content server</em> provides access to publicly exposed message conferences and areas over Gopher (<codeclass="language-plaintext highlighter-rouge">gopher://</code>) as well as any other content you wish to serve in your Gopher Hole!</p>
<p>Gopher configuration is found in <codeclass="language-plaintext highlighter-rouge">contentServers.gopher</code> in <codeclass="language-plaintext highlighter-rouge">config.hjson</code>.</p>
<td>Sets the path serving as the static root path for all Gopher content. Defaults to <codeclass="language-plaintext highlighter-rouge">enigma-bbs/gopher</code>.<br>See also <strong>Gophermap’s</strong> below</td>
<td>Set the <strong>public</strong> hostname/domain that Gopher will serve to the outside world. Example: <codeclass="language-plaintext highlighter-rouge">myfancybbs.com</code>
<td>An map of <em>conference tags</em> to an object containing <codeclass="language-plaintext highlighter-rouge">include</code>‘d <em>area tags</em>, and exceptions via <codeclass="language-plaintext highlighter-rouge">exclude</code>‘d <em>area tags</em>. Area tags may contain wildcards of ‘*’ and ‘?’. Any area tags that match will be exposed to Gopher. See <strong>Example Configuration</strong> below.</td>
<p>Notes on <codeclass="language-plaintext highlighter-rouge">publicHostname</code> and <codeclass="language-plaintext highlighter-rouge">publicPort</code>:
The Gopher protocol serves content that contains host/domain and port even when referencing it’s own documents. Due to this, these members must be set to your publicly addressable Gopher server!</p>
<h2id="gophermaps">Gophermap’s</h2>
<p><ahref="https://en.wikipedia.org/wiki/Gopher_(protocol)#Source_code_of_a_menu">Gophermap’s</a> are how to build menus for your Gopher Hole. Each map is a simple text file named <codeclass="language-plaintext highlighter-rouge">gophermap</code> (all lowercase, no extension) with DOS style CRLF endings.</p>
<p>Within any directory nested within your <codeclass="language-plaintext highlighter-rouge">staticRoot</code> may live a <codeclass="language-plaintext highlighter-rouge">gophermap</code>. A template may be found in the <codeclass="language-plaintext highlighter-rouge">enigma-bbsmisc</code> directory.</p>
<p>ENiGMA will pre-process <codeclass="language-plaintext highlighter-rouge">gophermap</code> files replacing in following variables:</p>
<ul>
<li>
<codeclass="language-plaintext highlighter-rouge">{publicHostname}</code>: The public hostname from your config.</li>
<li>
<codeclass="language-plaintext highlighter-rouge">{publicPort}</code>: The public port from your config.</li>
<p><imgclass="emoji"title=":information_source:"alt=":information_source:"src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png"height="20"width="20"> See <ahref="https://en.wikipedia.org/wiki/Gopher_(protocol)#Source_code_of_a_menu">Wikipedia</a> for more information on the <codeclass="language-plaintext highlighter-rouge">gophermap</code> format.</p>
<p><imgclass="emoji"title=":information_source:"alt=":information_source:"src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png"height="20"width="20"> See <ahref="https://tools.ietf.org/html/rfc1436">RFC 1436</a> for the original Gopher spec.</p>
<p><imgclass="emoji"title=":bulb:"alt=":bulb:"src="https://github.githubassets.com/images/icons/emoji/unicode/1f4a1.png"height="20"width="20"> Tools such as <ahref="https://rawtext.club/~sloum/gfu.html">gfu</a> may help you with <codeclass="language-plaintext highlighter-rouge">gophermap</code>’s</p>
<p>An example <codeclass="language-plaintext highlighter-rouge">gophermap</code> living in <codeclass="language-plaintext highlighter-rouge">enigma-bbs/gopher</code>:</p>
<divclass="language-plaintext highlighter-rouge"><divclass="highlight"><preclass="highlight"><code>iWelcome to a Gopher server! {publicHostname} {publicPort}
1Public Message Area /msgarea {publicHostname} {publicPort}
<p>Let’s suppose you are serving Gopher for your BBS at <codeclass="language-plaintext highlighter-rouge">myfancybbs.com</code>. Your ENiGMA½ system is listening on the default Gopher <codeclass="language-plaintext highlighter-rouge">port</code> of 8070 but you’re behind a firewall and want port 70 exposed to the public. Lastly, you want to expose some ArakNet areas:</p>