Jump to content

Dirty Server Manager, A Linux Server Manager, [Alpha, v1.2.3]


Dirtyredz

Recommended Posts

Dirty Server Manager

The Unofficial Avorion Linux Server

 

Current Version:

[ALPHA] 1.2.3

 

 

B9uIsEQ.png

 

This is a project dedicated to server deployment, management, and exposing features to the client.

 

Questions? Concerns?  Join the Dirty Server Manager discord for help:

https://discord.gg/52YZMPt

 

First and fore most this is a script to manager the server:

 

  • Deploy the server through an easy installation process
  • Optional feature for crash detection.
  • Optional feature for Automatic server restarts at midnight and noon server time.
  • Store logs for player chat and server status.
  • Generate status banner image, if web interface is activated can be posted to forums or used as a signature.
  • Commands to update the avorion server to the latest branch, including beta branch
  • Command to easily send commands to the console.
  • Command to access the console directly.
  • Commands to start/stop/restart the server.
  • Command to start/stop the web interface (when using php server).
  • Message Of The Day
  • Timed broadcasts to the server
  • And much more!

 

Second, the script also deploys a web interface:

  • A status screen display logged in players, player count, past 24 hours chat log, and status banners
  • Multiple graphs display the status of the game server and the physical server:
    • Server Load Graph
    • Online Players Graph
    • avg/min/max updates Graph
    • players/sectors/factions in memory Graph
    • Server CPU usage Graph
    • Server Memory Graph

    [*]A Console page, where you can send and read the console.

    [*]A Mail Form used to send mail from the interface(server) to the player.

    [*]Configuration page to adjust the web interface option and to view the server.ini and manager options

    [*]Page to view data on all the Factions in the galaxy

    [*]Page to view every player that has ever joined the server, their resources, time played, last seen, and more

    [*]Page to view and parse the Pfogiling file generated by avorion, shows the slowes sector.

    [*]MAPS to view the Discovered Sectors and a map to view all the faction owned sectors.

    • These maps are interactive(Zoom-able and sector tooltip)

    [*]Pages to handle web interface account management

    [*]An about page displaying FAQ and Change log of the project

 

example: http://104.236.73.30:8080

 

Web Interface Screenshots:


 

E3E0fckm.png1kgfCyKm.pngMAm2BUXm.pngtYXJkK4m.pngcs8fhCwm.pngZieoBLLm.png

 

Iti3pIJ.gif

 

 

The Web Interface can be launched via php's built in webserver

or via apache

Ive included the PHP webserver as the default and an apache installation script for easy setup and deployment.

The PHP Webserver does not support ssl, but the apache installation script has the option to self generate an ssl certificate(you ofcourse can use your own verified certificate)

 


 

The script has been developed and tested at length on a Ubuntu 16.04 Server, aswell as tested on a Debian and Centos server

I have installation guides for only Ubuntu and debian atm, centos to come soon.

 

INSTALLATION


 

Step 1: Verify or install these dependencies: lib32gcc1, tmux (V2.0+), php7.0, php7.0-gd

 

   

sudo apt-get -y update
        sudo apt-get -y install lib32gcc1 tmux php7.0 php7.0-gd

 

Step 2: Create a new user for avorion to run on. (Do not use root)

 

   

sudo adduser avorion
    sudo su - avorion

 

Step 3: Download the manager

 

   

wget -O DirtyServerManager.tar.gz avorion.dirtyredz.com

 

Step 4: Unpack the tar file

 

   

tar -xvf DirtyServerManager.tar.gz

 

Step 5: Steamcmd and avorion server Installation

 

   

./manager install

 

Step 6: After a succesful server installation you can start the server

 

   

./manager start

 

Step 7: [Optional] To start the web interface run this commands

 

   

./manager start-web

 

    This command will start the PHP-web-server, this server is unable to handle ssl requests.

    Ultimatly the php server is not as robust as an apache server, that is why I include an apache settup below.

 

Alternativly: [Optional] Apache settup for those who wish to take advantage of SSL(https)

ONLY WORKS for DEBIAN and UBUNTU

 

su root           'or another user with sudo access'
sudo apt-get update
sudo apt-get install apache2 libapache2-mod-php7.0
cd /home/avorion
sudo ./manager apache_install

 

