[WIP] dedicated servers

Discussion in 'Work-In-Progress Mods' started by cola_colin, October 10, 2014.

  1. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
    > . (this is not a "static" image).

    It is a static image, as you will not be doing upgrades inside the VM.

    > Of course it means you have to recreate an image and run it to upgrade.

    As PA server releases are quite frequent you'll be doing that a lot.

    Docker is the wrong thing for what you want to do (well, Docker is the wrong thing either way). The Docker idea kinda works for mature software, but not for things that evolve.

    Just use the script for updating an existing install and type apt-get update for the rest (till uber provides us with Debian packages, that would be quite nice... but likely will never happen as they want user/pass).
  2. uggla88

    uggla88 New Member

    Messages:
    29
    Likes Received:
    14
    Hello,

    > As PA server releases are quite frequent you'll be doing that a lot.
    I know and it is just a matter of running one script to have a brand new updated image.
    I could eventually create a script that will trigger the build when uber will update pa. And as soon as the image is ready instantiate it. There is a lot of way to easily automate that.

    > Docker is the wrong thing for what you want to do (well, Docker is the wrong thing either way). The Docker idea kinda works for mature software, but not for things that evolve.

    I disagree but it will not try to convince you or anybody. You are free to use it or not.

    Best regards.
  3. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
    I'll drive the point home with this:

    http://www.banyanops.com/blog/analyzing-docker-hub/

    "Over 30% of Official Images in Docker Hub Contain High Priority Security Vulnerabilities"

    Noting that that is "HIGH priority", about 40% of the latest, and 64%+ of all images have other vulnerabilities.

    You are allowed to have your hosts vulnerable, but please keep them off the Internet, security folks already have too much work to clean crap up all the time.
  4. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
  5. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    updated the zip with a new config. If you're still using the old one: Make sure the pa host isn't an ip anymore, but pastats.com
  6. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    killerkiwijuice likes this.
  7. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    proeleert and Quitch like this.
  8. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    If you have a custom server please make the following changes to your server script...

    server-script/states/lobby.js at line 1242:

    Code:
        var settings = {
            max_spectators: MAX_SPECTATORS,
            max_players: MAX_PLAYERS,
            spectators: MAX_SPECTATORS,
            hidden: false,
            friends: false,
            public: true,
            tag: DEFAULT_LOBBY_TAG,
            game_name: DEFAULT_LOBBY_NAME,
            required_content: content_manager.getRequiredContent(),
        };
    
    https://raw.githubusercontent.com/mikeyh/pa-server-script/master/server-script/states/lobby.js

    server-script/utils.js at line 37:

    Code:
        getMinimalSystemDescription: function (system) {
            if (!system)
                return system;
    
            var copy = _.omit(system, 'planets');
            copy.planets = _.map(system.planets, function (element) {
                var summary = _.omit(element, ['planetCSG', 'landing_zones', 'metal_spots', 'source']);
    
                summary.metal_spots_count = element.metal_spots ? element.metal_spots.length : 0;
                summary.planetCSG_count = element.planetCSG ? element.planetCSG.length : 0;
                summary.landing_zones_count = element.landing_zones ? ( element.landing_zones.list ? element.landing_zones.list.length : element.landing_zones.length ) : 0;
                return summary;
            });
    
            return copy;
        },
    
    https://raw.githubusercontent.com/mikeyh/pa-server-script/master/server-script/utils.js
    Last edited: February 5, 2016
  9. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Next set of changes may break any script you have to update MAX_PLAYERS and MAX_SPECTATORS:

    server-script/main.js at line 11:

    Code:
    exports.MAX_PLAYERS = 10;
    exports.MAX_SPECTATORS = 3;
    
    https://raw.githubusercontent.com/mikeyh/pa-server-script/master/server-script/main.js

    server-script/states/lobby.js around line 43:

    Code:
    var MAX_PLAYERS = main.MAX_PLAYERS;
    var MAX_SPECTATORS = main.MAX_SPECTATORS;
    
    https://raw.githubusercontent.com/mikeyh/pa-server-script/master/server-script/states/lobby.js

    server-script/states/empty.js

    Code:
    var MAX_PLAYERS = main.MAX_PLAYERS;
    var MAX_SPECTATORS = main.MAX_SPECTATORS;
    
    server-script/states/empty.js:

    Code:
           server.beacon = {
                uuid: server.uuid(),
                full: false,
                started: false,
                players: 0,
                creator: null,
                max_players: MAX_PLAYERS,
                spectators: 0,
                max_spectators: MAX_SPECTATORS,
                mode: 'Waiting',
                mod_names: modNames,
                cheat_config: main.cheats,
                player_names: [],
                spectator_names: [],
                require_password: false,
                whitelist: [],
                blacklist: [],
                tag: '',
                game_name: main.serverName,
                game: {
                    name: main.serverName
                },
                required_content: content_manager.getRequiredContent(),
                bounty_mode: false,
                bounty_value: 0.5,
                sandbox: false
            };
    
    https://raw.githubusercontent.com/mikeyh/pa-server-script/master/server-script/states/empty.js
    Last edited: February 7, 2016
  10. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
  11. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
  12. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Servers not updated to the latest server-script no longer appear in the server browser.
    proeleert and stuart98 like this.
  13. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
  14. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
  15. warrenkc

    warrenkc Active Member

    Messages:
    542
    Likes Received:
    191
    How can I host a dedicated server on Windows?
    FSN1977 likes this.
  16. FSN1977

    FSN1977 Active Member

    Messages:
    657
    Likes Received:
    232
    Please make a guide for Windows if possible :)
    warrenkc likes this.
  17. warrenkc

    warrenkc Active Member

    Messages:
    542
    Likes Received:
    191
    Yes, how can we host games using our computer CPU to be the server on Windows and have it show up in the lobby list in PA?

    Thank you very much for your hard work.

    Warren
  18. mwreynolds

    mwreynolds Well-Known Member

    Messages:
    472
    Likes Received:
    294
  19. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
  20. Liquidmack

    Liquidmack New Member

    Messages:
    1
    Likes Received:
    0
    Hi,

    I've tried to host PA:Titans Server on Azure Virtual Machine with Ubuntu 14.04 on board.

    I've failed.

    I followed the tutorial provided by exodus esports and after many battles, tutorials and hours of intense study I've reached the conclusion that my struggles are in vain.

    Probably It's something totally basic and I'm gigantic noob. I have almost no experience with Linux

    Attached Files:

Share This Page