Seamless COMPUTATIONAL Remote Power, using Linux Server, Jupyter Lab, with Tailscale!

Mahdi S. Fard
7 min readFeb 10, 2025

--

Tailscale connecting different entities with no geographical access limit.

I’m no expert in using #Linux (I’ve recently become familiar with it); thus, what I’m writing here may be a clear answer for genuine software engineers. However, I believe many people in my network, which is comprised of #Computational_Designers, would find it interesting to have their computational power in their pocket. Connect their phone to a monitor and be able to run heavy-duty #Machine_Learning / #Deep_Learning algorithms or even collaborate with their team. Accordingly, this article focuses on a question I had recently:

As a computational designer who deals with data and coding on a daily basis, what is the best approach to have a seamless connection to my machines so I can work from everywhere with no limit on what device I am using?

And why do I even have such questions all the time?! I don’t know! It’s just, … I don’t know! 😐 It’s just for having my own fun by learning new things in a way which is not that common. You already know the same approach pushes us at Ardaena to develop customized solutions in #Architecture, #Engineering and, #Construction!

We understand that our work in computational design, especially in integrating ML and DL algorithms, requires substantial computational power and the flexibility to apply these technologies across different conditions and locations. This is due to the diverse data sources and objects from various design stages to construction. This requirement arises from a straightforward fact: high-performance hardware, while crucial for processing and training models, is not always mobile and accessible. Moreover, with Industry 5.0 coming, more technologies are being interacted with, and more data is being fed into our decision-making. Thus, yeah, we definitely need to upgrade our hard and soft entities into an integrated, interconnected modular setting.

Did I go too far?! Shhh! C’Mon, I’m warming up our minds!

Let’s ask the question quoted above one more time:

Why do we need to access our computational entities in a platform-agnostic way?

Rather than answering this which comes with hardware and software sides, I’d like to engage you in the details with a practical solution to grasp the context better. All right, let’s see what we can do about this.

Integrating remote access solutions with enhancing computational power remotely does not merely represent a shiiiiift in operational tasks but is a strategic resource management respecting agility, teamwork and being securely connected. Now, let’s break this practical down into pieces. I will discuss the main idea from my recent experience to provide access to my resources no matter where I am, in three main steps:

1. Setting Ubuntu Server for hardware management

2. Comparing possible Solutions: Cloud Services, Teltonika, Tailscale

3. Step by Step guide for setting up the remote access within Tailscale on Ubuntu Server

  1. Why is the Ubuntu Linux Server the key here?

Choosing #Ubuntu Server for remote access offers plenty of options which is out of our frame for this topic. For computational tasks that are data-centric, Ubuntu’s architecture is well-established for deploying applications that leverage ML / DL. It is an ideal choice for a secure environment, which is also scalable for adding more #GPU and #CPU to the setup later. These are the reasons behind these facts I mentioned:

Stability and Reliability: Minimal downtime and solid performance are crucial for continued queries through using hardware for computational tasks. Ubuntu is well-known for such features.

Security Features: Ubuntu comes with built-in security measures that ensure data is protected safely.

Scalability: It supports intensive computational tasks with modular clustering.

Support for Advanced Hardware: Ubuntu is efficient with high-performance GPUs and CUDA cores that are necessary for ML/DL processing.

For further reading on Ubuntu’s features and benefits for server management, refer to the Ubuntu Server documentation and Ubuntu Server CLI Cheat Sheet which offers quick commands and tips for managing a server effectively.

2. Remote access options: My own experience with #Teltonika and #Tailscale

I want to remind you again that this is not my field of expertise. I just stepped into this area for fun, enhancing my weekends with a micro-learning effort, and then headed out. For more expert advice, ask technical people who understand every detail regarding the possibilities aligned with your needs.

The story began with buying a RUT360 Teltonika router to understand the options and how it works within the Digital-Twin field, which may possibly be a part of my research in the next life I’m going to have. Fascinating features, along with fantastic support and an online dashboard in Teltonika Remote Management System (RMS), blew my mind away. You need to check their work! After running VPN-Hub is connected to the built-in OpenVPN in the router and their cloud services, I figured that out, all right, I now can have specific traffic tracking and connections to my machines through their infrastructure. Everything smoothly conducted on the Ubuntu server. However, since Tetonika RMS is not free after 30-day trial run, I had to change the entire approach to something free and accessible, at least for the initial setup.

At that moment, I was like:

“OK, there should not be anything Free with such a complicated and valuable service available”.

