Introduction
In this guide, we will walk you through how to set up YouCORS NTRIP caster on an Ubuntu 18.04 VPS. During this process, you’ll learn how to config caster and run it in production environment.
Prerequisites
Before you begin this guide, you should have an active Enterprise plan and a user with sudo privileges configured on your server.
Step One — Create a new caster
Login to YouCORS web application, click Create button and select caster option:
Fill up form and click save button:
Then click edit button and show key button:
Copy caster key, you will need it later.
Step two — Server set up
SSH to your server and create caster directory:
mkdir /var/caster
Visit caster binaries tread in the forum and copy link. Then download binaries with wget:
wget https://help.youcors.com/helpdesk/attachments/36047389088
Install unzip and unzip files:
apt install unzip unzip 36047389088
Copy Linux version to /var/caster
cp yc-caster-linux-amd64 /var/caster
Create .env file and copy the caster key that you get on the first step
touch /var/caster/.env echo "KEY=c38cee3f8065e38a87c58bf4237c434a" > /var/caster/.env
Cd to caster dir and run it.
cd /var/caster ./yc-caster-linux-amd64
If caster started successful, you will see output like this:
2019/10/06 17:04:13 Connecting to wss://wss.youcors.com:443/socketcluster/ 2019/10/06 17:04:13 Successfully connected 2019/10/06 17:04:13 Listening for commands from wss 2019/10/06 17:04:13 onConnect event action 2019/10/06 17:04:13 onSetAuthentication event action 2019/10/06 17:04:13 Subscribe to users channel 2019/10/06 17:04:13 Start caster 2019/10/06 17:04:13 Listening NTRIP connections on port: 2101 2019/10/06 17:04:13 Send onCasterReady event 2019/10/06 17:04:13 Subscribe to wss channel
Congratulations, your new caster is up and running.
Step three — Set up NTRIP caster as Linux service
Create caster service:
nano /lib/systemd/system/caster.service
Copy:
[Unit] Description=YCCaster ConditionPathExists=/var/caster/yc-caster-linux-amd64 After=network.target [Service] Type=simple User=caster Group=caster Restart=on-failure RestartSec=10 WorkingDirectory=/var/caster ExecStart=/var/caster/yc-caster-linux-amd64 PermissionsStartOnly=true ExecStartPre=/bin/mkdir -p /var/log/caster ExecStartPre=/bin/chown syslog:adm /var/log/caster ExecStartPre=/bin/chmod 755 /var/log/caster StandardOutput=syslog StandardError=syslog SyslogIdentifier=caster [Install] WantedBy=multi-user.target Alias=caster.service
Create new user:
useradd caster -s /sbin/nologin -M
Add permissions:
chmod 755 /lib/systemd/system/caster.service
Enable caster run on system boot:
systemctl enable caster.service
Config Syslog:
journalctl -f -u caster nano /etc/rsyslog.d/30-caster.conf
Copy:
if $programname == 'caster' or $syslogtag == 'caster' then /var/log/caster/caster.log & stop
Restart syslog and run caster:
systemctl restart rsyslog systemctl start caster