YCCaster is a multi platform NTRIP caster designed to work as part of modern web applications. In this tutorial, we’ll discuss how to install YCCaster on your Ubuntu 20.04 server, adjust the firewall, configure access rights for bases and rovers, and set up monitoring.
Initial server setup
First of all, we need a virtual server on Ubuntu 20.04. Since our caster is quite lightweight, a minimal Linux server from Linode or DigitalOcean will work. I recommend these hosting providers for their newbie friendliness and reasonable pricing.
For the purposes of this tutorial, I will be using a virtual server from Linode. If you do not have an account, you need to register. Then log into your account and create a new server.
To install the caster, we need to establish an ssh connection to our server. The easiest option is to use the Linode LISH console, the terminal will open in a new browser window. If you are using Linux or MacOS, open your terminal and establish an ssh connection. To log in, you will need the password that was set when creating the server.
For security reasons, it is better to run caster with non root user permissions. For this we will create a separate user.
Then download caster from YCCaster website to a new folder and make it executable.
mkdir -p /var/caster && wget https://yccaster.s3.eu-central-1.amazonaws.com/bin/1.0.1/linux-amd64/yccaster -O /var/caster/yccaster && chmod +x /var/caster/yccaster
Generate initial config file.
cd /var/caster && ./yccaster init
Now we are ready to launch the caster but to work in the background it needs a linux service that will launch the caster if the server restarted or if the caster crashed. To create the service, execute this command.
cat << EOF > /etc/systemd/system/caster.service
Then enable caster service.
systemctl enable caster.service
And start caster
systemctl start caster.service
Now the caster is up and running. To check it, you can use this command.
systemctl status caster.service
It should display active status
root@localhost:/var/caster# systemctl status caster.service
● caster.service - YCCaster
Loaded: loaded (/etc/systemd/system/caster.service; enabled; vendor preset>
Active: active (running) since Thu 2021-09-02 05:41:54 UTC; 8s ago
Main PID: 16298 (yccaster)
Tasks: 5 (limit: 1040)
Sep 02 05:41:54 localhost systemd: Started YCCaster.
lines 1-10/10 (END)
Now when the caster is running we can test it and establish a connection between base and rover. To emulate base and rover I will use YCServer. It is an NTRIP server and client application for Android. You can download it from the play market.
I will use two instances of YCServer (probably, you will need two phones to run them simultaneously).
First instance will generate fake data and act as a base station. Second instance will act as a rover, receive data from the caster and save it to file.
Base and rover Authorization
The caster that we launched does not check passwords for connecting bases and rovers. Everyone can connect to it and transmit and receive data. If we need to restrict access and allow only authorized clients to exchange data, we need to change the configuration file and add the following section to it:
- type: file
In this section, we stated that authorization will be based on files and that the
mountpoints.yml file will be used to authorize base stations and clients.yml for rovers
Create a new mountpoints.yml file in the same directory as the configuration file.
- mount-point: NICOSIARTKBASE
format: RTCM 3.2
generator: u-blox zed-f9p
misc: Nicosia district base
- mount-point: PAPHOSRTKBASE
format: RTCM 3.2
generator: u-blox zed-f9p
misc: Paphos district base
In this file, we have specified 2 mount points. In addition to the name and password, you can specify a description of the stream, which will be used to generate the NTRIP SOURCETABLE.
Next, let's create the clients.yml file in the same directory.
- username: firstrover
- username: secondrover
- username: thirdrover
In it, I indicated the names of 3 rovers and their passwords.
In order for the changes to take effect, you need to restart the caster.
systemctl restart caster.service
Now only the base stations and rovers listed in the corresponding files will have access to the caster.