Difference between revisions of "Setting up a server"

From AAGRINDER wiki
Jump to navigationJump to search
imported>Maze
imported>Maze
Line 1: Line 1:
 +
Currently, there are only instructions for setting up a server on Linux. Feel free to add instructions for other platforms.
 +
 +
For additional details, see [[administration tips]].
 +
 +
== Setting up an AAGRINDER server on Linux ==
  
 
You'll need these things installed:
 
You'll need these things installed:
Line 22: Line 27:
 
</pre>
 
</pre>
  
 
+
Then, acquire the AAGRINDER server software:
Then run the following commands:
 
 
<pre>
 
<pre>
 
$ git clone https://gitlab.com/MRAAGH/aagrinder.git
 
$ git clone https://gitlab.com/MRAAGH/aagrinder.git
 
$ cd aagrinder
 
$ cd aagrinder
 
$ npm install
 
$ npm install
 +
</pre>
 +
 +
You also need the [[AAGRINDER terrain generator]] (compiled from source):
 +
<pre>
 
$ git clone https://gitlab.com/MRAAGH/aagrinder-terrain.git
 
$ git clone https://gitlab.com/MRAAGH/aagrinder-terrain.git
 
$ cd aagrinder-terrain
 
$ cd aagrinder-terrain
 
$ make
 
$ make
 +
</pre>
 +
 +
The directory ''aagrinder-terrain'' should be inside the directory ''aagrinder''.
 +
 +
Move back to the directory ''aagrinder'', then start the server:
 +
<pre>
 
$ cd ..
 
$ cd ..
 
$ npm start
 
$ npm start
 
</pre>
 
</pre>
  
A server.properties file will be created.
+
 
 +
A [[server properties|server-properties.json]] file will be created.
 
In that file, you set the database name, host, user and password.
 
In that file, you set the database name, host, user and password.
Then restart the server.
+
Then [[administration tips#restart the server|restart the server]].
  
Now, anyone who can access your computer via internet can easily connect to your aagrinder server.
+
Now, anyone who can [[wikipedia:port forwarding|access your computer]] via internet can easily connect to your aagrinder server.
  
 
== Running server without MySQL ==
 
== Running server without MySQL ==
Line 46: Line 61:
 
If you are going to play alone or only on the local network, this could be totally fine. [[Running in insecure mode|More about insecure mode]]
 
If you are going to play alone or only on the local network, this could be totally fine. [[Running in insecure mode|More about insecure mode]]
  
Open your server.properties file.
+
Open your server-properties.json file.
 
Change "insecure_mode":false to "insecure_mode":true.
 
Change "insecure_mode":false to "insecure_mode":true.
Then restart the server.
+
Then [[administration tips#restart the server|restart the server]].

Revision as of 18:42, 25 October 2019

Currently, there are only instructions for setting up a server on Linux. Feel free to add instructions for other platforms.

For additional details, see administration tips.

Setting up an AAGRINDER server on Linux

You'll need these things installed:

If you're going to use MySQL, set up your database. It is needed for storing account data. Helpful commands:

$ mysql -u root -p
> create database aagrinder;
> create user 'maze'@'localhost' identified by 'some_password';
> grant all privileges on aagrinder.* to 'maze'@'localhost';
> flush privileges;
> quit

Then, acquire the AAGRINDER server software:

$ git clone https://gitlab.com/MRAAGH/aagrinder.git
$ cd aagrinder
$ npm install

You also need the AAGRINDER terrain generator (compiled from source):

$ git clone https://gitlab.com/MRAAGH/aagrinder-terrain.git
$ cd aagrinder-terrain
$ make

The directory aagrinder-terrain should be inside the directory aagrinder.

Move back to the directory aagrinder, then start the server:

$ cd ..
$ npm start


A server-properties.json file will be created. In that file, you set the database name, host, user and password. Then restart the server.

Now, anyone who can access your computer via internet can easily connect to your aagrinder server.

Running server without MySQL

WARNING: if you run a server without a database, players will not be able to protect their accounts with passwords. If you are going to play alone or only on the local network, this could be totally fine. More about insecure mode

Open your server-properties.json file. Change "insecure_mode":false to "insecure_mode":true. Then restart the server.