Tag: centovacast

  • CentovaCast change MySQL password

    CentovaCast is a control panel to manage online streaming services. It support shoucast, liqudsoap and icecast streaming servers.

    To change MySQL Password in CentovaCast, update following files.

    /usr/local/centovacast/etc/centovacast.conf
    

    You will see something like

    # Enter your database connection information.
    DB_NAME=centovacastdb
    DB_USER=centovacast
    DB_PASS=MySQLPasswordHere
    DB_HOST=localhost
    

    Following files is auto generated, this file also contain MySQL login details

    /usr/local/centovacast/system/autoconfig.php
    

    See CentovaCast

  • Upgrade centovacast

    To upgrade centovacast installation, run

    /usr/local/centovacast/sbin/update
    

    centovacast

    If you don’t want to upgrade shotcast/icecast/luquidsoap, you can run

    for f in /usr/local/centovacast/etc/update.d/80*; do mv ${f} ${f}.disabled; done
    

    This will disable updating these services. Sometimes newer version need a differnt config file, so maybe disabling updating these helps.

    [root@centos7 ~]# cd  /usr/local/centovacast/etc/update.d/
    [root@centos7 update.d]# ls -la
    total 56
    drwxr-x---. 2 root centovacast 4096 Dec  3 08:50 .
    drwxr-x--x. 8 root centovacast 4096 Aug 17 01:03 ..
    -rw-r-----. 1 root centovacast  117 Nov 18  2019 01_cc-common.update
    -rw-r-----. 1 root centovacast  134 Nov 16  2019 30_cc-app.update
    -rw-r-----. 1 root centovacast  105 Jun  2  2017 35_cc-imaged.update
    -rw-r-----. 1 root centovacast  109 Sep 13  2019 35_cc-web.update
    -rw-r-----. 1 root centovacast  114 Apr 28  2015 40_cc-comet.update
    -rw-r-----. 1 root centovacast  129 Feb  7  2017 50_cc-control.update
    -rw-r-----. 1 root centovacast  110 Jun  2  2017 75_cc-ftpd.update
    -rw-r-----. 1 root centovacast  100 Oct  2  2015 80_cc-icecast.update.disabled.disabled
    -rw-r-----. 1 root centovacast  109 Dec 26  2016 80_cc-liquidsoap.update.disabled.disabled
    -rw-r-----. 1 root centovacast  108 Apr 14  2014 80_cc-sctrans2.update.disabled.disabled
    -rw-r-----. 1 root centovacast  109 Apr 14  2014 80_cc-shoutcast1.update.disabled.disabled
    -rw-r-----. 1 root centovacast  109 Apr 28  2015 80_cc-shoutcast2.update.disabled.disabled
    [root@centos7 update.d]#
    

    Updating centovacast

    [root@centos7 ~]# /usr/local/centovacast/sbin/update
    
    Checking Centova Cast Common Files ...
    Downloading Centova Cast Common Files ...                                     
    
    Verifying archive integrity ...                                               
    Unpacking archive ...
    
    Installing Centova Cast Common Files ...
    
    Failed to execute operation: Connection timed out
    Failed to start centovacast.service: Connection timed out
    See system logs and 'systemctl status centovacast.service' for details.
    Installation successful
    
    Checking Centova Cast Application Server ...
    Downloading Centova Cast Application Server ...                               
    
    Verifying archive integrity ...                                               
    Unpacking archive ...
    
    Installing Centova Cast Application Server ...
    
    Stopping any existing Centova Cast web service ...
    Attempting to stop web: cc-web 
    Stopping any existing Centova Cast application server service ...
    Attempting to stop app: cc-appserver 
    Upgrading database ...
    OK
    Installation successful
    Starting Centova Cast application server service...
    Attempting to start app: cc-appserver 
    Re-starting Centova Cast web service ...
    Attempting to start web: cc-web 
    
    Checking Centova Cast Image Daemon ...
    Not updated, skipping                                                         
    
    
    Checking Centova Cast Web Server ...
    Downloading Centova Cast Web Server ...                                       
    
    Verifying archive integrity ...                                               
    Unpacking archive ...
    
    Installing Centova Cast Web Server ...
    
    Stopping any existing Centova Cast web service ...
    Attempting to stop web: cc-web 
    Installation successful
    Starting Centova Cast web service...
    Attempting to start web: cc-web 
    
    Checking Centova Cast Comet Daemon ...
    Not updated, skipping                                                         
    
    
    Checking Centova Cast Control Daemon ...
    Not updated, skipping                                                         
    
    
    Checking Centova Cast FTP Server ...
    Not updated, skipping                                                         
    
    [root@centos7 ~]# 
    

    See Centovacast

  • CentovaCast Enable SSL for shoutcast

    To enable SSL for stream, you can use nginx reverse proxy.

    In this case, i have a stream available on

    http://my-domain.com:8000/index.html?sid=1

    I want to make it available using SSL at

    https://my-domain.com:9000/index.html?sid=1

    The port will need to be differnt as you can’t run both HTTP and HTTPS on same port. So i used Port 8000 here. All traffic to this port using HTTPS will be forwarded to HTTP port. To do this install nginx

    yum install nginx
    

    Add a virtual host configuration at

    vi /etc/nginx/conf.d/port8000.conf 
    

    with following content

    server {
        listen       8000 ssl;
        server_name  your-domain.com;
        root         /usr/share/nginx/html;
        ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;
        # include /etc/letsencrypt/options-ssl-nginx.conf;
        # ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
        proxy_read_timeout 600s;
        location / {
            proxy_set_header X-Real-IP  $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_set_header Host $host;
            proxy_pass http://YOUR_IP_HERE:8000;
        }
    }
    

    Now restart nginx

    systemctl restart nginx
    

    Auto restart Nginx

    Since we used free LetsEncrypt SSL for the domain, you will need to auto restart Nginx. This can be done by adding a cronjon

    @weekly systemctl restart nginx
    

    You may also need to add cronjob for renewing SSL, this you can find at https://serverok.in/letsencrypt. In case of CentovaCast, SSL is managed by CentovaCast, so you need to worry about auto renewing SSL certificate.

  • CentovaCast Enable SSL on icecast

    Before you can get SSL work, you need to compile icecast with SSL. If icecast is not installed with SSL support, it will ignore settings and just serve the stream using non HTTPS.

    To install Icecast with SSL support, download Icecast from

    https://icecast.org/download/

    cd /usr/local/src
    wget http://downloads.xiph.org/releases/icecast/icecast-2.4.4.tar.gz
    tar xvf icecast-2.4.4.tar.gz
    cd icecast-2.4.4
    ./configure --prefix=/usr/serverok/icecast --with-curl --with-openssl
    

    You need to verify SSL supported enabled. If you don’t have SSL support, you will see following error.

    configure: SSL disabled!
    

    If SSL enabled, you can verify it with

    grep lssl config.status
    

    You will see something like

    [root@vmi173436 icecast-2.4.4]# grep lssl config.status
    S["XIPH_LIBS"]=" -lssl -lcrypto  -lcurl   -lspeex  -ltheora  -lvorbis -logg  -L/usr/lib64 -lxslt -lxml2 -lz -ldl -lm "
    [root@vmi173436 icecast-2.4.4]# 
    

    If you get SSL disabled message, you need to install openssl-dev package

    yum install -y openssl-devel
    

    If SSL enabled, install icecast with

    make
    make install
    

    Replace icecast provided with CentovaCast with

    mv /usr/local/icecast/bin/icecast /usr/local/icecast/bin/icecast-old
    ln -s /usr/serverok/icecast/bin/icecast /usr/local/icecast/bin/icecast
    

    Enable SSL for stream

    You need to edit icecast config for each user to do this. Config file stored at

    vi /usr/local/centovacast/var/vhosts/USERNAME_HERE/etc/server.conf
    

    Find

            8005
    

    Replace with

    	
    		8005
    	
    
    	  
    		9005   
    		1
    	
    

    Here port 8005 is whatever port used by the stram. 9005 can be any unused port. It is better just use a port same format, so you know what port SSL will be running on.

    Find

    var/run/server.pid
    

    Add Below

        /usr/local/centovacast/etc/ssl/icecast.pem
        ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
    

    Now create a file

    vi /usr/local/centovacast/etc/ssl/icecast.pem
    

    Paste your SSL in following order

    1) Your private key
    2) Your SSL cert
    3) CA Bundle
    

    Change owner of the SSL cert file

    chown ccuser:ccuser /usr/local/centovacast/etc/ssl/icecast.pem
    

    Stop and start icecast in CentovaCast.

    Here is a server.conf file for a user with SSL enabled.

    https://gist.github.com/serverok/57ae398bb94aa61d9945f2405c73e221

    See Centova Cast

  • centovacast

    Install Paid SSL on Centova Cast
    Install LetsEncrypt Free SSL on Centova Cast
    CentovaCast Enable SSL on icecast
    CentovaCast Enable SSL for shoutcast
    Manually run icecast on CentovaCast server
    Upgrade CentovaCast
    CentovaCast change MySQL password

    mp3 files stored in folder

    /usr/local/centovacast/var/vhosts/USER/var/spool/media/
    

    Login url

    http://IP_ADDR_OR_DOMAIN:2199
    

    When user connect with FTP, he will see files from folder /usr/local/centovacast/var/vhosts/USER/var/spool/

  • Install SSL on Centova Cast

    Install SSL on Centova Cast

    centovacast

    Edit file

    vi /usr/local/centovacast/etc/cc-panel.conf
    

    Find

    listen 2199 default ssl;
    

    Add below

    listen 443 ssl;
    listen 80;
    

    Restart Centova Cast

    /usr/local/centovacast/centovacast restart
    

    At this point, you will be able to access Centova Cast on port 80 at

    http://YOUR_SERVER_IP/login/index.php
    

    To install LetsEncrypt Free SSL certificate, run

    /usr/local/centovacast/sbin/setssl letsencrypt YOUR-DOMAIN.EXTN
    

    Restart Centova Cast

    /usr/local/centovacast/centovacast restart
    

    Now you will be able to access Centova Cast using HTTPS.