(Created page with " To get the MSP Challenge server up and running on Linux, in the form of Docker containers, please do the following: # Get your hands on a (sub-)domain name and make sure it refers to the IP address of your Linux machine. This means defining an A record in the domain's DNS settings, through some DNS-setting tool that your domain or hosting provider should provide. # Log on to your Linux machine using SSH. You could use [https://www.putty.org/ Putty] for this, a free SSH...") |
No edit summary |
||
Line 1: | Line 1: | ||
The following instructions assume you have a clean Linux machine at your disposal, with absolutely nothing (else) running on it as yet. | |||
Of course, this might not be the case. You might already have a Linux machine running Docker containers of other applications. We then assume you have a web server running (such as Nginx) that listens to http(s) web requests for particular domains, and redirects to particular ports running particular Docker containers accordingly. You can also accomplish this by using the [https://linuxhandbook.com/nginx-reverse-proxy-docker/ Nginx reverse-proxy Docker container]. We at BUas are still experimenting with this, so this guide does not offer support or instructions for this kind of a setup just yet. | |||
So back to the initial assumption: you have a clean Linux machine with absolutely nothing (else) running on it yet. In this case, to get the MSP Challenge server up and running on Linux, in the form of Docker containers, please do the following: | |||
* Get your hands on a (sub-)domain name and make sure it refers to the IP address of your Linux machine. This means defining an A record in the domain's DNS settings, through some DNS-setting tool that your domain or hosting provider should provide. | |||
* Log on to your Linux machine using SSH. You could use [https://www.putty.org/ Putty] for this, a free SSH client for Windows. Be sure the account you use to log onto the machine has full superuser privileges. If needed, it's easiest if you switch to the root user by running: | |||
sudo -i | |||
* Make sure the Linux package index and then the actual Linux packages are all up-to-date. Type and enter the following command: | |||
apt-get update -y && apt-get upgrade -y | |||
* Follow these instructions to install the Docker Engine on your Linux machine: https://docs.docker.com/desktop/install/linux-install/ It should be pretty straightforward - a matter of pasting and running a handful of commands (~5 minutes). | |||
* Next, install PHP. Type and enter the following command: | |||
apt-get install php8.1-fpm -y | |||
* Make sure your Linux machine has Git installed by running, for example: | |||
git --version | |||
* If it turns out you don't have Git yet, then install it by running: | |||
apt-get install git | |||
* Now obtain the MSP Challenge Server code. If you run the command below, it'll download the code into a newly created subfolder MSPChallenge-Server of your current working directory. If you don't want it there, then change directory to a proper parent folder before your run the command: | |||
git clone --branch dev <nowiki>https://github.com/BredaUniversityResearch/MSPChallenge-Server.git</nowiki> | |||
* Get into the MSPChallenge-Server subfolder: | |||
cd MSPChallenge-Server | |||
* In it, create a new file called '''.env.local''' (indeed, this file has a name that starts with a dot, that is correct), and edit it using VI or NANO: | |||
vi .env.local | |||
nano .env.local | |||
* Assuming you're familiar enough with this text file editors, paste the following text into the file and edit the first line to reflect your chosen (sub-)domain name for the server (see the very first bullet at the top of this page). Of course, be sure to save the file when you're done.<blockquote>WEB_SERVER_HOST='''your.domainname.here''' URL_WEB_SERVER_PORT=443 URL_WS_SERVER_PORT="${URL_WEB_SERVER_PORT}" URL_WEB_SERVER_SCHEME=https:// URL_WS_SERVER_SCHEME=wss:// URL_WS_SERVER_URI=/ws/ APP_ENV=prod URL_WEB_SERVER_HOST="${WEB_SERVER_HOST}" URL_WS_SERVER_HOST="${WEB_SERVER_HOST}" SERVER_NAME="${WEB_SERVER_HOST}"</blockquote> | |||
* Advanced Docker users will surely recognise the opportunities for customising the Docker container setup here. Indeed, through all sorts of environment variables you can define the schemes, port numbers and host names of the different containers that make up the entire MSP Challenge Server solution. If you're interested in this (perhaps because you want to use a Linux machine that has other Docker containers running as well - see the top of this page), then have a look in the docker-aliases.sh file (specifically the 'dcup' alias definition) for more information. | |||
* You're ready to get the Docker containers built, up and running. We've created a bunch of short commands to help you with that. To enable these commands, run the following: | |||
source docker-aliases.sh | |||
* The above will enable you to run the following alias for a much longer Docker Compose Up command, which is nice. Just type and enter: | |||
dcup | |||
* It typically takes a couple of minutes for all the Docker containers to get built, up and running. By the end you should see something like this:[[File:DockerUp.png|frameless|376x376px]] | |||
You should now be able to open up the Server Manager application in your browser under your Linux machine's domain name, something like: | |||
<nowiki>https://your.domainname.here/ServerManager</nowiki> | |||
You might first get redirected to the MSP Challenge Authoriser application prompting you to log in with your MSP Challenge account. This might not happen if you already did that in your current browser session (as we have a Single Sign-On functionality). | |||
Either way, you should end up seeing the New Server Installation message of the Server Manager application. You can now go ahead and set up your first new game session. If you're not familiar with this, then [[Setting up your own server|follow the instructions on this page]]. | |||
That should be it! |
Revision as of 15:17, 4 October 2023
The following instructions assume you have a clean Linux machine at your disposal, with absolutely nothing (else) running on it as yet.
Of course, this might not be the case. You might already have a Linux machine running Docker containers of other applications. We then assume you have a web server running (such as Nginx) that listens to http(s) web requests for particular domains, and redirects to particular ports running particular Docker containers accordingly. You can also accomplish this by using the Nginx reverse-proxy Docker container. We at BUas are still experimenting with this, so this guide does not offer support or instructions for this kind of a setup just yet.
So back to the initial assumption: you have a clean Linux machine with absolutely nothing (else) running on it yet. In this case, to get the MSP Challenge server up and running on Linux, in the form of Docker containers, please do the following:
- Get your hands on a (sub-)domain name and make sure it refers to the IP address of your Linux machine. This means defining an A record in the domain's DNS settings, through some DNS-setting tool that your domain or hosting provider should provide.
- Log on to your Linux machine using SSH. You could use Putty for this, a free SSH client for Windows. Be sure the account you use to log onto the machine has full superuser privileges. If needed, it's easiest if you switch to the root user by running:
sudo -i
- Make sure the Linux package index and then the actual Linux packages are all up-to-date. Type and enter the following command:
apt-get update -y && apt-get upgrade -y
- Follow these instructions to install the Docker Engine on your Linux machine: https://docs.docker.com/desktop/install/linux-install/ It should be pretty straightforward - a matter of pasting and running a handful of commands (~5 minutes).
- Next, install PHP. Type and enter the following command:
apt-get install php8.1-fpm -y
- Make sure your Linux machine has Git installed by running, for example:
git --version
- If it turns out you don't have Git yet, then install it by running:
apt-get install git
- Now obtain the MSP Challenge Server code. If you run the command below, it'll download the code into a newly created subfolder MSPChallenge-Server of your current working directory. If you don't want it there, then change directory to a proper parent folder before your run the command:
git clone --branch dev https://github.com/BredaUniversityResearch/MSPChallenge-Server.git
- Get into the MSPChallenge-Server subfolder:
cd MSPChallenge-Server
- In it, create a new file called .env.local (indeed, this file has a name that starts with a dot, that is correct), and edit it using VI or NANO:
vi .env.local
nano .env.local
- Assuming you're familiar enough with this text file editors, paste the following text into the file and edit the first line to reflect your chosen (sub-)domain name for the server (see the very first bullet at the top of this page). Of course, be sure to save the file when you're done.
WEB_SERVER_HOST=your.domainname.here URL_WEB_SERVER_PORT=443 URL_WS_SERVER_PORT="${URL_WEB_SERVER_PORT}" URL_WEB_SERVER_SCHEME=https:// URL_WS_SERVER_SCHEME=wss:// URL_WS_SERVER_URI=/ws/ APP_ENV=prod URL_WEB_SERVER_HOST="${WEB_SERVER_HOST}" URL_WS_SERVER_HOST="${WEB_SERVER_HOST}" SERVER_NAME="${WEB_SERVER_HOST}"
- Advanced Docker users will surely recognise the opportunities for customising the Docker container setup here. Indeed, through all sorts of environment variables you can define the schemes, port numbers and host names of the different containers that make up the entire MSP Challenge Server solution. If you're interested in this (perhaps because you want to use a Linux machine that has other Docker containers running as well - see the top of this page), then have a look in the docker-aliases.sh file (specifically the 'dcup' alias definition) for more information.
- You're ready to get the Docker containers built, up and running. We've created a bunch of short commands to help you with that. To enable these commands, run the following:
source docker-aliases.sh
- The above will enable you to run the following alias for a much longer Docker Compose Up command, which is nice. Just type and enter:
dcup
- It typically takes a couple of minutes for all the Docker containers to get built, up and running. By the end you should see something like this:
You should now be able to open up the Server Manager application in your browser under your Linux machine's domain name, something like:
https://your.domainname.here/ServerManager
You might first get redirected to the MSP Challenge Authoriser application prompting you to log in with your MSP Challenge account. This might not happen if you already did that in your current browser session (as we have a Single Sign-On functionality).
Either way, you should end up seeing the New Server Installation message of the Server Manager application. You can now go ahead and set up your first new game session. If you're not familiar with this, then follow the instructions on this page.
That should be it!