Skip to content

Commit 2c090e5

Browse files
committed
add images, rathole article done
1 parent 123be68 commit 2c090e5

File tree

8 files changed

+127
-4
lines changed

8 files changed

+127
-4
lines changed
4.94 MB
Loading
1.06 MB
Loading
-1.03 MB
Loading

src/content/post/2025/04-29-rathole-traefik-home-server/_resources/rathole-traefik-architecture-16-9.drawio.svg

Lines changed: 4 additions & 0 deletions
Loading
74.3 KB
Loading
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" version="26.2.14">
2+
<diagram name="Page-1" id="5f0bae14-7c28-e335-631c-24af17079c00">
3+
<mxGraphModel grid="1" page="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" pageScale="1" pageWidth="1600" pageHeight="900" background="none" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0" />
6+
<mxCell id="1" parent="0" />
7+
<mxCell id="39150e848f15840c-1" value="VPS gateway" style="verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;rounded=0;shadow=0;comic=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Verdana;fontSize=12" vertex="1" parent="1">
8+
<mxGeometry x="76" y="128" width="230" height="170" as="geometry" />
9+
</mxCell>
10+
<mxCell id="39150e848f15840c-2" value="Home server" style="verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;rounded=0;shadow=0;comic=0;labelBackgroundColor=none;strokeWidth=1;fontFamily=Verdana;fontSize=12" vertex="1" parent="1">
11+
<mxGeometry x="562" y="70" width="318" height="360" as="geometry" />
12+
</mxCell>
13+
<mxCell id="A6lBMLfXj6pK5urAHSdI-2" value="&lt;div align=&quot;center&quot;&gt;0.0.0.0:2333&lt;br&gt;&lt;/div&gt;&lt;div align=&quot;center&quot;&gt;0.0.0.0:80&lt;br&gt;&lt;/div&gt;&lt;div align=&quot;center&quot;&gt;0.0.0.0:443&lt;/div&gt;&lt;div align=&quot;center&quot;&gt;&lt;b&gt;Rathole server&lt;/b&gt;&lt;/div&gt;" style="html=1;dropTarget=0;whiteSpace=wrap;align=center;" vertex="1" parent="1">
14+
<mxGeometry x="106" y="183" width="170" height="80" as="geometry" />
15+
</mxCell>
16+
<mxCell id="A6lBMLfXj6pK5urAHSdI-3" value="" style="shape=module;jettyWidth=8;jettyHeight=4;" vertex="1" parent="A6lBMLfXj6pK5urAHSdI-2">
17+
<mxGeometry x="1" width="20" height="20" relative="1" as="geometry">
18+
<mxPoint x="-27" y="7" as="offset" />
19+
</mxGeometry>
20+
</mxCell>
21+
<mxCell id="A6lBMLfXj6pK5urAHSdI-39" value="&lt;div&gt;http://homeserver.my-domain.com:80&lt;/div&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
22+
<mxGeometry x="571" y="494" width="207" height="20" as="geometry" />
23+
</mxCell>
24+
<mxCell id="A6lBMLfXj6pK5urAHSdI-41" value="Rathole tunnel" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontStyle=1" vertex="1" parent="1">
25+
<mxGeometry x="389" y="171" width="98" height="18" as="geometry" />
26+
</mxCell>
27+
<mxCell id="A6lBMLfXj6pK5urAHSdI-44" value="Docker" style="shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;whiteSpace=wrap;html=1;fontStyle=1" vertex="1" parent="1">
28+
<mxGeometry x="572" y="110" width="268" height="290" as="geometry" />
29+
</mxCell>
30+
<mxCell id="A6lBMLfXj6pK5urAHSdI-8" value="123.123.123.123:2333&lt;br&gt;&lt;b&gt;Rathole client&lt;/b&gt;" style="html=1;dropTarget=0;whiteSpace=wrap;" vertex="1" parent="1">
31+
<mxGeometry x="612" y="145" width="180" height="90" as="geometry" />
32+
</mxCell>
33+
<mxCell id="A6lBMLfXj6pK5urAHSdI-9" value="" style="shape=module;jettyWidth=8;jettyHeight=4;" vertex="1" parent="A6lBMLfXj6pK5urAHSdI-8">
34+
<mxGeometry x="1" width="20" height="20" relative="1" as="geometry">
35+
<mxPoint x="-27" y="7" as="offset" />
36+
</mxGeometry>
37+
</mxCell>
38+
<mxCell id="A6lBMLfXj6pK5urAHSdI-10" value="&lt;b&gt;Traefik&lt;/b&gt;" style="html=1;dropTarget=0;whiteSpace=wrap;" vertex="1" parent="1">
39+
<mxGeometry x="612" y="290" width="180" height="90" as="geometry" />
40+
</mxCell>
41+
<mxCell id="A6lBMLfXj6pK5urAHSdI-11" value="" style="shape=module;jettyWidth=8;jettyHeight=4;" vertex="1" parent="A6lBMLfXj6pK5urAHSdI-10">
42+
<mxGeometry x="1" width="20" height="20" relative="1" as="geometry">
43+
<mxPoint x="-27" y="7" as="offset" />
44+
</mxGeometry>
45+
</mxCell>
46+
<mxCell id="A6lBMLfXj6pK5urAHSdI-38" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.133;exitY=1.033;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1">
47+
<mxGeometry width="50" height="50" relative="1" as="geometry">
48+
<mxPoint x="651.94" y="379.97" as="sourcePoint" />
49+
<mxPoint x="652" y="490" as="targetPoint" />
50+
</mxGeometry>
51+
</mxCell>
52+
<mxCell id="A6lBMLfXj6pK5urAHSdI-45" value="5080 → 80" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
53+
<mxGeometry x="654" y="251" width="68" height="20" as="geometry" />
54+
</mxCell>
55+
<mxCell id="A6lBMLfXj6pK5urAHSdI-46" value="" style="endArrow=classic;html=1;rounded=0;horizontal=0;entryX=0.172;entryY=-0.011;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1">
56+
<mxGeometry width="50" height="50" relative="1" as="geometry">
57+
<mxPoint x="650" y="235" as="sourcePoint" />
58+
<mxPoint x="649.96" y="289" as="targetPoint" />
59+
</mxGeometry>
60+
</mxCell>
61+
<mxCell id="A6lBMLfXj6pK5urAHSdI-40" value="" style="shape=flexArrow;endArrow=classic;startArrow=classic;html=1;rounded=0;exitX=0.416;exitY=-0.004;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.006;entryY=0.6;entryDx=0;entryDy=0;entryPerimeter=0;fillColor=default;" edge="1" parent="1">
62+
<mxGeometry width="100" height="100" relative="1" as="geometry">
63+
<mxPoint x="306" y="198.71999999999997" as="sourcePoint" />
64+
<mxPoint x="612.0800000000002" y="199" as="targetPoint" />
65+
</mxGeometry>
66+
</mxCell>
67+
<mxCell id="A6lBMLfXj6pK5urAHSdI-49" value="&lt;div align=&quot;right&quot;&gt;80 → 5080&lt;br&gt;&lt;/div&gt;&lt;div align=&quot;right&quot;&gt;443 → 5443&lt;/div&gt;" style="text;html=1;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
68+
<mxGeometry x="395" y="206" width="79" height="40" as="geometry" />
69+
</mxCell>
70+
<mxCell id="A6lBMLfXj6pK5urAHSdI-50" value="&lt;div&gt;https://homeserver.my-domain.com:443&lt;/div&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
71+
<mxGeometry x="664" y="460" width="224" height="20" as="geometry" />
72+
</mxCell>
73+
<mxCell id="A6lBMLfXj6pK5urAHSdI-51" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.133;exitY=1.033;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1">
74+
<mxGeometry width="50" height="50" relative="1" as="geometry">
75+
<mxPoint x="748.94" y="379.97" as="sourcePoint" />
76+
<mxPoint x="749" y="457" as="targetPoint" />
77+
</mxGeometry>
78+
</mxCell>
79+
<mxCell id="A6lBMLfXj6pK5urAHSdI-54" value="5443&amp;nbsp;→ 443" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
80+
<mxGeometry x="750" y="251" width="82" height="20" as="geometry" />
81+
</mxCell>
82+
<mxCell id="A6lBMLfXj6pK5urAHSdI-55" value="" style="endArrow=classic;html=1;rounded=0;horizontal=0;entryX=0.172;entryY=-0.011;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1">
83+
<mxGeometry width="50" height="50" relative="1" as="geometry">
84+
<mxPoint x="746" y="235" as="sourcePoint" />
85+
<mxPoint x="745.96" y="289" as="targetPoint" />
86+
</mxGeometry>
87+
</mxCell>
88+
<mxCell id="BSf_gDi98osA04qacQ9q-1" value="&lt;div&gt;http://homeserver.my-domain.com: 80&lt;/div&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
89+
<mxGeometry x="73" y="370.03" width="217" height="20" as="geometry" />
90+
</mxCell>
91+
<mxCell id="BSf_gDi98osA04qacQ9q-2" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
92+
<mxGeometry width="50" height="50" relative="1" as="geometry">
93+
<mxPoint x="112" y="370" as="sourcePoint" />
94+
<mxPoint x="112" y="300" as="targetPoint" />
95+
</mxGeometry>
96+
</mxCell>
97+
<mxCell id="BSf_gDi98osA04qacQ9q-3" value="&lt;div&gt;https://homeserver.my-domain.com: 443&lt;/div&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
98+
<mxGeometry x="138" y="341.03" width="230" height="20" as="geometry" />
99+
</mxCell>
100+
<mxCell id="BSf_gDi98osA04qacQ9q-4" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
101+
<mxGeometry width="50" height="50" relative="1" as="geometry">
102+
<mxPoint x="189" y="340" as="sourcePoint" />
103+
<mxPoint x="189" y="300" as="targetPoint" />
104+
</mxGeometry>
105+
</mxCell>
106+
<mxCell id="BSf_gDi98osA04qacQ9q-5" value="&lt;div align=&quot;right&quot;&gt;2333 → 2333&lt;br&gt;&lt;/div&gt;" style="text;html=1;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
107+
<mxGeometry x="395" y="154" width="79" height="20" as="geometry" />
108+
</mxCell>
109+
<mxCell id="BSf_gDi98osA04qacQ9q-6" value="IP: 123.123.123.123" style="text;html=1;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
110+
<mxGeometry x="164" y="141" width="122" height="20" as="geometry" />
111+
</mxCell>
112+
</root>
113+
</mxGraphModel>
114+
</diagram>
115+
</mxfile>

src/content/post/2025/04-29-rathole-traefik-home-server/index.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: Expose home server with Rathole tunnel and Traefik
33
description: |
4-
A practical example how to permanently expose your home server to the internet.
4+
Bypass CG-NAT permanently and host websites from home.
55
publishDate: 2025-04-29
6-
heroImage: '../../../../content/post/2025/04-29-rathole-traefik-home-server/_images/rathole-traefik-architecture-16-9.png'
6+
heroImage: '../../../../content/post/2025/04-29-rathole-traefik-home-server/_images/orange-pi.jpg'
77
heroAlt: Rathole Traefik architecture diagram
88
tags:
99
- devops
@@ -18,10 +18,12 @@ import { Image } from 'astro:assets';
1818

1919
import { IMAGE_SIZES } from '../../../../constants/image';
2020

21+
import OrangePiGifImage from '../../../../content/post/2025/04-29-rathole-traefik-home-server/_images/orange-pi.gif'
22+
23+
import RatholeTraefikArchitectureImage from '../../../../content/post/2025/04-29-rathole-traefik-home-server/_images/rathole-traefik-architecture-16-9.png';
2124
import FirewallImage from '../../../../content/post/2025/04-29-rathole-traefik-home-server/_images/firewall.png';
2225
import HomeServerContainersImage from '../../../../content/post/2025/04-29-rathole-traefik-home-server/_images/home-server-containers.png';
2326