Regardless of which server you choose, the site will be accessed via:

http://YOUR-IP-ADDRESS:The_Web_Port

 

 

Step 8: After all is done and working properly be sure to secure your firewall with the appropriate commands. Remember to open ports for the game as well as the web interface These are the default ports you will need to open:

 

    tcp/27000

    udp/27000

    udp/27003

    udp/27020  -Steam

    tcp/27020  -Steam

    udp/27021  -Steam

    tcp/27021  -Steam

    tcp/8080  -web interface default

    tcp/443    -If using apche/ssl

 

Unfortunately I do not provide any commands or any scripts to setup your firewall, this you will have to do manually or risk your server being exposed.

 

Check help for more commands:

 

./manager help

 

To update your manager and web interface use command from the directory the manager is located:

 

avorion-manager/UpdateManager.sh

 

FAQ: Q: How do I see server's console and use commands? A: Attach to it with ./manager attach.

 

Q: How do I safely detach from server's console? A: Press Ctrl+B and then D.

 

Q: I have a "steamclient.so: wrong ELF class: ELFCLASS32" error! A: Copy steamclient.so from serverfiles/linux64 to server's root(serverfiles/). For default configuration:

 

cd serverfiles cp linux64/steamclient.so .

 

Q: Installation/update is stuck in a loop! A: Press Ctrl+C to stop it, then check for errors. If you can't solve them try posting them here.

 

Credit: I want to give some credit to Aki for his original work here: http://www.avorion.net/forum/index.php?topic=642.0 Aki provided me with a base script to start with and allowed me to focus on adding features.

 

 

CONFIGURATION


There are 2 configuration files,

  • manager-config.ini
  • PHPConfig.ini

 

manager-config.ini

is generated from the installation process, be sure to have the server shutdown prior to changing values inside this configuration as many features  depend on these values.

 

PHPConfig.ini

is installed with all the other files, and has defaults to what I feel is the best approach.

There are many options:

  • Displaying custom content on the home page
  • disabling/enabling features for the web interface
  • Setting role restrictions for features and pages, all pages and most features have control access to be public or a required account holder to be signed in.
  • Default file paths. I haven't experimented much with changing these. be warned!

 

 

GITHUB


This project is being maintained on github, feel free to add an issue or create a reply here on the forums.

https://github.com/dirtyredz/Dirty-Server-Manager

 

ALPHA


Again i want to remind everyone this is an alpha release, there are still bugs and features of which I intend adding. This web interface has been running on the RUSTY Server for the past 2 months and our player base has enjoyed its benefits, aswell have our moderators.

Im looking forward to your constructive criticism and ideas for features.

 

Ill do my best to fix any issues you might have.

 

TODO


 

https://github.com/dirtyredz/Dirty-Server-Manager/issues

 

Donate


Wanna show your appreciation?

http://dirtyredz.com/donate

 

Become a patron:

https://www.patreon.com/Dirtyredz

 

 

MY OTHER MODS


 

 

DSM

-A project dedicated to server deployment, management, and exposing features to a web interface.

http://www.avorion.net/forum/index.php/topic,3507.0.html

 

Reganerative Asteroid Fields

-Regenerates designated sectors, and randomly appearing sectors, of minable asteroids.

http://www.avorion.net/forum/index.php/topic,3055.0.html

 

MoveUI

-A mod for adding custom UIs to the screen.

http://www.avorion.net/forum/index.php/topic,3834.0.html

 

Subspace Corridor

-A modders recources, designed to mimick /teleport, due to server commands not being available through the api.

http://www.avorion.net/forum/index.php/topic,3148.0.html

 

Dirty Buoy's

-Allows players to spawn Navigational and Sentry Buoys, More to come soon.

-These buoys have unique features players cant get in normal game play, for example: Navigational buoys are invincible and cannot be moved. A great way to mark a distance wreckage or minarable rich asteroid field.

--Rusty Servers only at the moment.

 

LogLevels

-LogLevels gives modders the ability to set levels for there print functions.

-Aswell as allowing server owners to clean up there consoles, making it easier to read.

http://www.avorion.net/forum/index.php/topic,3799.0.html

 

NoNeutralCore

-A small script for stopping the creation of neutral zones inside the core.

