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

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
Y
Y Combinator Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
M
MIT News - Artificial intelligence
GbyAI
GbyAI
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
IT之家
IT之家
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
爱范儿
爱范儿
N
Netflix TechBlog - Medium
U
Unit 42
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
博客园 - 叶小钗
G
Google Developers Blog
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
腾讯CDC

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.