How to Setup a Remote Linode Cloud Server with JackTrip Installed
IMPORTANT: ALWAYS BE SURE TO DELETE your remote Linode Cloud Server before you logoutof your Linode website user account, otherwise you will get charged even if it is OFFLINE!!
Most of the material in this guide was extracted from JackTrip remote server notes (on Debian via Linode) by Michael Dessen and Bonnie Kwong (1) and the video tutorial created for CCRMA (2) by Nick Porcaro.
For this guide, you will be working with two software entities. One is the Linode platform (https://www.linode.com/ via your web browser) which I will refer to as the Linode website. The other is the Terminal application on your computer (which doesn’t necessarily have to be the same computer that you are accessing the Linode website from). You use Terminal to send commands to the remote Linode Cloud Server.
This guide shows you step by step how to create and save the image of a remote Linode Cloud Server with the latest version of jacktrip installed on it. To do this, the basic steps are:
Create a Linode Image* with jacktrip installed on it:
1. Create a remote Linode Cloud Server via the Linode website
2. Login to your remote Linode Cloud Server via Terminal (on your computer)
3. Install jacktrip on Linode Cloud Server via Terminal (on your computer)
4. Test jacktrip in Server Mode on Linode Cloud Server via Terminal (on your computer)
5. Create a Linode Image of Linode Cloud Server contents via the Linode website
6. Delete Linode Cloud Server via the Linode website
Once you have a Linode Image saved with jacktrip already installed, you can deploy it anytime you want to host a jacktrip session in hub server mode via a remote Linode Cloud Server.
This process is detailed in: Linode [2]: Deploy Server Image for JackTrip session
There is also a guide on the Linode website that Gloria Damijan found helpful:
https://www.linode.com/docs/guides/getting-started/
*About Linode Images(3)
Linode’s Images service allows users to store custom disk images in the Cloud. These images can be preconfigured with the exact software and settings required for your applications and workloads. Once created, they can be quickly deployed to new or existing Linode Compute Instances, saving users time from manually setting up their entire system after each deployment.
Linode Images will be retained whether or not you have an active Linode on your account, which also makes them useful for long term storage of a private template that you may need in the future.
As of this writing, there is a monthly charge of $0.10/GB to store Images for Linode users. Limits per user account are: 6 GB per Image, 150 GB maximum combined size of all images, up to 25 images. When saving a Linode image, it is the aspects of the Linode that are on the disk that are saved, not any additional aspects such as IP addresses, fully qualified domain names, and MAC addresses.
Footnotes:
(1) Jacktrip remote server or raspberry pi notes.docx - JackTrip remote server notes (on Debian via Linode) by Michael Dessen and Bonnie Kwong, last updated Sept. 6, 2020
(2) CCRMA : Center for Computer Research in Music and Acoustics (Stanford University)
GENERAL TIPS:
1. When using Terminal commands, if something doesn’t work as you expected always recheck what you typed in, sometimes a little typo can make the difference between failure and success!
2. When using the Linode website, whenever you perform an action, make sure to wait until the action completes. For example, when you power up your remote Linode Cloud Server, be sure wait until it says RUNNING with a green dot before copying the ssh command and trying to login to your remote Linode Cloud Server.
3. Before you logout of your Linode website user account, make sure to always DELETE your remote Linode Cloud Server otherwise you will continue to get charged for it even if it’s listed as being OFFLINE. Be sure to DELETE it even if you didn’t finish properly setting up an image, etc.
Create a Linode Website User Account if you don't already have one
Notes:
- you will have to provide your billing information to create an account.
- once you create an account you do NOT have to sign up for monthly charges. you can just pick and choose on the fly. The default cost for Plans is charged by the hour and it's very inexpensive as long as you always remember to delete the server after you are done using it each time
1. Via Google Chrome web browser(4), go to:
https://www.linode.com/
2. Click on green Sign Up button in the upper right corner and follow all the steps
(you will have to verify via email as per usual).
3. Once you create a user account for the Linode website successfully, you should be at the Linode Manager page. Continue on to the next section.
Footnote:
(4) Using the Google Chrome web browser is recommended but not mandatory
Create a Linode Image with jacktrip installed on it
1. Create a remote Linode Cloud Server via the Linode website
[the Linodes / Create page should appear]
[scroll down page if necessary to Linode Plan selections]
When selecting which plan to select for your ensemble, 1 CPU = 2 to 5 connections, a hub requires 2 connections per ensemble member; 8 CPU is probably fine for 8 ensemble members.
If you are just creating a Linode image, you can select the plan for 4 CPU = 8 GB.
[scroll down page if necessary to fill in Linode Label and Root Password]
[The Linodes page for your remote Linode Cloud Server should appear]
Footnotes:
(5) If you decide to select Dedicated 16 GB or greater, the first time you do so, you will get the message:
‘Additional verification is required to add this service. Please open a Support ticket’
You can open a support ticket and the Linode Support team will give you permission to select higher plans.
(6) the ssh [secure shell] Terminal command is a protocol used to securely connect to a remote server/system
2. Login to your remote Linode Cloud Server via Terminal
Open Terminal on your computer.
If steps a., b. and c. worked, go on to 3.
Note About Using Terminal:
If Terminal responds with a line starting with: root@localhost:~
then that particular Terminal window is logged onto your remote Linode Cloud Server and all commands from then on will be sent to your remote Linode Cloud Server. This comes in especially handy to observe if you have multiple Terminal windows open.
For example, you might want to simultaneously run jacktrip in Server Mode remotely via your remote Linode Cloud Server in one Terminal window and run jacktrip in Client Mode locally in another Terminal window.
In the screenshot above, the Terminal window fired up locally as indicated by it’s responding with a line starting with: Janes-MacBook-Pro-2:~
but after I logged into my remote Linode Could Server via the ssh command, Terminal responded with a line starting with: root@localhost:~
Note from Gloria Damijan regarding if you have a problem getting the ssh command to work properly:
If you ever get a strange message like the one shown in this screenshot when trying to login to your remote Linode Cloud Server via the ssh command:
you can try the ssh-keygen command as follows to resolve it.
For Linux and macOS (put in your remote Linode Cloud Server’s IP address for [ip-address]):
ssh-keygen -R [ip-address]
for example, if your remote Linode Cloud Server’s ip address is 23.239.11.26 as shown in the screenshot above, you would type in:
ssh-keygen -R 23.239.11.26
Then go back to a. at the top of this section (that is, the ssh root@[ip-address] command) and see if you can proceed with the login process.
3. Install jacktrip on Linode Cloud Server via Terminal
Type in the Terminal commands below (shown in boldface) and hit the <enter> key.
Note that on your remote Linode Cloud Server, after each command completes, Terminal will prompt you for a new command with a line beginning with root@localhost:~ The exception is if you use “&” in a command line in which case hit <enter> to get a prompt for a new command from Terminal.
a. Update debian and install apt build tools
(if you are asked a Y/n question, type in Y and hit <enter>)
sudo apt-get update && apt-get upgrade
b. Install jack, qjackctl, audacity and other software needed to run jack/jacktrip
[type in the entire command shown below before hitting <enter>]:
If you selected Debian 10 {in step b. Set Distribution Images of 1. Create a remote Linode Cloud Server via the Linode website}, type in:
sudo apt install -y --no-install-recommends build-essential librtaudio-dev qt5-default autoconf automake libtool make libjack-jackd2-dev qjackctl audacity git
[select yes to realtime priority if asked, with the arrow key(s) on your keyboard]
If you selected Debian 11 {in step b. Set Distribution Images of 1. Create a remote Linode Cloud Server via the Linode website}, type in:
sudo apt install -y --no-install-recommends build-essential librtaudio-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools autoconf automake libtool make libjack-jackd2-dev qjackctl audacity git
[select yes to realtime priority if asked, with the arrow key(s) on your keyboard]
If you aren’t sure whether you had selected Debian 10 or Debian 11, type in
lsb_release -a
If you selected Debian 10, Release: will be 10 and Codename: buster
If you selected Debian 11, Release: will be 11 and Codename: bullseye
c. Clone the JackTrip repo [= repository].
If the git command isn’t found or you get some other error, try going back to step b. and type in the long sudo command manually.
git clone https://github.com/jacktrip/jacktrip.git
Now you have the source code on the remote Linode Cloud Server.
d. Change directory to jacktrip:
cd jacktrip
e. Build jacktrip [this might take a few minutes]:
./build
f. Once the build is complete, go to the builddir directory(7):
cd builddir
g. Check what version of jacktrip you just installed on your remote Linode Cloud Server:
./jacktrip -v
Footnote:
(7) if nothing happens or you get an error message, you might be in the wrong directory, to get back to builddir, you can try the following three commands (one line at a time): cd <enter> cd jacktrip<enter> cd builddir<enter>
4. Test jacktrip in Server Mode on Linode Cloud Server via Terminal
a. Start jack in server mode:
in this example, buffer of 512 frames/period, sample rate of 48k, &=run command in background
jackd -d dummy -p512 -r48000 &
After the jackd messages will appear, you must hit <enter> before typing in the next command.
b. Start jacktrip(8) in server mode:
here is an example of a command Sarah Weaver has used with the NowNet ensembles
[-S = run in Hub Server Mode, -p2 = client out/in but no loopback]
./jacktrip -S -p2 -q32 -z
c. Try to connect in jacktrip to your remote Linode Cloud Server as you normally would do.
To do this, you will need the ip-address for your remote Linode Cloud Server.
You can find it on the Linode website back on the Linodes page for your remote Linode Cloud Server:
Footnote:
(8) to see all the jacktrip command options, type ./jacktrip -h
or go to: https://manpages.debian.org/testing/jacktrip/jacktrip.1.en.html
5. Create a Linode Image of Linode Cloud Server contents via the Linode website
[back at the Linode website, on the Linodes page]
[Images page should appear]
Note:
If you already have existing images, the Images page will look more like the screenshot below.
If that is the case, the blue Create Image button will be on the upper right as shown below.
[Images / Create page should appear]
[the Images page will appear again]
You now have an Image of a server with the latest release of jacktrip installed.
The next very important step is to Delete your remote Linode Cloud Server so you don’t get charged when it’s not being used. Next time you want to use a remote Linode Cloud Server, you can Deploy to New Linode using the Image you just created and select whatever Region and CPU Plan you want.
Footnote:
(9) if you had selected Debian 11 {in step b. Set Distribution Images of 1. Create a remote Linode Cloud Server via the Linode website}, select Debian 11; if your Linode was created by deploying an old image, select the old image’s label
6. Delete Linode Cloud Server via the Linode website
[The Linodes page should appear -
double check that you are on the Linodes not the Images page!]
[the more options pop up menu should appear]
You will know your remote Linode Cloud Server was successfully deleted when you see the Linode Manager page appear again with no Linodes listed (unless you had multiple remote Linodes in which case you would see that the remote Linode you deleted is not longer listed).
To double check that the remote Linode Cloud Server you wanted to delete was deleted:
Check the list of Events to see that the remote Linode Cloud Server you wanted to delete was deleted: