<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!"/>
{"mainEntityOfPage":{"@type":"WebPage","@id":"/enigma-bbs/servers/contentservers/gopher.html"},"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!","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-08-04T19:48:19+00:00","datePublished":"2022-08-04T19:48:19+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 (gopher://) as well as any other content you wish to serve in your Gopher Hole!</p>
<h2id="configuration">Configuration</h2>
<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 <em>area tags</em> that are publicly exposed via Gopher. See example below.</td>
</tr>
</tbody>
</table>
<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}
.
</code></pre></div></div>
<h3id="example">Example</h3>
<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 fsxNet areas:</p>