Deploying Managi, a Lightweight Web-based SSH Management Tool, on Hugging Face
Hugging Face
Section titled “Hugging Face”Hugging Face, colloquially known as “Hugging Face” in China, is a company focused on Natural Language Processing (NLP) and open-source AI tools, widely recognized for its open-source Transformers library. This library provides hundreds of pre-trained models supporting various tasks such as text classification, question answering, translation, and text generation. Hugging Face is dedicated to democratizing artificial intelligence, making it easy for developers and researchers to access and use state-of-the-art machine learning models and datasets. It has also built an active community platform where users can share models, datasets, and example projects, greatly promoting collaboration and innovation in AI research and applications.
Managi
Section titled “Managi”Managi is a lightweight web-based SSH management tool designed to simplify server management tasks. Users can connect to and manage multiple servers directly through a browser, supporting batch command execution, file upload/download, and other features. The project offers a clean interface and low resource consumption, suitable for both individual and team use. It supports flexible deployment methods, including quick Docker deployment. The Windows application is automatically compiled by GitHub Actions, with a transparent process that ensures reliability.
Use Cases
Section titled “Use Cases”When your overseas server (commonly called a “chicken”) is blocked by the firewall (“walled”), making it impossible to connect via SSH directly from within China, you can use a Jump Server for indirect connection. A jump server acts as an intermediate server that you can connect to from within China, which then forwards your SSH connection to the walled server, effectively “bypassing the wall” to achieve access.
Hugging Face’s Space or model hosting services will automatically “hibernate” after being inactive for a long time, requiring several seconds or even tens of seconds of “wake-up time” when accessed again. However, Managi is a lightweight web-based SSH management tool that doesn’t need to provide real-time services, making it perfect for use as a jump server.
Deployment Method
Section titled “Deployment Method”Before deployment, you’ll need a Hugging Face account. Registration is very simple, so I won’t go into detail here.
-
Create a
Space
- After entering the homepage, click
New
in the top left corner, then clickSpace
from the dropdown - On the new
Space
page, fill in theSpace name
, selectDocker
, then clickCreate Space
- After entering the homepage, click
-
Create a
Dockerfile
-
After creating the
Space
, clickFiles
in the top right corner, then clickContribute
, and again clickCreate a new file
from the dropdown -
In the image below, enter
Dockerfile
at position1
, paste the code at position2
, then clickCommit file to
at position3
to create theDockerfile
# Use Python 3.9 Alpine imageFROM python:3.9-alpine# Install git and other necessary dependenciesRUN apk add --no-cache git# Set working directoryWORKDIR /app# Pull code from GitHubRUN git clone https://github.com/hochenggang/managi-backend.git .# Install dependenciesRUN pip install --no-cache-dir -r requirements.txt# Expose portEXPOSE 7860# Start applicationCMD ["python3", "app.py", "-p", "7860"]
- When the status in the top left changes from blue
Building
- To green
Running
OurWeb SSH
programManagi
is ready. The entire process is very fast, taking only a few seconds to build.
-
-
Access
Managi
Since Hugging Face’s website is blocked by default in China, we need to use the domain provided by Hugging Face for access, which is accessible within China
- Click the
three dots
in the top right corner, then selectEmbed this Space
from the dropdown menu - The address in the red box in the image is the domain provided by Hugging Face, click it to access
- Click the
Conclusion
Section titled “Conclusion”By deploying Managi on Hugging Face, we can bypass network restrictions and achieve stable access to walled servers. This approach is particularly suitable for individual developers
or small teams
, eliminating the need to purchase additional jump servers
while providing a good cross-platform
access experience. If you’re facing issues with your server being walled or having difficulty with remote management, try this “light deployment + smart jump” combination solution - it’s simple, worry-free, and effective.