24-
2527
## Introduction
2628

2729
In the previous article, I wrote about a temporary SSH tunneling technique to bypass CG-NAT. This method is not suitable for exposing permanent services, at least not without `autossh` manager. Proper tools for this are [rapiz1/rathole](https://github.com/rapiz1/rathole) or [fatedier/frp](https://github.com/fatedier/frp). I chose Rathole since it's written in Rust and offers better performance and benchmarks.
@@ -47,7 +49,7 @@ Another point is that, with option 2, we avoid the gap of unencrypted traffic on
4749

4850
The downside is that Rathole will exclusively occupy ports `80` and `443` on the VPS, preventing any other process from using them. We won't be able to run other web servers on that VPS, so it's best to use a small one dedicated to this purpose.
4951

50-
image
52+
<Image {...IMAGE_SIZES.FIXED.MDX_MD} src={RatholeTraefikArchitectureImage} alt="Rathole Traefik architecture diagram" />
5153

5254
## Rathole server
5355

@@ -358,6 +360,8 @@ It is simple, cheap, and you can set it up in 30 minutes. Like anything, it also
358360

359361
Did you make something similar yourself? Can you see room for improvement? Did you use a different method? You tried to run the code and need help with troubleshooting? Let me know in the comments.
360362

363+
<img src={OrangePiGifImage.src} alt="Orange Pi hero image" />
364+
361365
## References
362366

363367
- Rathole repository https://github.com/rapiz1/rathole

0 commit comments

Comments
 (0)