Server Manual: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 124: Line 124:
# WebMap
# WebMap


You're able to access these great remote admin tools by visiting <nowiki>http://<yourserverip>:<httpport>/resourcebrowser</nowiki> in your favourite browser (Internet Explorer will NOT work).
You're able to access these great remote admin tools by visiting <nowiki>http://<yourserverip>:<httpport>/resourcebrowser</nowiki> in your favourite browser '''NOTE: Internet Explorer will NOT work, it will not display the resource browser.'''


==Useful Notes==
==Useful Notes==

Revision as of 00:07, 5 January 2008

Getting started

It is much easier than it looks to get a server up and running for your internet or LAN buddies: follow this wiki article and you will hopefully be on your way to hosting your own MTA:SA DM Server in no time!

Installing the server

The dedicated server application is available in different flavours depending on the platform of the server.

Linux installation

Empty

Windows installation

Installation of the MTA:SA DM server on Windows is easy as pie.

  • Go to the download page and scroll down to the "Dedicated servers" section
  • Click the Windows download link.
  • Once the installer is downloaded, open it.
  • Select a folder where you want to install the server.
  • Click Install.
  • Done!

Configuring your server

Begin by opening the 'mtaserver.conf' file, which is located in the <SERVER>/mods/deathmatch directory in a text editor, for example Windows Notepad.

This file is fairly straightforward; every variable has a description of what to do with it and how to change it.

Adding admins

To add admins to your sever follow these steps:

  1. Browse to your servers 'deathmatch' folder and open Accounts.xml
  2. Add a new account into the file with the syntax below

    'Accounts.xml syntax'

    <account name="Username" password="UserPassword" />
    
  3. Save and close the file
  4. Open acl.xml
  5. Select the rights of the admin, either Moderator, SuperModerator or Admin
  6. Within the group you have selected add the account you have created above with the syntax below
    <object name="user.Username" />
    

    You will finish with something like this:

    <group name="Admin">
    ...
    <object name="user.Username" />
    </group>
    
  7. You're done! You can add as many admins as you want this way, just keep creating accounts under eachother and the same with the ACL rights.

Note: Changing these files requires a restart of the server
Note 2: There are also ways to add accounts and edit rights for the server while it's running. "addaccount <user> <password>" is an internal command to add accounts, through the web interface you can manage ACL rights while it's running.

Configuring an external web server

For performance or consistency reasons, you could choose to make use of an external web server already set up and running, instead of the built-in web server. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.

To enable downloading off an external web server, you should configure the httpdownload and httpdownloadurl tags in your server configuration:

<httpdownload>1</httpdownload>	
<httpdownloadurl>http://www.myserver.tld/directory/here</httpdownloadurl>

Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the unextracted files to their computers. The unextracted files are always available in the <SERVER>/mods/deathmatch/resourcecache directory.

  1. Launch the dedicated server once and exit again. This will extract the zip files into the <SERVER>/mods/deathmatch/resourcecache directory.
  2. Go into the directory above and copy the resources to your external web server's public directory, this can be done in several ways:
    • If you don't care about your server-side files being publically available: create a symbolic link (Linux), a junction (Windows) or just plain copy the contents of the resourcecache directory to your public web server directory.
    • If you don't want your server files to be publically available through your web server: go into the resourcecache directory and manually copy the folders over to your public web server directory, removing any server-side files (they are not necessary for the client-side downloading) you do not want to be hosting on your web server.

      A quick way of securing your server-side files is currently not available. We will investigate into developing a tool that automatically copies only the necessary client-side files for all resources on your server.

Note: Please try to avoid any special characters (e.g. ~, !) in your download URLs.
Note 2: Please do not use a trailing slash in your download URL (e.g. hxxp://www.myserver.tld/directory rather than hxxp://www.myserver.tld/directory)

Starting your server

Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!

To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where nessessary.

Installing/Updating resources on your server

Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA DM server supports both these methods.

  1. Move or copy the new resource to your <SERVER>\mods\deathmatch\resources folder.
  2. In the server window type in the command "refresh" (without the quotes), this will re-scan the resources folder and update the live resources where necessary.

Uninstalling resources

Resources can easily be removed from your server if you no longer want them.

  1. Delete the ZIP file or the folder of the resource you wish to uninstall
  2. In the server window type in the command "refresh" (without the quotes), this will re-scan the resources folder and update the live resources where necessary.

Administrating your server

You can start resources by typing the command "start resourcename" in the server console, or stop ones with "stop resourcename".

It's also possible to execute these and other admin commands from the ingame console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command "login username password". Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.

For further commands, type "help" in a console.

Starting a map/gamemode

See the commands section of the documentation for mapmanager for more information.

Remotely administrating your server

This article assumes you have setup a working account with 'Admin' user rights, and have these resources started:

  1. ResourceBrowser
  2. ResourceManager
  3. WebAdmin
  4. WebMap

You're able to access these great remote admin tools by visiting http://<yourserverip>:<httpport>/resourcebrowser in your favourite browser NOTE: Internet Explorer will NOT work, it will not display the resource browser.

Useful Notes

  1. You may also update the resources while ingame as long as you have the correct access levels by typing "refresh" in the clients console or "/refresh" in the chat window. This may cause a second of lag if you have many resources.
  2. In the above instructions, <SERVER> is the path to your server's main directory. In most cases this is C:\Program Files (x86)\MTA San Andreas\server

Need further help?

Why not pop over to our Forums or join us on IRC (irc.multitheftauto.com #mta - MIRC)