Difference between revisions of "FS2 WebUI Standalone"

From FreeSpace Wiki
Jump to: navigation, search
(+webui_root: Update to use Github sourced repo instead of SVN.)
(Sample multi.cfg: Tweaked config)
Line 68: Line 68:
 
+pxo_login chief_standalone
 
+pxo_login chief_standalone
 
+pxo_password password
 
+pxo_password password
+webui_root /home/chief1983/webui
+
+webui_root /home/chief1983/fs2open_webui
 
</pre>
 
</pre>

Revision as of 17:27, 18 October 2013

The WebUI standalone was created by SCP member Eli2 to enable *nix machines to run a standalone FS2 server.

How to Use

Just add the -standalone command line option to your startup script, or run the game with the Standalone option enabled from wxLauncher, etc.

Configuration

The following items are specific to the *nix <fs2_local_data_folder>/data/multi.cfg file, where the local data folder is likely ~/Library/FS2_Open/ for OS X or ~/.fs2_open/ for other *nix platforms. The rest of the file should work like a normal Windows standalone. An example file can be found at the bottom of the page.

+webui_root

  • Set this value to wherever you have placed the webui document root. You can grab it by downloading and extracting the master branch archive from Github, or by cloning the Github Webui repository, in the directory you would like to store the WebUI pages. So if you run extract or clone the repo in your home folder, your setting might look something like:
+webui_root /home/username/fs2open_webui

+use_pxo

For FS2NetD connectivity, you will also need to define +use_pxo, as you probably don't have the ability to run the GUI and turn on the PXO checkbox in the game when running the standalone on a headless server.

Connecting

The WebUI currently listens on port 8080 using unencrypted HTTP. The user and pass for administration is currently admin:admin. To secure this, the current recommendation is to run the server behind a firewall and access it via an SSH tunnel or VPN. Since most *nix machines are themselves accessible via SSH, I will describe the basics needed to set up an SSH tunnel as pertains to this standalone.

From Windows

This page has almost the exact directions you will need to set up a tunnel from Windows to your standalone server. The two things you need to know on the SSH tunnel tab are the ip/hostname of the computer running the standalone, that will resolve on the ssh server (if you SSH into a different machine on the network than the one running the standalone), and the port number on that machine will be 8080. You can set the Source Port to whatever you like, I will use a different port for clarity (8081). So if the SSH server computer can access your standalone server on its network via the hostname 'standalone', your destination line will be standalone:8080. If you use 8081 for your client port as well, the final entry in the forwarded ports list will look like:

L8081 standalone:8080

From CLI SSH on Linux/OSX/etc

You'll need to open a terminal window, and know the normal SSH command you use to access the SSH server on the network where the standalone is running. Let's say you SSH into myip.dyndns.com, on the default port 22. Your username on the ssh server is 'me'. The standalone is running on another machine on the same network as the SSH server, named standalone. The standalone runs on port 8080. You want to be able to access the WebUI in your browser on port 8080. You need to add the -L parameter to your ssh command to resemble the following:

ssh -L 8081:standalone:8080 [email protected]

Connect to the WebUI

Now that the SSH tunnel is set up in Putty or your shell, you can just open your browser and point it to http://localhost:8081/. Then you can log in with the credentials admin:admin and access the interface.

WebUI Interface

Below is a description of the tabs in the WebUI interface.

Server

This tab displays the server's current configuration, and allows you to set various options.

Mission

Information about the currently running mission on the server.

Chat

You can send chat messages directly to participants on the standalone, and see the messages from the players to all recipients.

Debug

This contains debugging output information from the server. If things go wrong, please include this information in any bug reports.

Known Issues

This server is still in alpha stage. So far, the current issues still exist:

  • Authentication is currently hardcoded to admin:admin
  • No SSL to protect your authentication password when the hardcoding is removed, which is why the SSH tunnel is currently recommended, as that essentially solves both issues for the time being.
  • +name value does not appear to be displaying on FS2NetD, or in game. Changing the second Server Name value in the WebUI also seems to have no effect on that.
  • Servers are showing up on FS2NetD when using +use_pxo, but I have been unable to connect to the standalone using FS2NetD in game. Disabling FS2NetD and adding the standalone's IP has worked, as has finding the standalone when on the same LAN with FS2NetD turned off. This also seems to be a problem I'm having with my Windows standalone and 3.7.0 too, so it might not be a WebUI issue at all.
  • fs2_standalone.log does not seem to be written to the data folder.

Sample multi.cfg

+name WebUI Test
+no_voice
+datarate 1000000000
+high_update
+max_players 12
+use_pxo
+pxo #autoselect
+pxo_login chief_standalone
+pxo_password password
+webui_root /home/chief1983/fs2open_webui