If you ever try the `evennia` command and get an error complaining that the command is not available, make sure your [virtualenv](../Glossary.md#virtualenv) is active. On Windows you may need to to run `py -m evennia` once first.
Evennia consists of two components, the Evennia [Portal and Server](../Components/Portal-And-Server.md). Briefly, the *Server* is what is running the mud. It handles all game-specific things but doesn't care exactly how players connect, only that they have. The *Portal* is a gateway to which players connect. It knows everything about telnet, ssh, webclient protocols etc but very little about the game. Both are required for a functioning game.
The above command will start the Portal, which in turn will boot up the Server. The command will print a summary of the process and unless there is an error you will see no further output. Both components will instead log to log files in `mygame/server/logs/`. For convenience you can follow those logs directly in your terminal by attaching `-l` to commands:
evennia -l
Will start following the logs of an already running server. When starting Evennia you can also do
The act of *reloading* means the Portal will tell the Server to shut down and then boot it back up again. Everyone will get a message and the game will be briefly paused for all accounts as the server reboots. Since they are connected to the *Portal*, their connections are not lost.
Reloading is as close to a "warm reboot" you can get. It reinitializes all code of Evennia, but doesn't kill "persistent" [Scripts](../Components/Scripts.md). It also calls `at_server_reload()` hooks on all objects so you can save eventual temporary properties you want.
again, but will behave as if it was fully shut down. As opposed to a "real" shutdown, no accounts will be disconnected during a reset. A reset will however purge all non-persistent scripts and will call `at_server_shutdown()` hooks. It can be a good way to clean unsafe scripts during development, for example.
This will shut down *both* Server and Portal, which means all connected players will lose their
connection. It can only be initiated from the terminal:
evennia reboot
This is identical to doing these two commands:
evennia stop
evennia start
## Status and info
To check basic Evennia settings, such as which ports and services are active, this will repeat the
initial return given when starting the server:
evennia info
You can also get a briefer run-status from both components with this command
evennia status
This can be useful for automating checks to make sure the game is running and is responding.
## Killing (Linux/Mac only)
In the extreme case that neither of the server processes locks up and does not respond to commands,
[]()you can send them kill-signals to force them to shut down. To kill only the Server:
evennia skill
To kill both Server and Portal:
evennia kill
Note that this functionality is not supported on Windows.
## Django options
The `evennia` program will also pass-through options used by the `django-admin`. These operate on the database in various ways.
```bash
evennia migrate # migrate the database
evennia shell # launch an interactive, django-aware python shell
evennia dbshell # launch the database shell
```
For (many) more options, see [the django-admin docs](https://docs.djangoproject.com/en/1.7/ref/django-admin/#usage).
## Advanced handling of Evennia processes
If you should need to manually manage Evennia's processors (or view them in a task manager program
such as Linux' `top` or the more advanced `htop`), you will find the following processes to be
related to Evennia:
* 1 x `twistd ... evennia/server/portal/portal.py` - this is the Portal process.
* 3 x `twistd ... server.py` - One of these processes manages Evennia's Server component, the main game. The other processes (with the same name but different process id) handle's Evennia's internal web server threads. You can look at `mygame/server/server.pid` to determine which is the main process.
### Syntax errors during live development
During development, you will usually modify code and then reload the server to see your changes.
This is done by Evennia re-importing your custom modules from disk. Usually bugs in a module will
just have you see a traceback in the game, in the log or on the command line. For some really