Turns out, THERE IS! I was over the moon when I found out about Tailscale! Tailscale Inc. is a software company based in Toronto, Ontario. Tailscale develops a partially open-source software-defined mesh virtual private network and a web-based management service. Oh, that Mesh Tech VPN, is fascinating! At least I could have my training keep going! Let’s give it a try then! Before going for the actual step-by-step guide, let me add the #ChatGPT comparing table for the relative services we discussed:

Comparing different options for remote access

3. Step by Step guide for setting up the remote access within Tailscale on Ubuntu Server

Due to the existence of a comprehensive installation guide for Ubuntu, I delegate this part to you by reading this promising document. Just download the latest version from the Get Ubuntu Server and follow the instructions after running up your Linux, staying on CLI. You may need shortcuts, common commands and basics to continue from this step on. Here, I’ll provide detailed instructions on setting up a Linux server with #Jupyter_Lab and Tailscale, configuring these to run as services at system startup.

3.1. Installing Jupyter Lab

sudo apt update
sudo apt install python3-pip python3-dev
pip3 install jupyterlab

3.2. Creating a Service file: Create a systemd service file to manage the Jupyter Lab service activate and running at server startup. You do not want to activate teh service every single time you run the server!

sudo nano /etc/systemd/system/jupyterlab.service

Add the following configuration to the opened service file. Remember to put your own info:

[Unit]
Description=Jupyter Lab
After=network.target

[Service]
User=<your-username>
Group=<your-group>
WorkingDirectory=/home/<your-username>
ExecStart=/usr/local/bin/jupyter lab --ip=0.0.0.0 --no-browser

[Install]
WantedBy=multi-user.target

Enable and Start the service:

sudo systemctl enable jupyterlab.service
sudo systemctl start jupyterlab.service

*IMPORTANT*
3.4. Setting Up Tailscale and Enabling Funnel at Startup: Tailscale simplifies the process of creating a secure network. Here’s how to set up Tailscale and ensure the funnel feature is active upon system startup:

# Installing Talscale
curl -fsSL https://tailscale.com/install.sh | sh

#Authenticate and Connect
sudo tailscale up

3.5. Setting Up Tailscale Funnel as a starting up service: This will allow you to expose local services securely through a Tailscale URL.

sudo nano /etc/systemd/system/tailscale-funnel.service

Insert this config:

[Unit]
Description=Tailscale Funnel for Jupyter Lab
After=network.target tailscaled.service

[Service]
ExecStart=/usr/bin/tailscale funnel --accept-risks 8888
Restart=always
User=root

[Install]
WantedBy=multi-user.target

You must have now everything setup, remember to follow each step from your Tailscale Admin Dashboard, so you can track what is going on. Here is mine for reference, I have my Windows Laptop, My Android Phone and The Linux Machine listed and connected. You may see under the Linux Machine, I have SSH (The heavy-lifiting part like this will be done by Tailscale) and Funnel running. One last thing: Tailscale also provides your VS-Code an extension so you can access all your devices in one place. Awesome, right? 😉

Tailscale Dashboard of my profile

Wrapping Up our Experience!

Any progress into understanding how data management, remote calculation power and learning about Linux for me was a great load for learning. Expanding our knowledge into related topics, even if they are not our direct expertise, opens new connections for meeting new people. It allows us to discuss more interdisciplinary projects, which I believe our research and our work require. To wrap up then, this exploration was driven by a simple yet profound question:

How can I, as a computational designer, access and manage my computational tools from anywhere, using any device?

Starting with a personal need to enhance the power and reachability of my computational resources, we explored configuring a setup that would not only support data processing requirements but also provide the flexibility to perform ML/DL #algorithms from anywhere virtually. Adopting Tailscale during this experience was pivotal, offering a seamless, secure and straightforward method to connect devices into a cohesive network. This setup allowed an integrated way of managing resources, transcending the limits of location and hardware accessibility. The result? Hmmm…, a flexible setting that I can use even on my Android phone, thanks to Samsung Dex, (I know, it works on iOS as well, not a fan of i-Products since I canna customize anything inside them) to run, track, monitor and help my team members from any place on this planet. Yeah, we still need to have an internet connection!

Please let me know if you have done the same work for your own setup. You can find me on LinkedIn. Sharing is the best way to survive more! I should mention it lastly, non of these efforts would be done in the amount of time I spent if ChatGPT was not besides my search.

#Remote_Access #Tailscale #Teltonika #Ubuntu_Server #Computational_Design #AEC_Needs_Hybrid_Characters #Coding #Python #Ardaena4xStreams

--

--

Mahdi S. Fard
Mahdi S. Fard

Written by Mahdi S. Fard

Founder of Ardaena.com | Automation/MachineLearning Developer of Free-Form Facade/Structure Systems | Affiliated PhD Researcher at Archmanu.com

No responses yet