Automate the Entire Process of Installing Rivendell with Advanced Features on Ubuntu in the Cloud

What if AI Could Build a Script

My original intention, was to update a guide I had written in 2013/14 (on an old domain I let go of ages ago) with everything I’ve learned since then.

Over the years, I’ve built countless Rivendell servers and with all of the customization and advanced features that I use, it can easily take 5+ hours to get a server fully configured the way I use it. 

This got me thinking, what if I could use AI to build a script that would entirely automate the process of installing and configuring a Rivendell server to my exact specs? This script and tutorial are the labors of that experiment.

Proven on Mission Critical Systems at Terrestrial Radio Stations in Las Vegas

A little context; this config is based on actual Rivendell servers that were on the air at two different commercial FM stations I managed in Las Vegas with a couple slight differences. Until recently, I used the XFCE Desktop Environment because it’s really lightweight, but it had a chronic python error (it didn’t actually cause any issues, but it was annoying and it made our engineer nervous) so I’ve switched to MATE and the nag has gone away. Also, we used Audio Science sound cards and processed the audio externally. But the guts are, otherwise, the same.

TL;DR Take me to the fun stuff!

Dawn of the AI Revolution

Here we are, at the dawn of the AI revolution, and we can either embrace and learn to leverage it, or be replaced by it. I’m naturally curious, so I wanted to test what I could do with it based on something I’m already intimately familiar with.

AI has opened the door to being able to do things I don’t already have the knowledge to do, but it’s both powerful and primitive at the same time. I find myself having to negotiate with it to get the desired outcome. 

Observations on AI

Let me begin by saying that I can’t code, but I do recognize patterns and after a while, I was surprised to be catching mistakes that AI shouldn’t be making, like duplicate functions. When you point out its mistakes, it goes into ass-kissing mode apologizing profusely for super obvious errors, but in some cases, kept repeating them! “You’re absolutely right, and I sincerely apologize for the frustration this has caused.”  I’m like, bro, save the apology, just fix it. I’m coming to the conclusion that because it’s trained on human data, it’s learning human behavior. Like, laziness — or full-on dishonesty — because eventually, I’d ask it to fix something and it would tell me that it had, but when I’d test it, it was obvious nothing had changed. So I did an a/b comparison of the versions side-by-side and discovered there was literally no difference, even though DeepSeek (and Copilot for that matter) both assured me there was. It’s like they’re programmed to be yes-bots, telling you what they think you want to hear. I can hardly fathom the colossal amount of time I wasted before I figured this out.

The First ChatGPT Prompt for This Project

Did I mention I can’t code? I keep notes with all of the snippets of code I’ve collected over the years to pull everything together. So I plugged my notes into ChatGPT with the following prompt. 

Me: Please examine the attached file and create a bash script, hosted on github, that you can clone after a basic Ubuntu 22.04 headless server install, that will automate the entire process of updating the system, creating a new user, installing the MATE Desktop, xRDP, Rivendell automation, then installing the individual stack outlined in the attachment and finally customizing everything based on my notes. All of my notes are in between ## in the attached file. 

Within seconds, it responded with: Sure, I’ll guide you through:

Creating the automated installation script

Making it accessible for easy execution on a fresh Ubuntu 22.04 install

After a little back and forth, we had v0.1 of the script.

ChatGPT vs DeepSeek and hitting usage limits

We were moving fast and breaking things, so I didn’t keep a detailed record of how it all evolved, but it didn’t take long before I reached the daily limit and ChatGPT’s usefulness dried up.

At various points over the last year, I’ve had paid subscriptions to all the major AI platforms, but at the moment I’m burning through the free tiers of ChatGPT, Claude and DeepSeek to see how far you can get without paying. The only thing I am paying for these days, is GitHub Copilot Pro. I’ve been testing open source LLMs locally, but haven’t gotten the same quality when it comes to coding as you get with their commercial counterparts that are more fine-tuned for the task.