http://www.avorion.net/forum/index.php/topic,3472.0.html

 

DirtyCargoExtender

-Extends the cargo hold of any NPC station discovered with low cargo holds.

--Patreon Members only

 

DirtySecure

-A mod which assigned PVP or PVE sectors based on distance from core.

-Provides Offline Protection to Players ships.

-Provides protection for NPC stations.

--Rusty Servers only at the moment

 

Reganerative Claimable Asteroids

-A mod which respawns claimable asteroids, when theyve been moved or turned into a mine.

-Also will unclaim or unsell an asteroid after a configured number of days

-Keeps the galaxy alive, providing claimable asteroids for new players.

--Rusty Servers only at the moment

 

Death Info

-Used to track cords of a players death point, assigning player values, for other mods to use.

--Rusty Servers only at the moment.

 

/Back

-A command using DeathInfo and Subspace Corridor, to teleport a players drone BACK to there death point.

--Rusty Servers only at the moment.

 

DistCore HUD

-Displays distance to the core on the players hud

--Rusty Servers only at the moment.

 

Any mod listed as Rusty Servers only, are live and active on the Rusty Servers.

Want the mod for your server? Lets talk and ill see about releasing the mod to you/public.

Not all mods on Rusty will remain there, they will eventually be released to the public.

 

 

Link to comment
Share on other sites

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

As a VIP player on this server, I feel that my donation is well allocated to the furthering of this project.

 

IRL, I am also the CEO of a technology company, and I have been constantly impressed with the dedication that the Rusty server developers have put into features like this on the server.

 

It truly does make it stand out and I think that one day in the future it will be a stand alone modded and evolved server that is chosen more often over vanilla base multiplayer servers.

 

If you don't know if you want to use this manager, why don't you come to Rusty's and try it out, get the info, and see how it works?

 

Better yet donate some money to the cause too if you want to use it!  It can only get better faster if you do that!

 

