# Setup Libretime production server- Rabbitmq and Liquidsoap errors

**URL:** <https://discourse.libretime.org/t/setup-libretime-production-server-rabbitmq-and-liquidsoap-errors/112>\
**Category:** Get Help\
**Created:** [March 3, 2018, 5:01pm UTC](https://discourse.libretime.org/t/setup-libretime-production-server-rabbitmq-and-liquidsoap-errors/112 "2018-03-03T17:01:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoaoHerberto](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@JoaoHerberto](https://discourse.libretime.org/u/JoaoHerberto)\
**Post date:** [March 3, 2018, 5:01pm UTC](https://discourse.libretime.org/t/setup-libretime-production-server-rabbitmq-and-liquidsoap-errors/112/1 "2018-03-03T17:01:04Z")

</div>

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.

 ![Selection_179](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/6108edb088b50bfa3edf40ecd8475a63777c117a.png)

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](http://everywhere.here)**

16. The first screen for database leave as is!

17. 

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

19. 

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

21. ![Selection_174](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/1a6232aede23fb8310b561ec5ccd1df01f1e264a.png)

22. Media settings leave as is.

23. ![Selection_175](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/1faa13849e16da852121d277fd10781c9cebb144.png)

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

25. 

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

 ![Selection_177](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/5985ffa3f1a3da4b71d904a0b7d854c0aefda437.png)

This also fixes the Calendar, Podcast, Menu icons missing issue!  
 ![Selection_178](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/08e2312211b45f9aec9de470bda02909f6df13d6.png)

Optional is to change the streams URL from IP address to the domain name under the "[http://everywhere.here/preference/stream-setting](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](https://github.com/LibreTime/libretime/issues/333)

That should do it!

---

<div class="post-metadata">

**Author:** ![frecuencialibre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/frecuencialibre/32/102_2.png) [@frecuencialibre](https://discourse.libretime.org/u/frecuencialibre)\
**Post date:** [September 20, 2018, 2:33am UTC](https://discourse.libretime.org/t/setup-libretime-production-server-rabbitmq-and-liquidsoap-errors/112/2 "2018-09-20T02:33:05Z")

</div>

thanks for your post Joao!

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

/etc/hosts:

```auto
127.0.0.1 localhost mybaseurl.org

```

and then hostname:

```auto
mybaseurl.org

```

we’re having [problems](https://github.com/LibreTime/libretime/issues/520) with rabbitMQ and I wonder if it could be caused by not correctly resolving the domain.  
thanks!  
-ryan

---

<div class="post-metadata">

**Author:** ![frecuencialibre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/frecuencialibre/32/102_2.png) [@frecuencialibre](https://discourse.libretime.org/u/frecuencialibre)\
**Post date:** [September 25, 2018, 6:33am UTC](https://discourse.libretime.org/t/setup-libretime-production-server-rabbitmq-and-liquidsoap-errors/112/3 "2018-09-25T06:33:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JoaoHerberto](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@JoaoHerberto](https://discourse.libretime.org/u/JoaoHerberto)\
**Post date:** [September 25, 2018, 1:13pm UTC](https://discourse.libretime.org/t/setup-libretime-production-server-rabbitmq-and-liquidsoap-errors/112/4 "2018-09-25T13:13:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JoaoHerberto](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@JoaoHerberto](https://discourse.libretime.org/u/JoaoHerberto)\
**Post date:** [September 25, 2018, 1:22pm UTC](https://discourse.libretime.org/t/setup-libretime-production-server-rabbitmq-and-liquidsoap-errors/112/5 "2018-09-25T13:22:29Z")

</div>

Also verify your airtime settings in /etc/airtime/airtime.conf ![Selection_309](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/60a54a55de475127a9b3d6e39d1c6d47807580ce.png)
