惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
N
Netflix TechBlog - Medium
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
V
Visual Studio Blog
H
Help Net Security
Engineering at Meta
Engineering at Meta
Hugging Face - Blog
Hugging Face - Blog
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
博客园 - 【当耐特】
B
Blog
Stack Overflow Blog
Stack Overflow Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
博客园 - 司徒正美
博客园 - 叶小钗
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell

zplb

我发明了窝窝头文!(自然语言) - zplb Setting Up a Minimal Public TinyProxy with Basic Authentication on CentOS I Built a Web Server That Runs Python and PHP in the Same Page Converting IPA to Speech Using Python Huawei Switch CLI Cheat Sheet
How to Host a .onion Site on Your Own Computer (No VPS Re...
2025-05-11 · via zplb

Most guides online assume you need a server to host a Tor (.onion) site.

You don’t.

You can run a fully working .onion service on a normal computer — no domain, no VPS, no public IP.

Here’s a minimal setup.


1. Install Tor

On Ubuntu:

apt-get install tor

2. Run a Local Web Server

You just need something listening on localhost.

Example (Flask):

from flask import Flask

app = Flask(__name__)

@app.route("/")
def index():
    return "hello world!"

if __name__ == "__main__":
    app.run(host="127.0.0.1", port=1234)

Start the server:

python app.py

3. Configure Tor Hidden Service

Edit:

/etc/tor/torrc

Add:

HiddenServiceDir /var/lib/tor/hidden_service
HiddenServicePort 80 127.0.0.1:1234

4. Start Tor

service tor start

5. Get Your .onion Address

After Tor starts, open:

/var/lib/tor/hidden_service/hostname

You’ll see something like:

abcdefgh12345678.onion

That’s your site.


Notes

  • The service runs entirely on your local machine
  • No domain registration is required
  • No public exposure — only accessible via Tor

Why This Is Interesting

This setup lets you:

  • Host a website without revealing your IP
  • Avoid traditional hosting entirely
  • Experiment with anonymous services

It’s a surprisingly powerful system for something that runs on a single machine.