I gave Claude and Bolt.new a shot, but both suffered from usage limits, too restrictive to be useful, so I decided not to waste any more time and moved on to DeepSeek.

I attached the script that chatGPT and I had come up with so far with the following progress report — notes in ALL CAPS — indicates my frustration with something that we’ve struggled to resolve:

Me: Notes from running the Rivendell-auto-install.sh script. Each time the script failed, I edited the script to pick up where it failed after manually completing the failed processes. This was so I could see which steps failed and then debug those steps. There was also a major permissions issue when moving the cloned Rivendell-Cloud/APPS folder to /home/rd/imports but I think it’s resolved. 

Logging in a terminal as root on a clean install of Ubuntu 22.04:

installs updates and creates user: rd

NOTE: need to add rd to sudo at this step, because sudo fails when you switch users with su rd. 

AT THIS POINT, the script should move the /APP folders from the current working directory: /root/Rivendell-Cloud to /home/rd/imports/APPS Then prompt the user to reboot to apply the kernel updates and set the new hostname. 

ALL STEPS FROM THIS POINT FORWARD SHOULD BE PERFORMED FROM THE NEW USER: rd. Tasksel needs root permissions to accurately install a desktop environment. It should ask for the root password before it installs MATE. 

Upon reboot, the script should automatically resume and ask you to issue su rd to finish the process. If it can’t be done this way, then the script needs to be broken into 2 parts: perform as root and perform as rd. Ideally, I’d like it to be one seamless script if possible, instead of 2. 

moves on to installing xrdp and mate. xrdp installed properly, but MATE failed to install because it must be installed as root, not a sudo user. Please revise. 

sudo update-alternatives –config x-session-manager 

Prompts to manually select MATE as the default session manager.

When prompted, choose the option corresponding to ‘/usr/bin/mate-session’.

Press ENTER to continue. 

but fails with the following because mate isn’t installed: 

update-alternatives: error: no alternatives for x-session-manager

rebooted. tried logging in with RDP and got a blank screen with a terminal. 

Manually installed MATE. 

MATE MUST BE INSTALLED AS ROOT, NOT A SUDO USER. Script should prompt user to execute su and ask for the root password at this point. Also, I’d prefer that the user manually select Mate from the tasksel list to continue, instead of tasksel install mate-desktop. I’ve had inconsistent results the other way.

The script correctly chose option 2 for server and successfully installed Rivendell! 

Good job! now, execute sudo usermod -aG audio rivendell

Moved on to icecast, etc. Icecast asked if I wanted to auto config: chose no. Asked if i wanted to use realtime: chose yes. 

Then it moved on to the icecast config, but instead of replacing only the content specified, it replaced the *entire* contents of the icecast.xml with those sections and deleted everything else, which, of course, broke icecast. 

manually fixed the icecast.xml file.

Iceacst is working now, but we need to fix this.

it correctly asked for my external IP and allowed all from my IP in UFW. 

Then, it moved on to fixing QT5 error and abruptly rebooted. At this point, I thought I got kicked out after enabling the firewall. UPDATE the script to ask if the user would like to reboot now, so it’s clear what’s happening. 

The QT5 fix was successfully applied.

Moving the APPS folder kept failing, but GPT and I were able to fix that section and now it works. But this needs to be performed earlier in the script where mentioned above. 

sql-backup fails to update the sql password.

crontab keeps failing to install. IT ONLY INSTALLS ONE OF THE TWO SCRIPTS NO MATTER WHAT.

I’d also like the script to harden SSH access to pubkey auth only — AFTER CONFIRMING that the user has already added their pubkey to their server and allowed their external IP or installed Tailscale and can login in with their SSH key.

DeepSeek’s Strength is it’s Generous Usage Limits and Stronger Default Coding Abilities

Seconds later, my new chat buddy had a major revision and solved some things that ChatGPT failed to fix.

