evennia/docs/2.x/Setup/Installation.html
Evennia docbuilder action e535f5782a Updated HTML docs.
2023-10-19 20:22:27 +00:00

288 lines
No EOL
18 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Installation &#8212; Evennia 2.x documentation</title>
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Installing with GIT" href="Installation-Git.html" />
<link rel="prev" title="Server Setup and Life" href="Setup-Overview.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Installation-Git.html" title="Installing with GIT"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Setup-Overview.html" title="Server Setup and Life"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 2.x</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="Setup-Overview.html" accesskey="U">Server Setup and Life</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Installation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/evennia_logo.png" alt="Logo"/>
</a></p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Installation</a><ul>
<li><a class="reference internal" href="#requirements">Requirements</a></li>
<li><a class="reference internal" href="#install-with-pip">Install with <code class="docutils literal notranslate"><span class="pre">pip</span></code></a></li>
<li><a class="reference internal" href="#initialize-a-new-game">Initialize a New Game</a></li>
<li><a class="reference internal" href="#start-the-new-game">Start the New Game</a></li>
<li><a class="reference internal" href="#restarting-and-stopping">Restarting and Stopping</a></li>
<li><a class="reference internal" href="#view-server-logs">View Server Logs</a></li>
<li><a class="reference internal" href="#server-configuration">Server Configuration</a></li>
<li><a class="reference internal" href="#register-with-the-evennia-game-index-optional">Register with the Evennia Game Index (optional)</a></li>
<li><a class="reference internal" href="#next-steps">Next Steps</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Setup-Overview.html"
title="previous chapter">Server Setup and Life</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Installation-Git.html"
title="next chapter">Installing with GIT</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Setup/Installation.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
<ul>
<li><a href="https://www.evennia.com/docs/latest/index.html">Documentation Top</a> </li>
<li><a href="https://www.evennia.com">Evennia Home</a> </li>
<li><a href="https://github.com/evennia/evennia">Github</a> </li>
<li><a href="http://games.evennia.com">Game Index</a> </li>
<li>
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
<a href="https://evennia.blogspot.com/">Blog</a>
</li>
</ul>
<h3>Doc Versions</h3>
<ul>
<li><a href="Installation.html">2.x (main branch)</a></li>
<ul>
<li><a href="../1.3.0/index.html">1.3.0 (v1.3.0 branch)</a></li>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
</ul>
</div>
</div>
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>If you are converting an existing game from a previous Evennia version, <a class="reference internal" href="Installation-Upgrade.html"><span class="doc std std-doc">see here</span></a>.</p>
</div>
<p>The fastest way to install Evennia is to use the <code class="docutils literal notranslate"><span class="pre">pip</span></code> installer that comes with Python (read on).
You can also <a class="reference internal" href="Installation-Git.html"><span class="doc std std-doc">clone Evennia from github</span></a> or use <a class="reference internal" href="Installation-Docker.html"><span class="doc std std-doc">docker</span></a>. Some users have also experimented with <a class="reference internal" href="Installation-Android.html"><span class="doc std std-doc">installing Evennia on Android</span></a>.</p>
<section id="requirements">
<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">Develop in isolation</p>
<p>Installing Evennia doesnt make anything visible online. Apart from installation and updating, you can develop your game without any internet connection if you want to.</p>
</aside>
<ul class="simple">
<li><p>Evennia requires <a class="reference external" href="https://www.python.org/downloads/">Python</a> 3.10 or 3.11 (recommended). Any OS that supports Python should work.</p>
<ul>
<li><p><em>Windows</em>: In the installer, make sure to select <code class="docutils literal notranslate"><span class="pre">add</span> <span class="pre">python</span> <span class="pre">to</span> <span class="pre">path</span></code>. If you have multiple versions of Python installed, use <code class="docutils literal notranslate"><span class="pre">py</span></code> command instead of <code class="docutils literal notranslate"><span class="pre">python</span></code> to have Windows automatically use the latest.</p></li>
</ul>
</li>
<li><p>Dont install Evennia as administrator or superuser.</p></li>
<li><p>If you run into trouble, see <a class="reference internal" href="Installation-Troubleshooting.html"><span class="doc std std-doc">installation troubleshooting</span></a>.</p></li>
</ul>
</section>
<section id="install-with-pip">
<h2>Install with <code class="docutils literal notranslate"><span class="pre">pip</span></code><a class="headerlink" href="#install-with-pip" title="Permalink to this headline"></a></h2>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>You are recommended to <a class="reference internal" href="Installation-Git.html#virtualenv"><span class="std std-doc">setup a light-weight Python virtualenv</span></a> to install Evennia in. Using a virtualenv is standard practice in Python and allows you to install what you want in isolation from other programs. The virtualenv system is a part of Python and will make your life easier!</p>
</div>
<p>Evennia is managed from the terminal (console/Command Prompt on Windows). Once you have Python installed—and after activating your virtualenv if you are using one—install Evennia with:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pip install evennia
</pre></div>
</div>
<p>Optional: If you use a <a class="reference internal" href="../Contribs/Contribs-Overview.html"><span class="doc std std-doc">contrib</span></a> that warns you that it needs additional packages, you can install all extra dependencies with:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pip install evennia[extra]
</pre></div>
</div>
<p>To update Evennia later, do the following:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pip install --upgrade evennia
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p><strong>Windows users only -</strong>
You now must run <code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">evennia</span></code> once. This should permanently make the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command available in your environment.</p>
</div>
<p>Once installed, make sure the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command works. Use <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">-h</span></code> for usage help. If you are using a virtualenv, make sure it is active whenever you need to use the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command later.</p>
</section>
<section id="initialize-a-new-game">
<h2>Initialize a New Game<a class="headerlink" href="#initialize-a-new-game" title="Permalink to this headline"></a></h2>
<p>We will create a new “game dir” in which to create your game. Here, and in the rest of the Evennia documentation, we refer to this game dir as <code class="docutils literal notranslate"><span class="pre">mygame</span></code>, but you should, of course, name your game whatever you like. To create the new <code class="docutils literal notranslate"><span class="pre">mygame</span></code> folder—or whatever you choose—in your current location:</p>
<aside class="sidebar">
<p class="sidebar-title">Game Dir vs Game Name</p>
<p>The game dir you create doesnt have to match the name of your game. You can change the name of your game later by editing <code class="docutils literal notranslate"><span class="pre">mygame/server/conf/settings.py</span></code>.</p>
</aside>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evennia --init mygame
</pre></div>
</div>
<p>The resultant folder contains all the empty templates and default settings needed to start the Evennia server.</p>
</section>
<section id="start-the-new-game">
<h2>Start the New Game<a class="headerlink" href="#start-the-new-game" title="Permalink to this headline"></a></h2>
<p>First, create the default database (Sqlite3):</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>cd mygame
evennia migrate
</pre></div>
</div>
<p>The resulting database file is created in <code class="docutils literal notranslate"><span class="pre">mygame/server/evennia.db3</span></code>. If you ever want to start from a fresh database, just delete this file and re-run the <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">migrate</span></code> command.</p>
<p>Next, start the Evennia server with:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evennia start
</pre></div>
</div>
<p>When prompted, enter a username and password for the in-game “god” or “superuser.” Providing an email address is optional.</p>
<blockquote>
<div><p>You can also <a class="reference internal" href="Installation-Non-Interactive.html"><span class="doc std std-doc">automate</span></a> creation of the superuser.</p>
</div></blockquote>
<p>If all went well, your new Evennia server is now up and running! To play your new—albeit empty—game, point a legacy MUD/telnet client to <code class="docutils literal notranslate"><span class="pre">localhost:4000</span></code> or a web browser to <a class="reference external" href="http://localhost:4001">http://localhost:4001</a>. You may log in as a new account or use the superuser account you created above.</p>
</section>
<section id="restarting-and-stopping">
<h2>Restarting and Stopping<a class="headerlink" href="#restarting-and-stopping" title="Permalink to this headline"></a></h2>
<p>You can restart the server (without disconnecting players) by issuing:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evennia restart
</pre></div>
</div>
<p>And, to do a full stop and restart (with disconnecting players) use:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evennia reboot
</pre></div>
</div>
<p>A full stop of the server (use <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">start</span></code> to restart) is achieved with:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evennia stop
</pre></div>
</div>
<p>See the <a class="reference internal" href="Running-Evennia.html"><span class="doc std std-doc">Server start-stop-reload</span></a> documentation page for details.</p>
</section>
<section id="view-server-logs">
<h2>View Server Logs<a class="headerlink" href="#view-server-logs" title="Permalink to this headline"></a></h2>
<p>Log files are located in <code class="docutils literal notranslate"><span class="pre">mygame/server/logs</span></code>. You can tail the logging in real-time with:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evennia --log
</pre></div>
</div>
<p>or just:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evennia -l
</pre></div>
</div>
<p>Press <code class="docutils literal notranslate"><span class="pre">Ctrl-C</span></code> (<code class="docutils literal notranslate"><span class="pre">Cmd-C</span></code> for Mac) to stop viewing the live log.</p>
<p>You may also begin viewing the real-time log immediately by adding <code class="docutils literal notranslate"><span class="pre">-l/--log</span></code> to <code class="docutils literal notranslate"><span class="pre">evennia</span></code> commands, such as when starting the server:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evennia start -l
</pre></div>
</div>
</section>
<section id="server-configuration">
<h2>Server Configuration<a class="headerlink" href="#server-configuration" title="Permalink to this headline"></a></h2>
<p>Your servers configuration file is <code class="docutils literal notranslate"><span class="pre">mygame/server/settings.py</span></code>. Its empty by default. Copy and paste <strong>only</strong> the settings you want/need from the <a class="reference internal" href="Settings-Default.html"><span class="doc std std-doc">default settings file</span></a> to your servers <code class="docutils literal notranslate"><span class="pre">settings.py</span></code>. See the <a class="reference internal" href="Settings.html"><span class="doc std std-doc">Settings</span></a> documentation for more information before configuring your server at this time.</p>
</section>
<section id="register-with-the-evennia-game-index-optional">
<h2>Register with the Evennia Game Index (optional)<a class="headerlink" href="#register-with-the-evennia-game-index-optional" title="Permalink to this headline"></a></h2>
<p>To let the world know that you are working on a new Evennia-based game, you may register your server with the <em>Evennia game index</em> by issuing:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evennia connections
</pre></div>
</div>
<p>Then, just follow the prompts. You dont have to be open for players to do this — simply mark your game as closed and “pre-alpha.”</p>
<p>See <a class="reference internal" href="Evennia-Game-Index.html"><span class="doc std std-doc">here</span></a> for more instructions and please <a class="reference external" href="http:///games.evennia.com">check out the index</a> beforehand to make sure you dont pick a game name that is already taken — be nice!</p>
</section>
<section id="next-steps">
<h2>Next Steps<a class="headerlink" href="#next-steps" title="Permalink to this headline"></a></h2>
<p>You are good to go!</p>
<p>Next, why not head over to the <a class="reference internal" href="../Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.html"><span class="doc std std-doc">Starting Tutorial</span></a> to learn how to begin making your new game!</p>
</section>
</section>
</div>
</div>
</div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Installation-Git.html" title="Installing with GIT"
>next</a> |</li>
<li class="right" >
<a href="Setup-Overview.html" title="Server Setup and Life"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 2.x</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="Setup-Overview.html" >Server Setup and Life</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Installation</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2023, The Evennia developer community.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>