Menu

Can I host my own Central Server?

2020-08-22
2021-01-07
  • Carlos A Diaz-Rivera

    Hi everybody, I am running some Jamulus servers for the University of Puerto Rico - Mayaguez Campus and we are in need to know on how to create a custom central server so our students can access the cloud managed servers hosted by the university. This would be used for the brass band since we are going to have a virtual concert this Christmas. At the moment we only have one online, but we are thinking to create a directory with practice rooms and concert rooms for recording.

    If anyone can help me with this I would appreciate it, the devs or anyone can message me to carlos.diaz54@upr.edu

     
    • Gilgongo

      Gilgongo - 2020-08-22

      Hi Carlos,

      Just to clarify:

      You want to run a central server and multiple public servers on your university's cloud platform. So you'd register each public server with your central server. Students will then configure their clients to connect to that central server to see the available server list (practice rooms etc.)

      (By the way, it just so happens that a new feature that makes it easier to do this will be in the next release https://github.com/corrados/jamulus/issues/413)

      The alternative is to run multiple private servers and then publish the addresses of those servers on, say, an intanet. But that isn't as convenient for you, is that right?

      Also, when you say you want help with this, I assume that's with setting up the servers, but also with setting up recording and possibly video streaming as well (for concerts, for exmaple). Is that right?

      BTW can you give some more detail on the cloud platform to be used? Is it Linux based or can it also run Windows?

       
      • Carlos A Diaz-Rivera

        I am running a Linux machines. At the moment the only thing that I am looking is to create the central servers, just saw some solutions on this thread I'll try those and see if it works.

        In the matters of video and audio recording, the University already has a platform to work with that. Jamulus software will be used more for practice rooms and Pre Concert rooms for students to join and listen.

         
        • Carlos A Diaz-Rivera

          And the Cloud Platform is an internal one that we have, we don't use external providers since we have our own data centers.

           
          • Gilgongo

            Gilgongo - 2020-08-23

            Hi Carlos - if it's a private cloud then having a private central server makes sense, as long as you can make sure all your students know to put its address into their "Custom Central Server" field in their client.

             
            • Carlos A Diaz-Rivera

              Yeah I was able to create the server. I did some coding too since we are using Docker to work everything we have created some chat integrations with some bots for tutorials for Custom Servers.

              Students will visit a website and will download a version of Jamulus that has all the settings preisntalled with the magic of scripting. Thanks a lot for the info tho. This semester UPRM will be the only University in Puerto Rico with online Jamming Sessions for the music department.

               

              Last edit: Carlos A Diaz-Rivera 2020-08-23
              • Gilgongo

                Gilgongo - 2020-08-24

                This semester UPRM will be the only University in Puerto Rico with online Jamming Sessions for the music department.

                Great! Puerto Rico's repuation as a musical centre of excellence continues :-)

                 
  • Crossrhythm

    Crossrhythm - 2020-08-22

    Hi Gilgongo - yes! Not to speak for Carlos, but it would be great to have a central server like "Midwest Music Academy" that could then be populated with public servers with names like "Room 1", "Room 2", etc", or teachers names, class names, etc.

    It might already be possible, just I'm not finding it easy or obvious to setup. If it is possible now, specific command line instructions (no GUI) would be helpful.

    My specific goal at the moment is to have the servers all on AWS. I've got a private AWS server running already and was planning to add more and then, as you suggested, just sharing the IP addresses to the students and faculty as we go.

    Thanks!

     
    • Gilgongo

      Gilgongo - 2020-08-22

      Hi Jeremy,

      What you describe is certainly possible and the setup is very simple:

      https://github.com/corrados/jamulus/wiki/Choosing-a-Server-Type#central

      The only downside is that it means the people who are running the Jamlus clients have to know to put the address of your central server into their client's "custom central server address" field so that they can then see your list of servers. The client will remember that between sessions though I think.

      The advantage of having a central server compared to sharing the IP/dns names of private servers to your students are somewhat marginal I think, but there may be use cases that make a central server solution better perhaps. Hard to say.

      Personally, I'd just run a bunch of private servers and give our their addresses to people, if only because the central server would be a single point of failure (and one more server to maintain, upgrade etc.).

       
  • Crossrhythm

    Crossrhythm - 2020-08-22

    Hi Gilgongo, thank you. I wish I could also say the setup is very simple, and I'm sure it is but I am just missing something!

    Using the terminal in MacOS, after a bit of trial and error I'm at the /Applications/JamulusServer.app/Contents/MacOS directory, and type ./JamulusServer --pingservers --centralserver localhost and, yay, the server GUI opens.

    But then I'm not sure what to do. I enter "MySchool" as a Custom Central Server Address in the server, and "MySchool" as the Custom Central Server Address in the Client, but nothing shows up. Should that be an IP address? Another URL?

    Also "Make My Server Public" is not checked, yet it is showing up in the list of available servers!

    I wonder if part of my confusion is due to the two types of servers here. Sentences like "Server operators can also register with your server so their servers can show up in your list." are tough to parse! https://github.com/corrados/jamulus/wiki/Choosing-a-Server-Type#central Maybe terms like "Directory Server" or "Host Server" or such could be used to clarify things. Also the use of "Custom" - "Custom Central Server Address" vs "Custom [Genres]". I don't believe they have anything to do with each other, but I start feeling like a dog chasing its tail!

     
    • Gilgongo

      Gilgongo - 2020-08-22

      Er, yes. I was a bit reluctant to even describe the central server type in the docs for this reason. A central server is a sort of byproduct of the way Jamulus works. It's not really there to solve a "user" problem as such, but it can (and is) "hacked" to do so.

      Firstly, I'm afraid we can't change the name of central servers (unfortunately - I too wondered if we should called them "directory servers"). The term is used too much all over the project. Renaming after 15 years would cause more problems than it solves.

      As to setting up the server as a test - I've not done this ever, but I think it should go like this:

      (BTW I would avoid the GUI entirely for this to avoid confution becuase the GUI is not designed for this stuff.)

      You will need two machines. Run this on the command line on one of them to set up your central server:

      Jamulus --nogui --server --pingservers --centralserver 127.0.0.1

      Now start a server on another machine (where x.x.x.x is the LAN IP of the central server you just created):

      Jamulus --nogui --server --centralserver x.x.x.x

      Now start a client (in GUI mode) on that machine, and enter x.x.x.x into its custom central server field.

      Hit the "connect" button on the client and you should see the server you just registerd with your central server. You should then be able to connect the client to that server.

      Note that this is all theoretical because I've not tried it. It also occurs to me that I don't know what the expected behaviour of the "custom" item in the client's genre list is exactly, but I think it might be to list the servers in you custom central server.

       
  • Crossrhythm

    Crossrhythm - 2020-08-23

    Gilgongo - great, I gave this a whirl and it worked, just not exactly how I expected it to. I have a Mac Mini and a MacBook to play with before I start tinkering with my AWS instance. I got the Mini running a Custom Central Server (can I just call it a CCS?? lol). On the MacBook I run the server with your suggested settings, then use the client GUI to enter the Custom Central Server Address in Settings. Then when I go to Connect, and choose List: Custom, it shows 2 servers. I'll try to attach a screenshot. When I connect to 192.168.1.x, it goes to the local Server; when I choose 192.168.x:22124 it connects to the Mac Mini "CCS" - confirmed in the Terminal for each server.

    A few observations:
    1. --servername School doesn't seem to make any difference in the listing for either server. Pretty/user friendly names will make this much more accessible for students and teachers who aren't very fluent in technology so I'd love to get that working.
    2. I'm not sure if this CCS is accessible to the WAN internet, both to register other servers and for users to get the list of available servers. Would you expect to need port forwarding to make this work for Jam sessions outside of my LAN?
    3. To try it from outside my LAN I used my cell hotspot. I couldn't get either the regular server or the client to connect. I would guess that cell phone network restrictions may be the problem.

    With the "All Genres" CCS filling up on a regular basis, the other Genres are sure to follow. Having an easy way to provide a custom group of rooms/servers would really help scale Jamulus at institutions. I hope this can go from a "hack" to a supported feature!

    Of course, shared spreadsheets with private server IPs will do if this can't be addressed in the near term. Thanks again for your help!

     
    • Gilgongo

      Gilgongo - 2020-08-23

      Then when I go to Connect, and choose List: Custom, it shows 2 servers.

      Yes, I'm not sure why this is but the central server will also list itself. You'll see this in the public lists too (they will have a maximum of 1 player set for them).

      --servername School doesn't seem to make any difference in the listing for either server.

      That is for the HTML status option. It's a bit confusing. In fact I'll put a note on the wiki for it not to be confused with the --serverinfo name, which is what you want. You can see the spec for that here: https://github.com/corrados/jamulus/wiki/Command-Line-Options

      Would you expect to need port forwarding to make this work for Jam sessions outside of my LAN?

      Yes you will need to port forward to in that case.

      I would guess that cell phone network restrictions may be the problem.

      Not necessarily. If you aren't port forwarding, you won't see what you've set up on your LAN. Only public servers registering with public central servers can work without port forwards.

      Having an easy way to provide a custom group of rooms/servers would really help scale Jamulus at

      Rather than have ad-hoc central servers, the plan for this is to have genres and then maybe split out sub-genres if they start to fill up. One problem with this is that there are still a large number of servers out there that are running quite old versions of Jamulus, so they can't register with anything other than the old default (see http://jamulus.softins.co.uk and the versions of servers below v3.5.4).

       
  • Crossrhythm

    Crossrhythm - 2020-08-23

    For anyone else looking into this, there is also a thread on the "Jamulus World Jam" Facebook Group about it. Posted by Daniel Turner on August 21st. They have certainly worked out the naming issues!

     

    Last edit: Crossrhythm 2020-08-23
    • Gilgongo

      Gilgongo - 2020-08-23

      Yes, the World Jam is the main (only?) example of "hacking" the central server idea I think.

       
  • Crossrhythm

    Crossrhythm - 2020-08-24

    Got this all working on AWS - client needs to enter the IP of the Custom Central Server, then choose List: Custom, and boom, the servers all show up. Thank you Gilgongo!

    Next step - what's the easiest way to get a custom domain like worldjam.vip to work instead of using an IP as the Custom Central Server Address?

     
    • Gilgongo

      Gilgongo - 2020-08-24

      Assuming you have a dynamic IP on AWS (that is, one that changes when you restart your VM), then you will need to use a dynamic DNS service: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dynamic-dns.html

      Or buy a static IP from Amazon.

       
      👍
      1
    • Andrew S

      Andrew S - 2020-08-24

      I use no-ip.com --- they have both a Ubuntu and Windows agent depending on your preference, and are free as long as you re-confirm that you want their service every 30 days. The paid-for service has no such demand and isn't very expensive.

       
      👍
      1
    • rayjazz

      rayjazz - 2020-10-11

      Hi Crossrhythm, congrats on your custom central server. I am trying to have this on my EC2 instance too but somehow, it does not work. I have a coupld of ES2 free tier servers and work great with Jamulus server but as soon as I add "--pingservers --centralserver 127.0.0.1" to the Jamulus service file, it does not start the server. Actually, when I only add --centralserver 127.0.0.1 without "--pingservers", the server shows on the custom server list. But when I add --centralserver [centralserverip] to the other servers, it does not show up. How did you do it?

       
  • rayjazz

    rayjazz - 2020-10-11

    Ah I solved the problem.....

     
    🎉
    1
    👍
    1
  • Peter Goderie

    Peter Goderie - 2021-01-07

    @rayjazz Please tell us HOW you solved the problem.

    I have the same problem: my first (central) server itself shows up in the list, the other servers (running on the same machine) do register to the first server but do NOT show up in the list, though all servers are running and accesable from the internet (by "url:portnumber").