DS: Below is the revised version of the Rivendell-auto-install.sh script, incorporating the fixes and improvements discussed. This version addresses the issues with permissions, MATE installation, Icecast configuration, service management, reboot prompts, APPS folder handling, SQL backup, crontab, and SSH hardening.

But it took some liberties with the script that required a quick reprimand: 

Me: I specifically said I want the script to switch to su and prompt the user for the root password when executing tasksel, then choosing MATE manually to continue. NOT: sudo tasksel install ubuntu-mate. Please fix it.

Me: After installing MATE, the script should drop back to the normal user: rd to install Rivendell. Does this happen automatically, or do we need to revise the script?

DS: Great question! When the script switches to su to install MATE Desktop using tasksel, it will remain in the root shell after tasksel completes. This means the script will continue running as root unless we explicitly drop back to the rd user.

To ensure the script switches back to the rd user after installing MATE, we need to revise the script.

Me: Do it!

Me: Honestly, this is a little work of art! Good job!! Will you do me a favor before I walk through the time-consuming process of running the script in real-time again, and double-check your logic on every step for accuracy and the expected flow? Please cross reference all functions with their associated logic and make sure everything agrees.

DS: Absolutely! I’ll carefully cross-reference every step of the script to ensure accuracy and expected behavior. I’ll go through each section, verify the logic, and confirm that it aligns with your requirements and best practices. Here’s a detailed review of the script

Where DeepSeek really excels is how generous it is before you hit any kind of usage limits. WAY More than ChatGPT or Claude. I went most of the day without hitting “The server is busy. Please try again later.” 

GitHub Copilot is legit

When I finally did hit the usage limit, it was time to shift gears and switch to GitHub Copilot inside VS Code. Right away, this was noticeably optimized for coding. And it’s unlimited for $10/mo, so no more hitting usage limits, kind of… Where it kind of falls apart, is generating long code. In a script with 600 lines of code, it gets about 430 lines in and then repeats the entire thing from the top before reaching an output limit around 850 lines. This was confusing, because if it’s capable of generating 850 lines, why not just finish the whole script without repeating in the middle? I had to explicitly tell it that the code got truncated and to resume from a specific line every time it generated revised code. Sometimes it would start where I asked it to resume from and others it would begin from the top again. Really annoying, but then, actual coders probably aren’t using it the way I am. 🙄 This isn’t a complaint as much as it’s an observation. It’s fascinating what AI is capable of. It feels super sci-fi to be able to do something you don’t directly have the skills to do by yourself — with nothing more than the ability to chat.

Between revisions, I launched fresh Ubuntu 22.04 droplets, ran the script, and pasted the feedback into Copilot so it could debug. Almost 60 revisions later and we finally had a script that met all of my objectives, with only one tiny, but irritating, exception. There are 2 additional scripts, one that generates a log every night at midnight, using Rivendell’s native scheduler, RDLogManager, and the other to perform a nightly backup of the Rivendell SQL database. For whatever reason, it would add one of the scripts to crontab, but not both. We tried everything and nothing worked, so I ended up asking it to create a script the user could double-click from the desktop to add the entries to crontab and that ultimately worked.

Under the Hood

