给自己搭个数字保险柜,只是它住在云端 | I Built a Cloud Vault — and It Actually Lives in the Sky

你有没有想过,自己也能当一回"云管家"?一台远方的小服务器,一块自己的域名,几个 Docker 积木一搭,就有了一个能远程访问自家网络、管自己数据的私人小站。面板一开,节点、用户、证书全在一屏里排排坐,比对着一堆配置文件抓头发优雅多了。小小的不完美嘛——服务器要花钱、关机也可能偷偷计费,像忘了拔插头的电水壶,记得彻底销毁就好。但那种"我的服务我做主"的踏实感,真香。

Ever fancied being your own cloud butler? A little server far away, a domain of your own, a few Docker blocks stacked up — and you've got a private station to reach your own network and own your data. One dashboard lines up nodes, users and certs neatly, way classier than yanking your hair over config files. The tiny catch — servers cost money and can quietly bill you even when off, like a kettle you forgot to unplug, so destroy them fully. But that "my service, my rules" feeling? Totally worth it.


实操案例


在本机 macOS 上,用 Docker 起一个 Remnawave 面板做本地学习环境,再用 Python 脚本调它的 REST API 自动查看节点/用户状态,先把架构吃透、零云费用,将来上 VPS 时无缝迁移。/On a macOS Mac, spin up a Remnawave panel locally with Docker as a learning sandbox, then use a Python script to hit its REST API and auto-check node/user status — understand the architecture first at zero cloud cost, and migrate to a VPS later seamlessly.


说明:官方推荐生产环境用 Linux VPS,但"先在本机 Docker 里跑通、免费学架构"是最省钱且最安全的第一步,完全适配你的 M2 16G。真正对外提供服务时再迁到 Ubuntu/Debian VPS,配置可复用。


1. 装 Docker Desktop/Install Docker Desktop

Mac 用户去官网下载 Apple Silicon 版 Docker Desktop,装好后终端跑 docker --version 确认。/Mac users download the Apple Silicon Docker Desktop from the official site, then run docker --version to confirm.


2. 建项目文件夹/Create a project folder

在终端建个干净目录,后面所有文件都放这儿,不弄乱系统。/Make a clean directory in the terminal and keep all files here so nothing clutters your system.


mkdir -p ~/remna-lab && cd ~/remna-lab


3. 读官方文档,拿本地部署的 compose 模板/Read the docs, grab the local compose template

去 remna.st 官方文档复制 Panel 的 docker-compose 示例,先别改高级项,能起来最重要。/Copy the Panel docker-compose example from the remna.st docs; don't touch advanced options yet — just get it running.


4. 本地起面板/Bring the panel up locally

用 Docker Compose 一条命令拉起面板与数据库,浏览器开 http://localhost 看到登录页就成功。/Bring up the panel and database with one Docker Compose command, then open http://localhost — a login page means success.


docker compose up -d

docker compose ps   # 看容器是否都healthy/check all containers are healthy


5. 建管理员,拿 API Token/Create an admin, get an API token

在面板里注册管理员账号,进设置页生成一个 REST API Token,复制备用。/Register an admin in the panel, generate a REST API token in settings, and copy it.


6. 用 Python 自动查状态/Auto-check status with Python

写个小脚本调面板 API,把节点和用户状态拉出来,以后可扩展成定时巡检。/Write a small script to call the panel API and pull node/user status — later extend it into a scheduled health check.


# check_panel.py —— 本地 Remnawave 面板健康巡检 / local panel health check

import requests


BASE = "http://localhost:3000"          # 按你的面板实际端口改 / adjust to your panel port

TOKEN = "在面板里生成的API_TOKEN"          # paste the token from the panel

H = {"Authorization": f"Bearer {TOKEN}"}


def get(path):

    r = requests.get(f"{BASE}/api/{path}", headers=H, timeout=10)

    r.raise_for_status()

    return r.json()


try:

    nodes = get("nodes")                # 具体路径以官方 API 文档为准 / verify paths in official API docs

    users = get("users")

    print(f"节点数/nodes: {len(nodes.get('response', []))}")

    print(f"用户数/users: {len(users.get('response', []))}")

    for n in nodes.get("response", []):

        print(f"  - {n.get('name')}: {'在线/online' if n.get('isConnected') else '离线/offline'}")

except Exception as e:

    print("查询失败,请核对端口/Token/API路径 / check port, token, api path:", e)


pip install requests

python check_panel.py


7. 学完就地销毁/Tear it down when done

学习结束用一条命令彻底删掉容器和数据,不留后台进程,零残留零费用。/When done, remove containers and data with one command — no background processes, no cost, no leftovers.


docker compose down -v


8. 将来上线再迁移/Migrate to production later

真要对外服务时,把同一套 compose 搬到 Ubuntu/Debian VPS,补上域名、Nginx 反代和 acme.sh 证书即可,本地练熟的配置直接复用。/When you truly go live, move the same compose to an Ubuntu/Debian VPS, add a domain, Nginx reverse proxy and an acme.sh cert — your locally rehearsed config carries straight over.


相关链接 (Related Links):

https://docs.rw/overview/quick-start/

https://docs.rw/install/remnawave-panel

https://docs.rw/install/reverse-proxies/nginx

https://docs.rw/learn-en/config-profiles/

https://docs.rw/install/remnawave-node/

https://xtls.github.io/config/transports/websocket.html

https://github.com/remnawave

https://github.com/remnawave/backend

https://github.com/XTLS/Xray-core

https://www.docker.com/products/docker-desktop

https://github.com/acmesh-official/acme.sh

https://signin.aws.amazon.com/

https://aws.amazon.com/free/

https://github.com/Vinci-da-Gama/remnawave-backend



chmod 400 xxx.pem

ssh -i "xxx.pem" ubuntu@a.b.c.d


apt update && apt upgrade -y && apt install curl wget tar socat -y


chmod +x remnawave-server.sh && ./remnawave-server.sh


docker network inspect remnawave-network

docker ps

ss -lntp | grep -E ':(80|443)\s'


Reality Private key:

docker run --rm ghcr.io/xtls/xray-core x25519


shortId:

openssl rand -hex 8


mkdir /opt/remnanode && cd /opt/remnanode && touch docker-compose.yml


Reality Private key:

docker exec -it remnanode /usr/local/bin/xray x25519

评论

爽文共赏/Popular Posts

5分钟拿下原生IP + 免费节点 手残变大佬 | From Noob to Pro in 5 Minutes: 10 Real IPs + Daily Fresh Free Nodes

免费节点无限续?OneBox+subs-check,付费党沉默了 | Free Nodes Never Die? OneBox + subs-check, Paid Users Left Speechless

一口气搭好!Cloudflare融合Railway与Galaxy打造纯净原生免费VPS | Build a Pure Free VPS with Cloudflare + Railway + Galaxy in One Go

3 Steps to AI Video Fame✨WebSocket+Copilot Auto-Update, Newbies Win Too | 3 步 AI 视频封神✨WebSocket+Copilot 自动更,小白也能卷赢

Stop Note-Taking Pain—AI One-Click, Efficiency Skyrockets | 别再苦抄笔记!用AI一键效率爆表💥

Game-Changing! Get AI Parenting+Math Enlightenment for Free | 0成本get AI育儿+数学启蒙双buff,躺赢养娃