(P.S>  To warmongering PVP meatheads, yes, I do suppose that it would be entirely possible to tweak it to run your own server and manager where all you do is use the interface to see where your opponents are, jump in, hyper to them and blow them up.  For confirmation of that, ask Dirtyredz about it, but I don't see why you couldn't tweak it to that.  PVP at it's finest I suppose eh?) 

 

But really, for people that don't get paid hardly anything to come up with this in their spare time and to keep it updated, it's worth at least checking out on Rusty's right? 

 

Maybe the original developer of Avorion will buy it, it really is that good.  That would be an awesome reward for our devs that have developed this wonderful work of art and made Rusty's Galaxy what it is today.

Link to comment
Share on other sites

As a gamer on that server I can say that it is a great addition to the game, I often used the maps as reference where to go next to find another faction for example. loading times for the maps are a bit high, but this is because of the loads of data that must be processed.

For admins I think it´s even of more value but to test this i would have to be admin of a server which i´m not.

I really like it, Thanks for your good work.

Link to comment
Share on other sites

Extremely well made server build. As an onlooker, it's a fun to see, how the map gets slowly uncovered.

Not only that, you also have a pretty in-depth overview of all factions, players and their overall status...

Pretty robust software.

 

Not only that, to boot, it was also made by, and for a pretty dedicated players.

 

I'll go even further... come on play in Rusty's galaxy!

It was the very first server (that I'm aware of), that had the version 12 up, and they also patched pretty much of the mods, that they keep.

 

Come on, join Rusty's discord server, and come on play. It's fun, and incidentally, perhaps the most alive place of all Avorion, with the exception of this very forum.

 

Jackson.

 

Link to comment
Share on other sites

  • 2 weeks later...

Just a quick review of my experience with Dirty Server Manager.

 

Well what can I say other than THANK YOU.  Your server manager takes all the hassle and fuss out of administrating an Avorion linux server.  The install went really smooth once I followed your instructions and used Ubuntu rather than Centos 7.  Having the ability to check in on the server via the web control panel is another amazing feature that will definately be getting alot of use.

 

The support I received from you when I had a few setup issues (my fault) was second to none, Dirtyredz was more than willing to assist via the Rusty Discord.

 

Would highly recommend this server manager to other linux admins, by far the best option for avorion on linux.

 

Thanks again Dirtyredz and the Rusty Team  :)

Link to comment
Share on other sites

  • 2 weeks later...

1.1.6

 

Moved player count/list to server log

Added cronjob to refresh server log every 30seconds

Moved home chat to server log

Added toggle to console page to switch between console.log and server.log

Moved ServerINI and ManagerConfig Descriptions to ServerConfigController

./manager stop now uses server log instead of console log

Added server log location option in PHPConfig

Updated UpdateManager.sh to not reset or delete previous options in config file_put_contents

Updated ApacheInstaller to reflect IP address

Added Profile Parser page, witch parses through profiling_stats.txt

Added mpm_itk support to ApacheInstall

Link to comment
Share on other sites

You have two options available to you, follow the instructions up to unpacking the manager code, and then manually editing manager-config.ini to match your current server settup.

 

Or going through the standard installation process, setting the options to your current galaxy setting.

 

Currently a few variables still depend on the serverfiles for the game to be located in ~/serverfiles/data  witch is where the steam installer puts them and the galaxies being located in ~/.avorion/galaxies/GALAXYNAME

 

i think if those are the same for your setup then adapting the manager to work with an existing galaxies is no issue, as long as you give the same galaxy name to the manager-config.ini

 

Ill see about further expanding the config options to include these directory location in future patches,

I'm curious if this works for you and your setup. let me know more please. I want to make this manager as adaptive as possible for all Avorion server managers.

Link to comment
Share on other sites

I'm curious if this works for you and your setup. let me know more please. I want to make this manager as adaptive as possible for all Avorion server managers.

I ended up installing it and just gave the galaxy when prompted a different name, and then went back and manually edited the config as I wasn't sure if it was going to try and auto-start and mess things up.

 

But it starts up beautifully! However when I do a /manager stop it's not stopping the server, there's a counter that goes up and when it gets to 30 I cancel that, attach to console and do a manual /stop. No players connected.

 

Additionally cannot get the web component to connect. Ports are opened and I've installed under Apache and no-go. Tried to start the PHP Web and that fails to start.

 

 

Happy to jump on a Discord with you and work through my quirk of setup to figure it out as needed.

Link to comment
Share on other sites

Yeah my discord is

Dirtyredz

#4371

 

I found a bug in the latest patch for apache so i can fix that by pushing the fix up to the next update, but lets talk and make sure everything working correctly, ill be available all day

Link to comment
Share on other sites

Feature Request - Dirty Server Tweaks

----------------

A page where, checking some boxes and hitting 'apply' will parse the tweaks available and if checked, will scan the server files and apply those tweaks to the individual files as required.

 

Either by direct editing of the files or pulling the tweaks down from a host somewhere at the time. Think 'steam workshop' kind of mentality here.

 

Now you'll need to be sure that whatever you add in for the tweaks/features are not going to contest with other mods so I imagine it'll be a manual review/vetting of these tweaks.

 

Things like

- no faction wars

 

and anything else you lovely awesome gents deem are good tweaks until the dev's fix up the core problems.

Link to comment
Share on other sites

Great manager! Works while following your steps, but I cannot get the map to show the discovered sectors or the factions map.

 

I have updated using avorion-manager/UpdateManager.sh

I've noticed that the console and a few other options have disappeared with the update.

 

Currently only the home screen is useful as I can see who joins and who leaves. The other tabs (except graphs) don't work.

 

 

Link to comment
Share on other sites

I've made a change to the way the tabs are shown.  You now need to be logged into the web interface to see those pages. Also how long have you had the interface installed and the server online? By default the maps update every 6 hours or 12 deepening on  the version that you first installed.

Of course the server needs to be online during those scheduled updates to the maps

Link to comment
Share on other sites

ook The server was online for 24 hours, but today I've restarted everything so it's been online for about 4 hours now, I'll wait and see what happens tomorrow.

 

Also my credentials do not work when I try to sign in. I tried steam, root, and avorion (default user that runs server).

 

Also my galaxy folder is called "--max-players"  not sure if that is intentional.  Thanks for your quick reply!

 

 

Link to comment
Share on other sites

ok so the default login in for the web interface is admin/admin (make sure you change that in the account page)

 

your gallaxy should deffinetly NOT be named --max-players, sounds like your manager-config.ini is messed up, make sure review the file, you can use the default on the github page, or re running ./manager install will re install the file.

 

in order to figure out why the maps arnt working for you, you would need to Manually run the parser scripts and report any errors. I can help you with this directly on my recently created discord channel:

https://discord.gg/52YZMPt

 

Anyone is welcome to join the channel and leave bug reports/ issues/ concerns/ or feature request.

Link to comment
Share on other sites

Im working on version 1.2.0

Should contain extended compatibility for older versions of tmux, which will grant compatibility to other server OS.

Restructure of the functions, to allow for better documentation and debugging

More commands to facilitate new features

Better output on server not starting

and multiple bug fixes, especially those oriented around installation.

Link to comment
Share on other sites

ook The server was online for 24 hours, but today I've restarted everything so it's been online for about 4 hours now, I'll wait and see what happens tomorrow.

 

Also my credentials do not work when I try to sign in. I tried steam, root, and avorion (default user that runs server).

 

Also my galaxy folder is called "--max-players"  not sure if that is intentional.  Thanks for your quick reply!

 

I saw this happen on my server as well when the galaxy name i created had a space in it...   

Link to comment
Share on other sites

UPDATE:

 

1.2.1

  Fix editing server.ini with web interface, from breaking your server.ini

  Editing any config through the web interface will now create a copy of the config for backup

  Added complete Params to log and echo when starting server with -v

  Fixed bug in stop command that was not updating the status banner

  Added a message to profile parser page, notifing when the server has profiling disabled

  Added StopWait,SaveWait, and StopDelay to stop command and manager-config.ini

  Using the web interface will now add double qoutes around any string containing special charectors.

  Fixed manager logger to display the files its exectuing and not repeating the command that was run.

 

1.2.0

  Moves Apache installer to avorion-manager/manager

  separated commands from manager and added to avorion-manager/manager

  updated todo link on about page to direct to github issues

  fixed grep error when running status command with an offline server.

  send command now checks if a `/command` was sent ie `/say` or `/stop`

  Added Parser scripts to manager commands

  Added parser verbose output when manually running scripts

  Added verbose output for start command, will display additional info if server cant start, and more

  Added (help)  `-h` optional parameter, will display name/description of function

  Added optional parameter `-f` to force specific features, like running update with -f will ignore current version checks, and reinstall

  Added custom names for status banners, in PHPConfig.ini

  Moved Banner Generator script to its own script, removed netstat dependency(will now use last reported /players from console).

  Updated install script, to install all options and comments properly

  Added Timed Broadcast's Options/script

  Added Message Of The Day options

  Added Sorting Option to PHPConfig.ini for players list on home screen

  Added send mail to all members of a group, select the group from the drop down and hit send

  Migrated Admins.xml parser into its own function

  Refined Restart command to attempt restart 10 times, aswell as other improvments in the script

  Added new option GalaxyDirectory, allowing you to set the location of your galaxies directory.

  Fixed bug where redirects would send you to wrong address

  Added Inputs on console page to delete a sector from the galaxies/sectors/ directory

  Extended input on console to show last 100 lines of manager and status log when toggled

  Added Start/Stop/Status buttons on console page, commands sent to the manager not the console.

  Added Backup command: backup_galaxy, which will backup the entire galaxy directory. The command will only keep 10 backups.

  Fixed a bug causing the php-server to crash if there was no playerchatlog available.

  Fixed php-server saying it wasn't starting.

  forced update command to perform the update twice in succession, to catch any thing missed during first update.

  Removed Sudo command prefix from apacheInstall script for VM users.

Link to comment
Share on other sites

+10 Highly recommend. I ran a "basic" server in windows, but after seeing this I built myself a dedicated box for Avorion and this manager. Saves me the time and frustration when setting this up. Very easy from start to finish. You have waayyy more control over your server with this manager. Also, a big plus is the help he extends to those who have questions on his discord. Cool guy, great support and amazing work!

Link to comment
Share on other sites

I have instructions for Centos.

https://github.com/dirtyredz/Dirty-Server-Manager/blob/master/Centos_Intstructions.md

 

However, Ive been identifiy alot of issues with avorion and centos, excluding my manager.

so I will suggest using another OS such as Ubunutu or Debian

 

My manager does work with centis except for the apache installer, youll have to use the PHP web-server

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...