Here’s what the entire script does:

  • Updates and upgrades Ubuntu
  • Sets hostname to match the custom Rivendell hostname: onair
  • Creates ‘rd’ user and adds user to sudo group
  • Sets up tmp directories for Rivendell auto-install in the new ‘rd’ user account
  • Backs up the virgin .bashrc file for recovery after final installation step
  • Redirects shell to working directory during install after su rd
  • Reboots system to apply Linux kernel updates and new hostname
  • Sets timezone
  • Installs tasksel if not already installed
  • Installs MATE Desktop using tasksel as root
  • Installs xRDP for remote desktop
  • Configures xRDP to use MATE
  • Sets MATE as the default session manager
  • Detects which version of Ubuntu (22 / 24) and invokes the Rivendell installation script for that version
  • Creates pypad file for Icecast and a text file to optionally send RD now and next meta to web, RDS, external app, etc
  • Installs broadcasting tools (Icecast, JACK, Liquidsoap, VLC, Stereo Tool) for processing, streaming and capturing LIVE Remote audio
  • Disables PulseAudio and configures audio priorities
  • Fixes QT5 XCB error – for RD utilities that need root in xRDP environment
  • Creates directories as ‘rd’ user
  • Moves APPS folder and sets permissions as ‘rd’ user
  • Moves desktop shortcuts as ‘rd’ user
  • Moves custom configs to make persistent Jack connections, audio processing, streaming and LIVE remote magic happen
  • Replaces default icecast.xml with custom icecast.xml and enables icecast to start automatically
  • Drops default tables and imports custom SQL backup with advanced features in Rivendell db
  • Extracts and injects Rivendell SQL password in nightly SQL backup script
  • Enables UFW firewall and opens ports for your WAN and/or LAN IP address(es)
  • Hardens SSH access to pubkey based login ONLY.
  • Restores original .bashrc for rd user after final step
  • Performs light housekeeping

TL;DR – Using the Script to Fully Automate Rivendell Installation with Advanced Features on a VPS

After running this script, you will have a fully functioning Rivendell v4 server in about 15 minutes, preconfigured out-of-the-box with Stereo Tool to process audio, liquidsoap to generate a stream, icecast to serve the stream to a remote server (stay tuned for Azuracast and BUTT setup, details ahead), Jackd2 and a dummy driver to route audio, QJackCTL to manage persistent jack connections, PyPad scripts to send now and next data to icecast2 and a text file, VLC to capture audio for LIVE remote broadcasts, a default Rivendell dropbox to import music, and finally, nightly SQL backups and auto log generation. You still need to build your own clocks, add them to the grid, import music, etc. Quick note: While Stereo Tool does an amazing job processing audio with the free version, I highly recommend buying a license for the advanced features.

This bash script has been optimized to work with Ubuntu 22.04 and Ubuntu 24.04 server on a cloud VPS or local VM. NOTE: It has been updated to address the changes to python in Ubuntu 24.04 that break pypad in Rivendell and fixes them automatically.

There are a million VPS hosts, and you can fire one up on your favorite, but what I love about DigitalOcean, is how clean and intuitive the UI is, how easy it is to take snapshots and weekly backups and how reliable it is. I use a few discount hosts that give you tons of resources for the $ for smaller projects, but they really suffer in connectivity and reliability. A Rivendell server that I based this entire script on, fed several commercial FM transmitters in Vegas with a 320Kbps stream directly from a DigitalOcean VPS for a few years. Honestly, at times, the server was more reliable than the transmitters. Wish I was kidding. 😅

TIP: If you haven’t picked a VPS host yet, and found this free article to be helpful, consider using DigitalOcean. You can even use my referral link to show your support. 🙏🏽

Start by hitting the “Create Droplet” button in your DigitalOcean Control Panel. To process audio, I recommend the following minimum VPS resources.

Don’t forget to add (or create new) SSH key in this section

Once your server is up and running, open a terminal and SSH in with your private key. Do the following to set a root password. After rebooting, you’ll need it when prompted, to install the MATE Desktop Environment.

passwd root

Now drop the following in your terminal to clone the repo and run the script. You’ll run the first steps as root (not sudo).

git clone https://github.com/anjeleno/Rivendell-Cloud.git ; cd Rivendell-Cloud ; chmod +x *.sh ; ./rivendell-auto-install.sh

After the script installs updates, it will guide you through setting a password for the new ‘rd’ user. Then it will ask you to reboot to apply the kernel update and new hostname.

When the system comes back up, log back in as root. Then, change users to rd and run the script again:

su rd
./rivendell-auto-install.sh

HEADS UP!

DO NOT run the script with sudo. Let the script prompt you for the password you set for the new rd (or root) user account when it needs to elevate permissions.

In the next step, use your arrow keys to select your geographic region, then tab to OK and hit enter.

