<h1>Installation<aclass="headerlink"href="#installation"title="Permalink to this headline">¶</a></h1>
<divclass="admonition important">
<pclass="admonition-title">Important</p>
<p>If you are converting an existing game from a previous Evennia version, <aclass="reference internal"href="Installation-Upgrade.html"><spanclass="doc std std-doc">see here</span></a>.</p>
</div>
<p>The fastest way to install Evennia is to use the <codeclass="docutils literal notranslate"><spanclass="pre">pip</span></code> installer that comes with Python (read on).
You can also <aclass="reference internal"href="Installation-Git.html"><spanclass="doc std std-doc">clone Evennia from github</span></a> or use <aclass="reference internal"href="Installation-Docker.html"><spanclass="doc std std-doc">docker</span></a>. Some users have also experimented with <aclass="reference internal"href="Installation-Android.html"><spanclass="doc std std-doc">installing Evennia on Android</span></a>.</p>
<sectionid="requirements">
<h2>Requirements<aclass="headerlink"href="#requirements"title="Permalink to this headline">¶</a></h2>
<asideclass="sidebar">
<pclass="sidebar-title">Develop in isolation</p>
<p>Installing Evennia doesn’t make anything visible online. Apart from installation and updating, you can develop your game without any internet connection if you want to.</p>
</aside>
<ulclass="simple">
<li><p>Evennia requires <aclass="reference external"href="https://www.python.org/downloads/">Python</a> 3.10 or 3.11 (recommended). Any OS that supports Python should work.</p>
<li><p><em>Windows</em>: In the installer, make sure to select <codeclass="docutils literal notranslate"><spanclass="pre">add</span><spanclass="pre">python</span><spanclass="pre">to</span><spanclass="pre">path</span></code>. If you have multiple versions of Python installed, use <codeclass="docutils literal notranslate"><spanclass="pre">py</span></code> command instead of <codeclass="docutils literal notranslate"><spanclass="pre">python</span></code> to have Windows automatically use the latest.</p></li>
<li><p>Don’t install Evennia as administrator or superuser.</p></li>
<li><p>If you run into trouble, see <aclass="reference internal"href="Installation-Troubleshooting.html"><spanclass="doc std std-doc">installation troubleshooting</span></a>.</p></li>
</ul>
</section>
<sectionid="install-with-pip">
<h2>Install with <codeclass="docutils literal notranslate"><spanclass="pre">pip</span></code><aclass="headerlink"href="#install-with-pip"title="Permalink to this headline">¶</a></h2>
<p>You are recommended to <aclass="reference internal"href="Installation-Git.html#virtualenv"><spanclass="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>
<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>
<p>Optional: If you use a <aclass="reference internal"href="../Contribs/Contribs-Overview.html"><spanclass="doc std std-doc">contrib</span></a> that warns you that it needs additional packages, you can install all extra dependencies with:</p>
You now must run <codeclass="docutils literal notranslate"><spanclass="pre">python</span><spanclass="pre">-m</span><spanclass="pre">evennia</span></code> once. This should permanently make the <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span></code> command available in your environment.</p>
<p>Once installed, make sure the <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span></code> command works. Use <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span><spanclass="pre">-h</span></code> for usage help. If you are using a virtualenv, make sure it is active whenever you need to use the <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span></code> command later.</p>
<h2>Initialize a New Game<aclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">mygame</span></code>, but you should, of course, name your game whatever you like. To create the new <codeclass="docutils literal notranslate"><spanclass="pre">mygame</span></code> folder—or whatever you choose—in your current location:</p>
<p>The game dir you create doesn’t have to match the name of your game. You can change the name of your game later by editing <codeclass="docutils literal notranslate"><spanclass="pre">mygame/server/conf/settings.py</span></code>.</p>
<p>The resulting database file is created in <codeclass="docutils literal notranslate"><spanclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span><spanclass="pre">migrate</span></code> command.</p>
<div><p>You can also <aclass="reference internal"href="Installation-Non-Interactive.html"><spanclass="doc std std-doc">automate</span></a> creation of the superuser.</p>
<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 <codeclass="docutils literal notranslate"><spanclass="pre">localhost:4000</span></code> or a web browser to <aclass="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>
<p>A full stop of the server (use <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span><spanclass="pre">start</span></code> to restart) is achieved with:</p>
<h2>View Server Logs<aclass="headerlink"href="#view-server-logs"title="Permalink to this headline">¶</a></h2>
<p>Log files are located in <codeclass="docutils literal notranslate"><spanclass="pre">mygame/server/logs</span></code>. You can tail the logging in real-time with:</p>
<p>Press <codeclass="docutils literal notranslate"><spanclass="pre">Ctrl-C</span></code> (<codeclass="docutils literal notranslate"><spanclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">-l/--log</span></code> to <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span></code> commands, such as when starting the server:</p>
<h2>Server Configuration<aclass="headerlink"href="#server-configuration"title="Permalink to this headline">¶</a></h2>
<p>Your server’s configuration file is <codeclass="docutils literal notranslate"><spanclass="pre">mygame/server/settings.py</span></code>. It’s empty by default. Copy and paste <strong>only</strong> the settings you want/need from the <aclass="reference internal"href="Settings-Default.html"><spanclass="doc std std-doc">default settings file</span></a> to your server’s <codeclass="docutils literal notranslate"><spanclass="pre">settings.py</span></code>. See the <aclass="reference internal"href="Settings.html"><spanclass="doc std std-doc">Settings</span></a> documentation for more information before configuring your server at this time.</p>
<h2>Register with the Evennia Game Index (optional)<aclass="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>
<p>Then, just follow the prompts. You don’t have to be open for players to do this — simply mark your game as closed and “pre-alpha.”</p>
<p>See <aclass="reference internal"href="Evennia-Game-Index.html"><spanclass="doc std std-doc">here</span></a> for more instructions and please <aclass="reference external"href="http:///games.evennia.com">check out the index</a> beforehand to make sure you don’t pick a game name that is already taken — be nice!</p>
<p>Next, why not head over to the <aclass="reference internal"href="../Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.html"><spanclass="doc std std-doc">Starting Tutorial</span></a> to learn how to begin making your new game!</p>