Skip to content
Netbots
Visit Netbots on GitHub
Set theme to dark (⇧+D)

Server Deployment Instructions

You may use any cloud platform like DigitalOcean, AWS EC2, GCP, Azure or even a home server to deploy this bundle.

  1. Package Installation:
  • Create a catkin workspace
    mkdir -p ~/catkin_ws/src
    cd ~/catkin_ws/src/
  • Clone the repo into catkin_ws/src
    git clone https://github.com/whomihirpatel/4G-Networked_Robots.git
    cd 4G-Networked_Robots
    git submodule update --init
  • Build the workspace and activate it
    cd ~/catkin_ws/
    catkin_make
    source ~/catkin_ws/devel/setup.zsh
  1. Web Hosting:
  1. VPN Hosting:
  • Installation instructions for VPN Server can be hound here and here
  • Make sure to generate a unique client certificate for each robot and assign a static tun0 IP for each client.
  • update the server.conf to allow inter-client communication and allow static IP assignment by adding following lines:
    ifconfig-pool-persist ipp.txt
    client-to-client
    push "route 192.168.4.0 255.255.255.0"
  1. Front-end

Connecting Robots to the server

  • If you are using robots connected to wifi and can allow incoming web-socket traffic to your robot, you may skip to next step

  • If you are using robots conencted to cellular network or have incoming traffic blocked on your wifi, you may to connect to the server via VPN tunnel and route the traffic on the server.

    • Generate a unique CA certificate for your robot. Detailed instructions here
    • edit the ipp.txt file in openvpn directory and add name of your CA authority (i.e. name you used in unique CA certificate), followed by desired/available static ip.
      sample,10.8.0.4,fddd:1194:1194:1194::1001
    • Route the VPN traffic from server port to VPN device port using command
      sudo iptables -t nat -A PREROUTING -p tcp --dport 10101 -j DNAT --to-destination 10.8.0.4:9090
    • Though it is advised to block external ports using sudo ufw enable and use NGINX to reverse-proxy all traffic through port 80.
      • In that case front-end will communicate with individual robots via port 80 insted of any other server port.
      • Make a nginx .conf file which reverse-proxy the external traffic to localhost. A sample robot_name.conf is provided in nginx_scripts folder.
  • Now both, your server and robots are ready!

Author: Mihir Patel