-
Notifications
You must be signed in to change notification settings - Fork 13
Installing and running the MTGA Server on Linux and Windows
This guide will show you how to install and run the MTGA Server with NodeJS on both Linux and Windows
- if you dont understand something please DM Pixel#5096 on Discord about what you have issues with
((for *NIX users))
commands
are often preceeded with a $ or a #, a # indicates that the command should be ran as root (with sudo), $ indicates it should be ran as a normal user
((for *NIX users))
NodeJS v18.7.0 32-bit Download
after it is installed restart your system
NodeJS v18.7.0 64-bit Download
after it is installed restart your system
install the nvm
Arch User Repository package
add source /usr/share/nvm/init-nvm.sh
to the end of your rc file (usually ~/.bashrc
or ~/.zshrc
you can find out which shell you are using with $ echo $SHELL
)
after it is installed restart the shell with $ $SHELL
once that is done use nvm to install v18.7.0
$ nvm install 18.7.0
install the nodejs
package using # apt install nodejs
or
install the node
snap package
run # curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - &&\
run # apt-get install -y nodejs
after it is installed restart the shell with $ $SHELL
install nodejs v18 with # dnf install nodejs
after it is installed restart the shell with $ $SHELL
Install the node package with pkg install node
Install the node package pkg_add node
First. Open a terminal emulator the following are valid options
Window's terminal
- Command Prompt
- Powershell
- Command Terminal
- vscode
Common Linux terminal emulator
- Konsole
- Alacritty
- Xterm
- rxvt
- Yakuake
- xfce4-terminal
- Gnome Terminal
then download the MTGA server's source code as a zip file and store it somewhere
Navigate to the server's source code directory
and run $ npm install
open the server folder in vscode by right-clicking on folder and open with vscode
Toggle Terminal and enter npm install
tell the system to use the correct version of nodejs $ nvm use 18.7.0
Navigate to the server's source code directory
and run npm install
Your system might be configured to use another NodeJS version by default, please refer to your distribution's documentation on how to change the default version or refer to online help
Navigate to the server's source code directory
and run npm install
Again with your preferred terminal emulator (refer to step 2's unordered lists )
Navigate to the server's directory (*NIX/Windows)
NOTE : the server's default port is 443 on most systems that might require you to launch the server as an administrator/with root privileges, it might be wise to change the port if you do not have access to the admin/root account
run npm start
if that does not work use node ./
run $ node ./
In the Terminal, enter npm start
, and wait for the Server is listening at ***
prompt
CTRL
+ Left-click
the IP address shown to open the Web-based Launcher
If you get the Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js'
error at anytime, re-install NodeJS (see Step 1)