Do the same to select the nearest major city to set the system clock. If you tap the letters corresponding to your choices, you can move through the list faster. In my case, tapping the “L” key several times brings up LA.

Tasksel needs to run as root to install the MATE Desktop Environment. Enter your ROOT password when prompted.

In the Package configuration screen, use your arrow keys to navigate and spacebar to select MATE, then tab to OK and hit Enter.

After MATE and xRDP are installed, the script will drop back to the normal user and ask you which Rivendell option you’d like to install.

After Rivendell finishes installing, the script will move on to installing icecast2. Debconf will ask if you want it to configure icecast2. Say no, because we’ll be replacing the default icecast config with our own. The custom config will create the mount point: /192 (a 192 Kbps stream with the artist and title meta injected). You can adjust this to suit your needs later. It also sets the default source and admin passwords used to access icecast admin and by liquidsoap to generate your stream(s).

When it asks if you want to enable realtime process priority, say yes. I’m not sure this really makes any difference since we’re not using a realtime kernel, but just in case.

At this point, the rest of the script flys through the remaining steps at warp speed.

Pay close attention to the final two steps. The script will prompt you for your IP address(es) to open ports in the firewall for you. If you’re working on a cloud VPS, enter your WAN (external) IP address.

If you’re working in a local VM, enter your LAN subnet: 192.168.1.0/24 (adjust to suit your network configuration). Or hit enter to skip your LAN. Once you’ve entered your IP address, hit “y” to apply the changes and enable UFW. We allow SSH from anywhere by default, but if you don’t enter an IP address, you won’t have access to xRDP.

The final step in hardening your security, is locking down your server to only allow SSH key login.

WARNING!

If you haven’t already added your SSH private key and confirmed that you can login with it, CHOOSE NO until you have, OR YOU WILL GET LOCKED OUT. Once you have, you can re-run the script and it will skip the previous steps and lock down SSH access.

Time for the final reboot! Then, you can login to the desktop with the RDP client of your choice.

  • Linux: Remmina RDP client
  • Mac OS: RDP client replaced by Windows App
  • Windows: built-in RDP client

Drop the IP address of your server and the password you created for rd into your RDP client to login.

¡Felicidades! You’re logged into a fully configured Rivendell Desktop

Now what? Start by double-clicking the icon to add the cronjobs mentioned earlier to your crontab. Once you’ve created your categories, built clocks and added them to the grid, you’ll need to generate 2 logs, and then one of the cronjobs will automatically generate a log every night beginning with the 3rd log and take a nightly SQL backup of the Rivendell db.

NOTE: If you’re using MusicMaster, Selector or other 3rd party music scheduler, you can remove the autologgen.sh entry with:

crontab -e 

Now, lets navigate to the APPS folder which lives in: /home/rd/imports

We need to edit a few things in the liquidsoap config to define the name of your station, etc. In a terminal, edit the following file…

nano ~/imports/APPS/radio.liq

OR… Right-click and open-with “Text Editor” to graphically edit radio.liq and replace Station Name, Your Slogan, genre, and (optionally) description between the “…” in the liquidsoap config. leave everything else as-is. Save and close.

NOTE: It’s a really good idea to change the icecast passwords used in this script. When you do, don’t forget to update the password in radio.liq and restart the system so it gets applied to both. Edit the passwords in the <authentication> section of the icecast.xml.

sudo nano /etc/icecast2/icecast.xml

Reboot the system to apply the changes to liquidsoap. When the system comes back up, double-click the “STL” icon to start liquidsoap and apply the persistent Jack connections to route audio everywhere it needs to go. It will also make the VLC connections persistent for LIVE broadcasts. For the engineering nerds (that’s a compliment) I’m calling it a Studio to Transmitter Link because this process will transport our audio to our Azuracast server (which we’ll cover shortly) as the public facing Transmitter.

