Difference between revisions of "FS2 WebUI Standalone"
(→From CLI SSH on Linux/OSX/etc: Fix a typo for clarification.) |
(As of r10043, fs2_standalone.log is created and written to correctly on Unix or Mac OS X) |
||
Line 45: | Line 45: | ||
===Debug=== | ===Debug=== | ||
− | This contains debugging output information from the server. If things go wrong, please include this information in any bug reports. | + | This contains debugging output information from the server. If things go wrong, please include this information as well as your fs2_standalone.log (found in same location as fs2_open.log) if using a Debug build in any bug reports. |
==Known Issues== | ==Known Issues== | ||
Line 54: | Line 54: | ||
*+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. | *+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. | *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. | ||
− | |||
==Sample multi.cfg== | ==Sample multi.cfg== |
Revision as of 02:25, 10 November 2013
The WebUI standalone was created by SCP member Eli2 to enable *nix machines to run a standalone FS2 server.
Contents
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. I highly recommend avoiding wxLauncher for the time being, as it isn't really aware of the *nix standalone and I don't think it can open a monitoring terminal window for you.
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 8081. 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 as well as your fs2_standalone.log (found in same location as fs2_open.log) if using a Debug build 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.
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