Setup Libretime production server- Rabbitmq and Liquidsoap errors

I would like to share some tips on setting up a production server using a FQDN (Fully Qualified Domain Name). I would like to thank Robbt especially for helping me out, very much appreciated!
Now, if you are just going to run the server under the IP address only, then this will not really apply to you, this is only for those that wish to use the servers Radio Page as the front end to their end users.

My produtcion server is hosted on Digital Ocean, I switched from Amazon AWS and coundn’t be happier, so much easier to administer!

At any rate, Digital Ocean recently upgraded their plans by bumping memory and disk space for existing plans at no additional cost. The upgrade went fine, except that I could no longer upload files on Libretime!
After two months of tinkering here and there, last week I decided to pull up my sleeves and figure this out, and I am hoping this will help someone else.

The main issue was that the host name had changed on the server because the Droplet (Digital oceans term for VPS) had changed to reflect the new configuration of the server. Now, renaming the Droplet is simple, and it will automatically also rename the hostname of the server and server hosts entry. This created havic with raqbbitmq, never ending errors of “could not connect to message que” etc. The problem is rather simple, don’t rename your server! I recommend doing the following when doing a fresh install on a production server.

I found that almost all of my issues with Liquidsoap, RabbitMQ was with running the server using a FQDN.
Now, the Host name does not necessarily need to be the same as the domain name, but I recommend it be so.

Depending on your server, be sure these ports are open, I am not really sure about 25672 but I have it open for now.

  1. If you want to rename your server/host NOW IS THE TIME, you can edit /etc/hostname and /etc/hosts, they both must match!

  2. First, point your domain or subdomain to the server you are planning to use 24hrs in advance of installing Libretime, this will save all sorts of headaches because the DNS servers will have propagated the changes and your domain will be accessable. For example, if your server address is 54.58.61.94 and your domain is everywhere.here then you must go to your domain host and point everywhere.here to 54.58.61.94.

  3. Assuming your server is a fresh copy of Debian 8.10, and you have root access via ssh, first thing is to create a sudo user. as root, type: adduser <newuser> replace newuser with new name (example: adduser john).

  4. Then give john sudo access by typing usermod -aG sudo john replace “john” with your acutal user name.

  5. Now you should have a new user with sudo permissions, and it is recommended that everything should be done with a user other than root.

  6. Now, switch from root to your new user by running su john

  7. Now run any updates, sudo apt update

  8. Then run upgrades sudo apt upgrade

  9. By default, when you switch to your user, you are still in the root directory, so move yourself over to your new home directory by typing cd ~/

  10. Now you should be in John’s home directory,

  11. In your home directory, create a new directory called installs by typing mkdir installs then switch to it by typing cd installs

  12. Install git, sudo apt install git

  13. Now download libretime from git by running: git clone https://github.com/LibreTime/libretime.git once installed, switch to it by typing cd libretime.

  14. Now run the Libretime installer by typing sudo ./install -fiap everything should be installed for you, it may take a while.

  15. After a successful install, open your browser but DO NOT use the the ip address to finish the install, instead type your domain address instead. In this example, http://everywhere.here

  16. The first screen for database leave as is!

  17. RabbitMQ Settings, click “Advanced” and change the Host to your domain, in this case everywhere.here.

  18. Webserver host, also change to your domain name, in this case everywhere.here

  19. Selection_174

  20. Media settings leave as is.

  21. Selection_175

  22. Run each command to start services as indicated, then press done! Copy each line and paste it into your terminal.

If all goes well, when you click Done, you should see this!

This also fixes the Calendar, Podcast, Menu icons missing issue!
Selection_178

Optional is to change the streams URL from IP address to the domain name under the "http://everywhere.here/preference/stream-setting, I recommend changing them, but it will work either way.

Lastly, you must harden your server by changing all of the default passwords, I recommend using this guide: https://github.com/LibreTime/libretime/issues/333

That should do it!

2 Likes

thanks for your post Joao!

specificially how should hosts and hostname files end up? like this?

/etc/hosts:

127.0.0.1  localhost mybaseurl.org

and then hostname:

mybaseurl.org

we’re having problems with rabbitMQ and I wonder if it could be caused by not correctly resolving the domain.
thanks!
-ryan

looks like docker can add fqdn config: https://github.com/ned-kelly/docker-multicontainer-libretime/blob/6589fda67189647dd18a284b137806262b05febd/docker-compose.yml#L97

On my server, which is still running perfectly, it is set up like this;
127.0.1.1 hostname hostname
127.0.0.1 localhost

my actual settings:
127.0.1.1 radiolrm radiolrm
127.0.0.1 localhost

my host name in /etc/hostname is radiolrm

But my servers domain name is a subdomain of my main site, so I have a DNS record pointing from my server to the radio server. So, I am not sure what other changes may be needed, but I really can’t see any. I mean, as long as you have the domain pointing to the server, it should work.

My server is being hosted by Digital Ocean and the Dropplet name must be the same as the hostname, in case that helps.

Also verify your airtime settings in /etc/airtime/airtime.confSelection_309