Once the QJackCTL window opens, then double-click the Stereo Tool icon to finish connecting all the Jack patches. This will effectively route audio out of Rivendell, into Stereo Tool, and then send processed audio from Stereo Tool to the input of icecast.

NOTE: You can minimize it, but don’t close Stereo Tool or you’ll interrupt your audio path.

IMPORTANT NOTE: You need to perform these two steps (start STL and Stereo Tool) after every reboot to start your stream and reconnect the persistent Jack connections. I can already read your thoughts. “Why don’t you just automate these steps by editing the STL script and adding it to the Startup Applications?” I’ve tested it and the results are really inconsistent, so I don’t recommend it.

Your default Jack connections should look like this in the “Graph” section of QJackCTL. Even with the persistent Jack connections defined, sometimes “System Capture” tries to connect itself to the input of Stereo Tool. Just right click on the “System Capture” patches and choose “disconnect.”

Now that you know how to start the “STL” and what it does, let’s bring all the magic together to capture audio for LIVE remote broadcasts.

Making the Magic Happen: Capturing LIVE Audio for Remote Broadcasts

NECESSARY STEP!

The Rivendell server-side customization is already in place, but there’s a little extra leg-work involving Azuracast and BUTT to getting LIVE remotes on the air. Before continuing, first, we need to JUMP OVER HERE to configure your Azuracast “Transmitter.” Then, come back *here* to finish the process of getting LIVE remotes on the air! See you when you get back.

In RDLibrary, you’ll see 2 macro carts. One that turns a Remote ON and another that turns a Remote OFF. The way these macros are designed to work is based on the flow outlined below.

Azuracast Server: Create a second “station” in your Azurcast server — which this article assumes is already configured. This second “station” will be private. Mine is called “Relay Server” and that’s its only function. Enable the Streamers/DJs function, create credentials and grab the connection information in the “manage” Streamers/DJs section. You’ll use that info in the BUTT server settings to connect the remote audio as a streaming source using BUTT on the remote end. When this part is done, grab the streaming URL of your Relay Server.

Open VLC. CTRL+N to open a network stream and paste in your Relay Server stream URL and hit enter to connect.

As soon as VLC connects to your Relay Server as a “listener,” it’s already configured to automatically route the output of VLC to the input of the Rivendell Local Audio Adapter. But it won’t go over the air until you hit Remote ON.

Here’s the flow:

Let’s say you want to go into a remote after the song playing in cart DECK 1. The timing and where the elements are placed is important.

  • DECK 1: Currently playing song
  • DECK 2: Intro or Sweeper (semi-produced so it can lay over the incoming remote audio without train-wrecking).
  • HOTKEYS: Remote ON macro (see image below to add it to your Sound Panel / HOTKEYS)
  • Operating Mode: Switch to Manual
  1. During the song playing in DECK 1 (BEFORE YOU WANT TO GO INTO THE REMOTE) tap the big green “Automatic” mode button once, to put it in “Manual” mode. This prevents Rivendell from starting the sweeper before you’re ready or blowing through the rest of the log over the top of your remote (insert bad board-op memory here). 😭
  2. Watch the clock. When DECK 1 reaches :01…
  3. Tap the “Remote ON” HOTKEY (ONLY TAP IT ONCE — OR YOU’LL START THE NEXT ELEMENT IN THE LOG CAUSING A TRAIN-WRECK AND FUTURE BAD BOARD-OP MEMORIES!!)

This macro cart will fire your Remote Intro or sweeper — cued up in DECK 2, capture the Local Audio Adapter, and route the output through the RDAirPlay input, all in a single click.

NOTE: As a habit, I like to make sure the “No Fade Out on Segue” option is checked on ALL IMAGING. This prevents the intro from fading out before it reaches the end of audio, while our macro is running, otherwise, it could get cut off early. Find it by double-clicking any/all imaging cart(s) and then tapping the “Edit Markers” button on each cut inside the cart(s).

