1. When making a thread, please tag your thread accordingly using the menu to the left of the textfield where you name your thread where applicable. Server Advertisements and Mod Releases should be contained to their respective subforums.

Tutorial Using Starbind to easily sync your server mods with players

Discussion in 'Multiplayer' started by Douggernaut, Dec 15, 2013.

  1. Douggernaut

    Douggernaut Master Chief

    What is Starbind?
    Starbind is a server and client application that allows players to easily synchronize their local Starbound mods with the server they play on. If you are hosting a Starbound server, you can run Starbind server alongside it to host your server's modifications so that players can easily download them using the Starbind client.

    How do I set it up?
    Installation instructions for all platforms are available on the Starbind GitHub page.

    How do I use it?
    Simply place any compatible Starbound mod zip file in the "mods" directory of your Starbind install. Upon starting, Starbind will automatically extract and install all mods for you. It will also do a merge for any mod conflicts (or mods that modify the base Starbound assets such as player.config).

    Then, give players a link to the Starbind server (hostname and port, such as: 192.241.178.147:1337) and they can use the Starbind client to synchronize their local mods with your server.

    To restrict players from joining your server without the proper mods installed, you can enable "checkAssetsDigest" in the starbound.config file of your server's Starbound installation. Upon joining, Starbound will make sure that all loaded assets match the server's. Starbind does not automatically enable this flag.

    After installing new mods, you'll have to restart the Starbind server so it can merge the new mods in, and then restart your Starbound server so it picks up the new assets.

    How does it work?
    The Starbind server merely hosts the final, merged modification files and provides a checksum index for the assets. The Starbind client then uses this index to download only the files it needs. Starbind also creates its own bootstrap.config file so that only Starbind-downloaded assets will be used when Starbound is started. When a client closes Starbind, their original bootstrap.config is restored so as not to interfere with their local install.




    Please let me know if you have any questions or comments, I've been working on Starbind for the last few weeks but it has only just been released so you may encounter some issues.
     
    teilnehmer, sh00ter999 and PPP_Machi like this.
  2. PPP_Machi

    PPP_Machi Astral Cartographer

    This seems extremely useful, I'll try it out as soon as I get the chance!
     
  3. Churpy

    Churpy Void-Bound Voyager

    This sounds seriously awesome, unfortunately I'll be leaving my server vanilla at the moment, but this is pretty damn impressive.
     
  4. endalchemist

    endalchemist Poptop Tamer

    I'm getting an error on windows when trying to run StarbindServer.bat; The error that appears is "Error parsing config.json: Syntax Error"; referring to the path i put for my starbound dir. The path I entered is "C:\Program Files (x86)\Steam\steamapps\common\Starbound", as it should be since I actually bought the game. Any tips?

    Thanks
     
  5. Douggernaut

    Douggernaut Master Chief

    The issue is probably that you have to escape the backslashes "\", so every "\" needs to actually have two slashes: "\\". Let me know if that works.

    Additionally, Starbind will attempt to look for Starbound in the standard Steam installation directory if the path provided isn't valid, so you can change the path to be blank and Starbind should automatically set it correctly.
     
  6. DarkOS

    DarkOS Big Damn Hero

    is this still an active project?
     
  7. Douggernaut

    Douggernaut Master Chief

    Absolutely, although I haven't had a chance to work on it due to the holidays, it should still be compatible with the latest Starbound version. Let me know if you encounter any problems though.
     
  8. Cynnacle

    Cynnacle Aquatic Astronaut

  9. Snowpup

    Snowpup Giant Laser Beams

    I copied the config_default.json to config.json and changed the necessary values, but it's saying that it cannot find config.json.

    What's up with that?

    Nevermind, getting the parse error too.

    Error parsing config.json: SyntaxError: Unexpected string
    false


    I did amend the path with extra slashes but that didn't fix it.

    EDIT: Fixed by editing config_server.default.json to the correct path, but my webpage is now getting this.

    Code:
    TypeError: Cannot read property 'loggedIn' of undefined at Object.module.exports.authHandler [as handle] (/root/starbind-server/server/security.coffee:40:27) at next (/root/starbind-server/node_modules/express/node_modules/connect/lib/proto.js:193:15) at resume (/root/starbind-server/node_modules/express/node_modules/connect/lib/middleware/static.js:65:7) at SendStream.error (/root/starbind-server/node_modules/express/node_modules/connect/lib/middleware/static.js:80:37) at SendStream.EventEmitter.emit (events.js:95:17) at SendStream.error (/root/starbind-server/node_modules/express/node_modules/send/lib/send.js:147:51) at SendStream.onStatError (/root/starbind-server/node_modules/express/node_modules/send/lib/send.js:248:48) at /root/starbind-server/node_modules/express/node_modules/send/lib/send.js:320:26 at Object.oncomplete (fs.js:107:15)
    And yes, I did add a username, pass, and session key to all files.
     
    Last edited: Dec 30, 2013
  10. Douggernaut

    Douggernaut Master Chief

    This can be caused by a few things:

    1) On your local Starbound installation you have modified/added/removed an asset file in the "assets" directory. In this case you need to be sure to undo any local modifications.
    2) The Starbound server was started before the Starbind server was started (Starbind will add a new assets path, and the Starbound server calculates the assets digest at startup). In this case you just need to restart the Starbound server.
    3) The Starbound server version does not match your local Starbound client version, make sure they're both up to date.

    Snowpup, could you PM me the contents of your config.json file so that I can try it out and try to figure out what's going on?
     
  11. RavenDust

    RavenDust Scruffy Nerf-Herder

    Hi,
    while this looks promising, it doesn't work for me :/ I'm on Debian 7 x86, did everything as instructed (and without errors), but when i try to start the starbind server it crashes:
    Code:
    user@host:~/server/mods/starbind-server$ node app.js server
    false
    
    path.js:360
            throw new TypeError('Arguments to path.join must be strings');
                  ^
    TypeError: Arguments to path.join must be strings
        at path.js:360:15
        at Array.filter (native)
        at Object.exports.join (path.js:358:36)
        at Object.<anonymous> (/home/starbound/server/mods/starbind-server/server/starbound.coffee:41:19)
        at Object.<anonymous> (/home/starbound/server/mods/starbind-server/server/starbound.coffee:195:4)
        at Module._compile (module.js:456:26)
        at Object.loadFile (/home/starbound/server/mods/starbind-server/node_modules/coffee-script/lib/coffee-script/coffee-script.js:182:19)
        at Module.load (/home/starbound/server/mods/starbind-server/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object.<anonymous> (/home/starbound/server/mods/starbind-server/server/server.coffee:14:15)
        at Object.<anonymous> (/home/starbound/server/mods/starbind-server/server/server.coffee:93:4)
        at Module._compile (module.js:456:26)
        at Object.loadFile (/home/starbound/server/mods/starbind-server/node_modules/coffee-script/lib/coffee-script/coffee-script.js:182:19)
        at Module.load (/home/starbound/server/mods/starbind-server/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object.<anonymous> (/home/starbound/server/mods/starbind-server/app.js:2:1)
        at Module._compile (module.js:456:26)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Function.Module.runMain (module.js:497:10)
        at startup (node.js:119:16)
        at node.js:902:3
    
    Any idea? I tried to set the path in config.json or leave it empty - same result.
     
  12. Douggernaut

    Douggernaut Master Chief

    Would you mind PMing me with the contents of your config.json? It may simply be an error in the configuration file.
     
  13. necrate

    necrate Master Chief

    Escaping the backslashes for the Windows build does work and is necessary. Just for reference.

    I noticed another issue while trying to use this on Windows:

    Calling .path produces a string with forward slashes naturally, but path.sep is a backslash on Windows. All of the mods' files get skipped when the server tries to extract and merge the mods. This occurs in the 'hasOuter' case. Fixing this disparity seems to work.
     
    Last edited: Jan 1, 2014
  14. ephialtisJBK

    ephialtisJBK Orbital Explorer

    Douggernaut i have this problem

    Zrzut ekranu 2014-04-25 10.12.23.png
     
  15. kitramos

    kitramos Big Damn Hero

    hey I'm getting an error when I try to run this, I looked in the directory there is no bootstrap.config fire there or in the win64 either, since I'm playing on a 64 bit system.
    Can I get some help please?

    false
    Starbound game path set to: C:\program Files (x86)\steam\steamapps\common\starbound\win32
    connect.multipart() will be removed in connect 3.0
    visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
    connect.limit() will be removed in connect 3.0
    Found Starbound installation!

    fs.js:427
    return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
    ^
    Error: ENOENT, no such file or directory 'C:\program Files (x86)\steam\steamapps\common\starbound\win32\bootstrap.config'
    at Object.fs.openSync (fs.js:427:18)
    at Object.fs.readFileSync (fs.js:284:15)
    at backup (C:\Users\kit\Documents\My Games\starbind_win\server\starbound.coffee:106:44)
    at Object.module.exports.backupBootstrap (C:\Users\kit\Documents\My Games\starbind_win\server\starbound.coffee:122:16)
    at Object.module.exports.setupBootstrap (C:\Users\kit\Documents\My Games\starbind_win\server\starbound.coffee:127:19)
    at Object.module.exports.init (C:\Users\kit\Documents\My Games\starbind_win\server\starbound.coffee:166:14)
    at Object.<anonymous> (C:\Users\kit\Documents\My Games\starbind_win\server\server.coffee:69:13)
    at Object.<anonymous> (C:\Users\kit\Documents\My Games\starbind_win\server\server.coffee:93:4)
    at Module._compile (module.js:456:26)
    at Object.loadFile (C:\Users\kit\Documents\My Games\starbind_win\node_modules\coffee-script\lib\coffee-script\coffee-script.js:182:19)
    at Module.load (C:\Users\kit\Documents\My Games\starbind_win\node_modules\coffee-script\lib\coffee-script\coffee-script.js:211:36)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (C:\Users\kit\Documents\My Games\starbind_win\app.js:2:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3
    Press any key to continue . . .
     
  16. thtubehd

    thtubehd Space Spelunker

    By any chance does this mod work with stuff from the steam workshop or is it only from the chuckle fish forums
     
  17. Demokdawa

    Demokdawa Big Damn Hero

    I made a hand-made script as alternative, if anyone is interested in it, i can share ^^
     

Share This Page