[5 Mins Docker] Deploy Nexterm (an open-source server management software) to Manage Your Servers (in Render) - NETSEC

Latest

Learning, Sharing, Creating

Cybersecurity Memo
Please enable / Bitte aktiviere JavaScript!
Veuillez activer / Por favor activa el Javascript![ ? ]

Sunday, April 6, 2025

[5 Mins Docker] Deploy Nexterm (an open-source server management software) to Manage Your Servers (in Render)

This post introduces Nexterm software which is an open-source server management software designed for handling SSH, VNC, and RDP connections. It actually uses guacd under the hood for both RDP and VNC, which comes bundled within the docker image. It provides a unified platform to manage remote connections securely and efficiently. This guide details how to deploy Nexterm using Docker.



 Other related posts:

Nexterm Project Highlights

Here are some words from https://github.com/dushixiang/next-terminal。

Nexterm is an open-source server management software that allows you to:

  • Connect remotely via SSH, VNC and RDP
  • Manage files through SFTP
  • Deploy applications via Docker
  • Manage Proxmox LXC and QEMU containers
  • Secure access with two-factor authentication



Docker Deployment Steps

Based on doc installation web page: https://docs.nexterm.dev/preview, here are deployment steps.


1 log into linux vps

  • sudo -i
  • apt update 


2 (optional) increase swap size if needed

  • SWAP size increasewget https://raw.githubusercontent.com/51sec/swap/main/swap.sh && bash swap.sh

3 install docker & docker compose

  • apt install docker.io
  • apt install docker-compose
  • (optional) apt upgrade docker.io

4 Create docker data structure

  • mkdir /root/data/docker_data/nexterm
  • cd /root/data/docker_data/nexterm
5 run Calibre-web docker

Root User to Run Docker

  • vi docker-compose.yml

services:
  nexterm:
    environment:
      ENCRYPTION_KEY: "aba3aa8e29b9904d5d8d705230b664c053415c54be20ad13be99af0057dfa23a" # Replace with your generated key
    ports:
      - "6989:6989"
    restart: always
    volumes:
      - nexterm:/app/data
    image: germannewsmaker/nexterm:1.0.3-OPEN-PREVIEW
volumes:
  nexterm:

Notes:Explanation of Key Components
  • Image: Specifies the Docker image germannewsmaker/nexterm:1.0.1-OPEN-PREVIEW, which is the preview version of Nexterm.
  • Ports: Maps port 6989 on the host to port 6989 inside the container, allowing access to Nexterm via http://<your-server-ip>:6989.
  • Volumes: A named volume nexterm:/app/data is used to persist data. This volume ensures that configuration and data are retained across container restarts. Data in Docker containers is lost when the container is removed unless it's saved in a volume. This setup keeps your data safe.
    • nexterm — This is the name of the Docker volume on the host machine. If we are using /nexterm in -v parameter, such as -v /nexterm:/app/data, that will mean nexterm is a folder on the host. 

    • /app/data — This is the path inside the container where the volume will be mounted.

  • Restart: Configured to always so the container will automatically restart in case of failures.

docker-compose up -d

Docker run command:

docker run -d \
  -e ENCRYPTION_KEY="aba3aa8e29b9904d5d8d705230b664c053415c54be20ad13be99af0057dfa23a" \
  -p 6989:6989 \
  --name nexterm \
  --restart always \
  -v nexterm:/app/data \
  germannewsmaker/nexterm:1.0.3-OPEN-PREVIEW

Update 

cp -r /root/data/docker_data/nexterm /root/data/docker_data/nexterm.archive  # backup first
cd /root/data/docker_data/nexterm  # cd into docker-compose folder
docker-compose pull    # pull latest image
docker-compose up -d   # bring up the docker


Uninstall

cd /root/data/docker_data/nexterm  # Enter docker-compose folder
docker-compose down    # bring down the docker
rm -rf /root/data/docker_data/nexterm  # delete all data mapped to local host folders

 


Deployment at Render

https://dashboard.render.com/

Free Web Service in Hobby Plan: 512MB RAM and 0.1CPU.  100GB Free Bandwidth, 500 Minutes Free Pipeline/Month, Free PostgreSQL, Docker Builds, Up to 2 Custom Domains with Free TLS. 




Assume you have an account created already. Here are steps with screenshot to create this nexterm service in Render.com. 

1 After created your project, you can create a new web service using +Add new button.




2 Select Existing Image then enter image url:

germannewsmaker/nexterm:1.0.3-OPEN-PREVIEW

Click Connect to next step.




3 Select Free Instance Type for your new Nexterm web service.




4 At the same page, add a new Environment Variable
ENCRYPTION_KEY
You can use openssl rand -hex 32 to generate your own key to add in. 


Click Deploy

5 Deployed the web service
Unfortunately, there is no persistent data volume in Free plan. Once system got suspended because of inactive, all your conifguration will lost including the account you created. 

First time to use, it will ask you to register an account:

After log in, you can create session folders, then add your servers in. 
You also can create a new account, enable 2fa,




Videos

 




References


  • https://github.com/DmitryScaletta/free-heroku-alternatives
  • https://blog.laoda.de/archives/docker-compose-install-nexterm
  • https://github.com/gnmyt/Nexterm
  • https://docs.nexterm.dev/preview
  • How to Install Nexterm on Your Synology NAS




No comments:

Post a Comment