Vámonos! Your LIVE remote is ON THE AIR! No Marti necessary 😆 You only need an audio source, an audio interface, a laptop, and quality internet on the remote end, your Azuracast Relay Server in the middle and you’re good to go!

You can literally login to the Rivendell desktop and board-op your own remote (I have) live on location.

Going into stop-sets or ending a remote, cue the log to the next element — usually a Promo.

  1. Switch from Sound Panel (HOTKEYS) back to “Main Log” at the bottom of RDAirPlay
  2. Tap to highlight the element you want to cue up
  3. Hit the “Make Next” button
  4. Switch back to the Sound Panel.
  5. When you’re ready, tap the Remote OFF hotkey. This will fire the next element, drop the Local Audio Adapter, and put RDAirPlay back into Automatic mode, all in one click!

Rinse, and repeat as necessary.

SIDE NOTE: I’d love to get this working from the log instead of a hotkey, but never got it to work cleanly. If anyone has managed to do it from the log gracefully, please let me know in the comments or the Rivendell dev email list!

Teach Rivendell Neat Tricks!

These next tricks are optional and beyond the scope of the script, because they require you to create accounts before you can integrate them, but they extend and dramatically improve the productivity, efficiency, and security of a Rivendell network.

Let’s isolate Your Rivendell Network with a VPN.

Tailscale is wild, because it makes it dead simple to create a mesh VPN layer on top of your existing network. Adding machines you want to grant access to your Rivendell network and managing them is easy-peezy. This reduces the surface exposure of your cloud VPS from the public internet.

It also means you can give Rivendell clients on remote networks access. You could set up a remote voice-tracking workstation, a production machine at home, a Raspberry Pi for your remote kit, a backup server at the transmitter, and they can all connect to your Rivendell server like they’re on the same physical network. Mind. Blown. 🤯

Caveat: The only real limitation is the speed of the internet on both ends. Depending on your ISP, you could experience major delays loading RDLibrary, for example.

Create a free Tailscale account (on the free plan, you can have 3 users and up to 100 devices). Download and install the app for the machine you’re working from. Then go into account settings in your Tailscale console and generate an Auth key. Make a note of your auth key to add your Rivendell machine to your “Tailnet” in the next step.

We’ll add your Rivendell server to your Tailnet in 3 easy commands.

curl -fsSL https://tailscale.com/install.sh | sh

sudo tailscale up --auth-key=tskey-auth-[replace-everything-beginning-with-tskey-auth-with-your-actual-auth-key]

sudo ufw allow in on tailscale0

Once you’ve added the rule to UFW, every machine on your tailnet has access without doing anything else, or updating external IP addresses, etc. Just make sure that your laptop (or machine you’re working from) is connected. Your Rivendell machine will stay on the tailnet (see below) but if you disable the Tailscale app on your laptop for example, you won’t be able to connect — until you re-enable it — which is a simple toggle in the Tailscale app.

Now, when your WAN IP changes, you’ll never need to update UFW again, because it’s independent of your IP address. This also makes DDNS on your LAN obsolete for anything that doesn’t need public access.

MUY IMPORTANTE: The final step to ensuring your Rivendell server stays on your tailnet VPN indefinitely, is to head back to Machines in your Tailnet console and disable key expiry (for each machine). Otherwise, you have to re-authorize each machine every 180 days — which is good for security, but bad for retaining connectivity with a trusted but headless remote server. Just tap the ellipses (…) in the right-hand column of each machine and choose “Disable key expiry.” You can always boot out a machine from the console, if necessary.

Since we’ve added a rule to allow all from our tailscale0, you can actually remove the allow SSH rule from UFW so port 22 isn’t exposed anymore. Azuracast runs inside a docker container, and mine is on the air, so I haven’t tested it yet, but In theory, if your Azuracast server is in your tailnet, you might be able to remove port 8000 from UFW as well, effectively closing all ports from the public internet. Exposure would be limited to ONLY the machines in your tailnet making your Rivendell VPS virtually invisible from the outside world. Dun dun dunnnnnnn 🤔

