Installing Remote Connections for Linux OSes

Created by Tim Kefford, Modified on Fri, 6 Feb at 11:25 AM by Tim Kefford

The Remote Connections Agent enables secure remote access to your Morbit Hub device. It runs as a background service and establishes a secure tunnel so you can manage your Hub remotely from the Morbit Studio portal.

Prerequisites

Before installing the Remote Connections Agent, ensure:

  • Morbit Hub is installed and running on the device.
  • The device has a Hub Key registered in the Morbit portal (generated automatically during Morbit Hub setup).
  • Remote Connections is enabled for your Hub in the Morbit portal.
  • You have root/sudo access on the device.
  • The device has an active internet connection.

Supported Architectures

Architecture

Examples

x86_64 (amd64)

Standard PCs, servers, Intel/AMD

ARM64 (aarch64)

Raspberry Pi 4/5 (64-bit OS), AWS Graviton

ARM 32-bit (armv7l)

Raspberry Pi 3 (32-bit OS), older ARM boards

Installing the Remote Connections Agent

Run the following command on your device:

curl -fsSL https://morbit-files.s3.eu-west-1.amazonaws.com/linux-installer/enable-remote-connections.sh | sudo bash
Bash


The installer will:

  1. Check for an existing Morbit Hub installation.
  2. Detect your device architecture and download the appropriate agent.
  3. Read your Hub Key from the Morbit Hub configuration.
  4. Download the tunnel configuration from the Morbit portal.
  5. Install and start the agent as a systemd service.

Once complete, you will see a success message confirming the agent is running.

Reinstalling

If the agent is already installed, the installer will ask if you want to reinstall. Answering "y" will cleanly remove the existing installation and perform a fresh install. There is no need to manually stop or uninstall first.

Checking the Service Status

To verify the agent is running:


sudo systemctl status morbit-remote-agent
Bash


A healthy service will show active (running).

Managing the Service

Action

Command

Check status

sudo systemctl status morbit-remote-agent

View live logs

sudo journalctl -u morbit-remote-agent -f

Stop the agent

sudo systemctl stop morbit-remote-agent

Start the agent

sudo systemctl start morbit-remote-agent

Restart the agent

sudo systemctl restart morbit-remote-agent

 

The agent is configured to start automatically on boot and will restart itself if it encounters an error.

Removing the Remote Connections Agent

To uninstall the agent, run:


curl -fsSL https://morbit-files.s3.eu-west-1.amazonaws.com/linux-installer/disable-remote-connections.sh | sudo bash
Bash

You will be asked to confirm. Answering "y" will stop the service, remove the service file, and delete all agent files from the device. Your Morbit Hub installation is not affected.

Troubleshooting

The installer says Morbit Hub is not found

Morbit Hub must be installed before the Remote Connections Agent. Install it first:


curl -fsSL https://morbit-files.s3.eu-west-1.amazonaws.com/linux-installer/install.sh | sudo bash
Bash


The installer says it cannot read the Hub Key

Ensure Morbit Hub has been started at least once and has registered with the Morbit portal. The Hub Key is stored in /var/lib/Morbit Hub/config.json.

The installer says the configuration download failed

Ensure that:

  • The device has internet access.
  • The Hub is registered in the Morbit portal.
  • Remote Connections is enabled for the Hub in the portal.

The service is not running after installation

Check the logs for errors:


sudo journalctl -u morbit-remote-agent -n 50
h


Common causes include network connectivity issues or an invalid Hub Key.


I see "Not Found" messages in the logs

These are normal and harmless. They are caused by automated internet scanners (bots) probing common web paths on the tunnel such as /@vite/env or /actuator/env. These requests are rejected automatically and do not affect the service.

File Locations

Item

Path

Agent binary

/opt/morbit-remote-agent/ngrok

Tunnel configuration

/opt/morbit-remote-agent/ngrok.yml

Systemd service file

/etc/systemd/system/morbit-remote-agent.service

Morbit Hub configuration

/var/lib/Morbit Hub/config.json

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article