sudo ufw delete allow ssh

IMPORTANT NOTE: Don’t be alarmed if you tried connecting and couldn’t. Now that you’ve deleted the SSH rule from UFW, you won’t be able to connect to your server by its IP address anymore. You’ll need to use the tailnet hostname — which usually mirrors the actual hostname — in our case onair — if you didn’t change the hostname in your Tailscale console. This forces your connection to use the tailnet VPN layer on your network.

The SSH config entry for my Rivendell server in ~/.ssh/config looks like this:

sudo nano ~/.ssh/config

Host onair #this is the nickname for this entry
    Hostname onair #this is the tailscale host replacing the server IP
    IdentityFile ~/.ssh/letmein_ed25519 #my private key
    IdentitiesOnly yes
    User root

So instead of using ssh root@123.456.789.0 to connect, open a terminal and enter:

ssh onair

Let’s Give Rivendell Dropboxes Superpowers

Rivendell “dropboxes” — not to be confused with the Dropbox App — are super useful to import audio mapped to local directories listening for files. You could use samba or NFS to mount a remote directory to sync with Rivendell dropboxes, but there’s a much easier way.

If you have a Dropbox account, the app isn’t as well supported or maintained on Linux, so I don’t recommend it.

Which leads us to pCloud. It’s been my go-to solution since 2018. It’s cross-platform and has native Linux apps that are actively developed and maintained. It basically creates a conduit between any remote computer logged in with the pCloud app and your Rivendell server. This is helpful if you work on Linux, MacOS and Windows, like I do, and need flexibility.

They have a free plan that comes with 2GB of storage — but if you decide to go with a paid plan, thank you, in advance, for using my pCloud link 🙏🏽

One massive benefit, pCloud offers lifetime plans. Pay once and keep forever. I’m up to 4TB and will probably add another 2TB this year. As part of my recovery strategy, I keep a backup of the active library /snd in pCloud and can easily restore (and already have) in the event of a catastrophe.

After you create your pCloud account, download and install the apps on the machines you work from and on your Rivendell server. pCloud will mount as an external drive on the computers.

To upload audio to Rivendell from your laptop: Open the “Sync” tab of the pCloud app on your Rivendell server.

  1. Tap “Add New Sync.”
  2. In the window that pops up, tap “Choose Device Folder” and select the “Music” folder in the /home/rd directory and hit “OK.”
  3. Then, tap “Choose pCloud Folder” and choose “My Music” (obviously, you can choose any folders you want, but these are a logical place to begin).
  4. Then, tap the “Add Sync” button to finish.

BE ADVISED: This will SYNC those folders, so if you delete a file (inside those specific folders) on one computer, they will get deleted from both. The default Rivendell music dropbox is set to delete after import, which means ANY file uploaded will also get deleted from the synched folders. If you want to keep the original file you’re importing, make sure you COPY the file into pCloud/My Music on your device (DON’T MOVE) the file.

Now, just COPY the elements you want to import into Rivendell into the shared pCloud/My Music directory on your laptop and a few moments later, they will get automatically imported into Rivendell (and then DELETED).

Now, you have a direct conduit from your local device to import audio automatically into Rivendell. An entire library will take time, because it has to sync to the cloud before it’s pulled down to Rivendell, but it’s still faster than dubbing carts! 🤪

Repeat this process for Imaging, Spots, News or anything else you want to import into specific categories (or carts). You can create category specific subfolders and syncs in pCloud. Duplicate the existing Rivendell music dropbox and edit the parameters to match each pCloud sync.

The true power of Rivendell dropboxes with pCloud syncs can’t be overstated. Among other things, I have individual dropboxes and pCloud syncs configured for Mixshows. Each mixshow gets automatically imported into specific hourly CARTS and updates the meta every week. You can edit the meta in Adobe Audition, so the start and end dates are also imported. This is a massive time saver!

Leave a Reply

Your email address will not be published. Required fields are marked *