How to Reach Your Home Server From Anywhere Without Opening Your Network

A walkthrough of the four common ways to reach a home server remotely, why "just put it behind a reverse proxy" stopped being enough, and how to set up outbound-only access to a single service with Twingate.
On August 25, 2026, CISA added CVE-2026-60004 to its Known Exploited Vulnerabilities catalog: a CVSS 9.8 remote code execution flaw in self-hosted Gitea. A user with repository write access can exploit it. On instances that allow open sign-up (Gitea's default), an attacker can register an account and create a repository to obtain that access. Gitea fixed the flaw in version 1.27.1; update to that version or later and disable open registration if you don't need it.
A default reverse proxy wouldn't necessarily stop this kind of attack: it forwards requests to the application, and the vulnerability lived in the application behind it.
This is the uncomfortable part of self-hosting that doesn't come up until something breaks: how you reach your services from outside your network changes the shape of your attack surface. Some setups expose an HTTP endpoint to the entire internet. Some expose a UDP port that ignores anything unauthenticated. Some expose nothing at all. If you're running Gitea, Jellyfin, Home Assistant, Immich, or anything else you want to reach from your phone, it's worth knowing which category you're actually in.
The four common approaches
Here's how most people solve the "reach my home server from anywhere" problem, and what each one leaves reachable from the public internet.
Approach | Inbound ports open | What's reachable from the internet | Access model |
|---|---|---|---|
Port forward + reverse proxy | 80/443 (or custom) | The reverse proxy, and by extension every service behind it | Network-level |
Self-hosted WireGuard endpoint | 1 UDP port (usually 51820) | The WireGuard listener, which drops unauthenticated packets silently | Network-level (once in, you're on the LAN) |
Mesh VPN overlay (e.g., WireGuard-based mesh products) | Usually no manual port forward | No public application endpoint is required; authenticated peers connect directly or through a relay | Network-level across the mesh |
Outbound-only connector (ZTNA) | No inbound port forward required | No public application endpoint is required; authorized clients connect through a Connector | Per-resource |
A quick tour of each, and then we'll build the last one.
Port forwarding behind a reverse proxy
You open 443 on your router, point it at an Nginx, Caddy, or Traefik instance, and let the proxy route hostnames to internal services. It works. It's also the kind of setup that leaves an application like Gitea reachable by anyone on the internet.
The reverse proxy is good at handling TLS, routing, and basic request filtering. Out of the box, it does not inspect application-layer logic for the services behind it. If your Gitea has an RCE triggered by a crafted HTTP request, a default proxy config will forward that request. You can add forward authentication (Authelia, Authentik) or block specific endpoints, but that's extra configuration you have to know to add before the vulnerability is public.
This approach also puts your real IP, your hostname, and a fingerprintable HTTP response on the public internet. Shodan will find you. Mass scanners will find you. The question isn't whether traffic hits your proxy — it's whether any of it exploits a service you haven't patched yet.
Self-hosted WireGuard
A single UDP port, usually 51820, listening on your router or a VM. WireGuard is designed so that packets from unknown peers are dropped without a response. From an attacker's perspective, the port looks closed. There's no banner, no handshake, no acknowledgment.
This is a genuine security improvement over exposing HTTP services. The attack surface is a small, well-reviewed codebase rather than a sprawling Rails or Go application. The tradeoff: once a client authenticates, it's on your LAN with whatever routing rules you've configured. That's fine for personal use. It's less fine if you want to give someone access to just one service without handing over the keys to your whole network.
Mesh VPN overlays
Mesh VPN products (the Tailscale-style category) typically work without manually forwarding inbound ports. Devices coordinate connections, use NAT traversal to connect directly when possible, and fall back to a relay when needed. You access services by their mesh IP or MagicDNS name.
This is a real step forward on exposure. It's still a network-level model, though. The default policy allows every device on the tailnet to connect to every other device, and access rules live in a single tailnet policy file. You can narrow that with policy rules, or share a single machine with someone outside your tailnet. But the starting point is open connectivity, and you rely on policy configuration to restrict it.
Outbound-only connectors (ZTNA)
This is the model Twingate uses. A lightweight Connector runs inside your network and establishes outbound connections to Twingate. No inbound router port forward is required for the Connector. Clients get access to defined Resources, such as gitea.home.lan or 192.168.1.50, rather than joining a mesh of devices. You can also restrict the permitted ports.
Twingate uses access controls at the Client and Connector to authorize traffic to Resources. A user granted access only to a narrowly defined Gitea Resource can't use Twingate to reach unrelated LAN devices. This restriction applies to the Twingate path; it doesn't block access through another VPN, a local connection, an existing public endpoint, or an overly broad Resource definition. Twingate can proxy TCP, UDP, and ICMP traffic for authorized Resources.
That's the setup we're going to build.
What you're building
By the end of this walkthrough, you'll have:
A Twingate Connector running on your home network (Docker, or directly on a Pi/NAS)
A single Resource defined — let's use Gitea as the example — with per-resource access
MFA required before access is granted
No inbound port forward needed for Twingate, with any existing Gitea port forwards removed
A client on your phone or laptop that can reach your Gitea Resource remotely, without Twingate access to unrelated Resources
Prerequisites
A device on your home network that can run Docker, or a Linux host (a Raspberry Pi 4+, an old NUC, or a VM on your NAS all work fine)
A Twingate account. The free Starter plan covers up to 5 users. Check current pricing for Resource Policy and native MFA availability. The Home plan is $15 per month and limited to non-commercial use.
A supported login provider. Social login options include Google, Microsoft, GitHub, and LinkedIn. Check the identity provider documentation and current plan details before choosing an enterprise IdP.
The internal hostname or IP of the service you want to reach
Step 1: Create a Remote Network
In the Twingate admin console, go to Network → Remote Networks and click Add Remote Network. Name it something like home and choose On Premise as the location.
A Remote Network is a logical grouping — it represents your home LAN. Connectors deployed into this network can serve Resources that live inside it.
Step 2: Deploy a Connector
In the Remote Network you just created, click Deploy Connector, choose Docker, and generate a pair of tokens. Follow the admin console’s setup instructions to deploy the Connector on a Linux host inside your home network. The Connector establishes outbound connections, so no inbound firewall changes are needed. Within a minute or so, its status should turn green in the admin console.
For redundancy, deploy two Connectors on separate hosts. They provide automatic load balancing and failover, though an active connection may need to reconnect during an outage or restart. Each Connector needs its own token pair, and both must be able to resolve and reach the same Resources. One Connector may be enough for a homelab if you can tolerate downtime. Treat the tokens as secrets; don't share the generated command or commit it to a repository.
If you'd rather not run Docker, the Connector can also run as a systemd service on Linux. The Connector is small and runs happily on a Raspberry Pi.
Step 3: Define the Resource
Still in the Remote Network view, click Add Resource. Enter the internal address of the service you want to expose. For Gitea, that might be:
gitea.home.lan(if your Connector can resolve it using internal DNS)192.168.1.42(if you prefer to use an IP address)
Enter the hostname or IP as the Resource address; configure port restrictions separately. The Connector must be able to resolve the hostname and reach the service on the selected port.
Give it a user-facing name like Gitea. You can also set an alias, such as gitea.int, so an authorized client can reach the Resource by that name without creating a DNS entry for the alias. An alias doesn't automatically make your application's TLS certificate valid for that name; use a certificate matching the hostname in your browser.
By default, a Resource allows all TCP and UDP ports and ICMP ping. Restrict it to what you need — for example, TCP 3000 for the web UI and TCP 22 only if you use Git over SSH. Disable ICMP if you don't need it.
This is the piece that makes per-resource access work. If Gitea is the only Resource granted to a user, they can't reach your router's admin page through Twingate unless another authorized Resource also covers it. Avoid broad CIDR or wildcard Resources if your goal is access to just one service.
Step 4: Set up a Security Policy with MFA
Check pricing for native MFA and Resource Policy availability on your plan. In the admin console, go to Policies → Resource Policies and edit the default policy or create a new one. Set:
Authentication: required
MFA: required
Authentication frequency: choose a re-authentication interval appropriate for your setup, such as 24 hours
Open the Gitea Resource and assign the policy. Check its group-level policy overrides too: if a user belongs to multiple groups with different applicable policies, Twingate may select a less restrictive one.
A Resource Policy applies when the user accesses that Resource; a separate Sign In Policy controls the Client's sign-in requirements. Twingate can enforce native MFA independently of your identity provider. If your provider already requires MFA, Twingate's MFA documentation recommends configuring MFA in one place rather than both to avoid duplicate prompts. MFA reduces the risk from a stolen password, but it doesn't eliminate account or device compromise.
Step 5: Assign access to a Group
Under Team → Groups, create a group called something like Gitea Users. Add yourself. In the Gitea Resource, open Access and grant the group permission.
If you want to share access with a friend, invite them and add them to the group. They'll have Twingate access to Gitea under the assigned policy, not to unrelated Resources. Gitea's own permissions still control which repositories they can use. To revoke Twingate access, remove the user from the group and verify they don't have access through another group; for urgent offboarding, also block their device and deactivate their identity as appropriate.
Step 6: Install the Client
On your laptop or phone, download the Twingate client, sign in with the same identity, and complete MFA. The client registers, pulls down a signed list of the resources you have access to, and starts intercepting DNS queries for those hostnames.
Open a browser and go to the address and port your service uses. For example, if Gitea serves HTTP directly on port 3000, use http://gitea.home.lan:3000; if a reverse proxy serves HTTPS on port 443, use https://gitea.home.lan. Substitute your alias if you configured one, and make sure the certificate matches the hostname when using HTTPS. Prefer HTTPS: HTTP traffic between the Connector and Gitea isn't protected by the Client-to-Connector tunnel. You should see the Gitea login from an external network.
Remove the public access path and test
Twingate doesn't remove existing router or firewall rules for you. Remove any port forwards and other public routes to Gitea that you no longer need, and check for other ways the service may be exposed. Then test from an external network, such as a phone on cellular data:
With the Twingate Client disconnected, confirm you can't reach Gitea through its former public address.
Connect the Client, satisfy the policy, and confirm you can reach Gitea at its configured address and port.
Confirm unrelated LAN addresses aren't reachable through Twingate, and review the user's other group grants and Resources.
These checks help validate your setup; they aren't a complete security audit. Keep Gitea and its host patched, and check your router and other services separately.
What you've reduced
No inbound port forward is required for the Connector. Removing the old Gitea forward reduces its direct exposure, but doesn't close unrelated ports or other public access paths.
Gitea doesn't need a publicly reachable HTTP endpoint. If all other public paths are closed, internet scanners can't directly reach that private endpoint. This doesn't guarantee your home IP or hostname is undiscoverable elsewhere.
Access through Twingate is limited by the Resources and policies you grant. A narrowly scoped Gitea Resource doesn't by itself grant Twingate access to your router, NAS, or other LAN devices.
An unpatched application still has a vulnerability. Restricting access reduces who can reach it over that path, but authorized users, compromised devices, local users, or an overlooked public route can still present risks.
That last point is worth sitting with. ZTNA doesn't patch your software; it changes who can reach it through the protected path. The Gitea advisory explains how open registration can let a visitor obtain the write access this exploit needs. A private Resource can keep an unauthenticated internet user from reaching the registration page through Twingate, provided other access paths are closed. Update Gitea to 1.27.1 or later and disable open registration if you don't need it.
Compared to a mesh overlay
Both approaches can work without manually forwarding inbound ports. The difference shows up in how access is granted after that.
Mesh VPN overlay | Twingate (outbound Connector) | |
|---|---|---|
Inbound port forward required | Usually no | No |
What the client connects to | A virtual network of devices | Authorized Resources through Connectors |
Can client reach LAN services? | Mesh devices directly; other LAN addresses through a subnet router, subject to policy | Through authorized Resources reachable by a Connector, subject to policy |
Access model | Device-to-device on the mesh | User-to-resource |
Policy location | Single tailnet policy file (HuJSON, with a visual editor) | Per-resource, GUI-managed |
Granting a friend access to one service | Share the machine by invite, optionally restrict by policy | Invite user, add to group, assign resource |
Mesh overlays are elegant for setups where you want flat connectivity across all your devices. If you're syncing a laptop, a NAS, a VPS, and a desktop and want them to talk to each other freely, mesh is a good fit. If you're trying to grant a specific set of people access to one service without granting them Twingate access to other Resources, resource-level access is a good fit.
Closing
For more on setting up Connectors, adding Resources, and managing access to your home services, check out the Twingate documentation.
New to Twingate? You can use Twingate for free for up to 5 users, explore the Home plan for non-commercial homelab use, request a personalized demo, or reach out to the team over on the Twingate subreddit.
Rapidly implement a modern Zero Trust network that is more secure and maintainable than VPNs.
How to Reach Your Home Server From Anywhere Without Opening Your Network

A walkthrough of the four common ways to reach a home server remotely, why "just put it behind a reverse proxy" stopped being enough, and how to set up outbound-only access to a single service with Twingate.
On August 25, 2026, CISA added CVE-2026-60004 to its Known Exploited Vulnerabilities catalog: a CVSS 9.8 remote code execution flaw in self-hosted Gitea. A user with repository write access can exploit it. On instances that allow open sign-up (Gitea's default), an attacker can register an account and create a repository to obtain that access. Gitea fixed the flaw in version 1.27.1; update to that version or later and disable open registration if you don't need it.
A default reverse proxy wouldn't necessarily stop this kind of attack: it forwards requests to the application, and the vulnerability lived in the application behind it.
This is the uncomfortable part of self-hosting that doesn't come up until something breaks: how you reach your services from outside your network changes the shape of your attack surface. Some setups expose an HTTP endpoint to the entire internet. Some expose a UDP port that ignores anything unauthenticated. Some expose nothing at all. If you're running Gitea, Jellyfin, Home Assistant, Immich, or anything else you want to reach from your phone, it's worth knowing which category you're actually in.
The four common approaches
Here's how most people solve the "reach my home server from anywhere" problem, and what each one leaves reachable from the public internet.
Approach | Inbound ports open | What's reachable from the internet | Access model |
|---|---|---|---|
Port forward + reverse proxy | 80/443 (or custom) | The reverse proxy, and by extension every service behind it | Network-level |
Self-hosted WireGuard endpoint | 1 UDP port (usually 51820) | The WireGuard listener, which drops unauthenticated packets silently | Network-level (once in, you're on the LAN) |
Mesh VPN overlay (e.g., WireGuard-based mesh products) | Usually no manual port forward | No public application endpoint is required; authenticated peers connect directly or through a relay | Network-level across the mesh |
Outbound-only connector (ZTNA) | No inbound port forward required | No public application endpoint is required; authorized clients connect through a Connector | Per-resource |
A quick tour of each, and then we'll build the last one.
Port forwarding behind a reverse proxy
You open 443 on your router, point it at an Nginx, Caddy, or Traefik instance, and let the proxy route hostnames to internal services. It works. It's also the kind of setup that leaves an application like Gitea reachable by anyone on the internet.
The reverse proxy is good at handling TLS, routing, and basic request filtering. Out of the box, it does not inspect application-layer logic for the services behind it. If your Gitea has an RCE triggered by a crafted HTTP request, a default proxy config will forward that request. You can add forward authentication (Authelia, Authentik) or block specific endpoints, but that's extra configuration you have to know to add before the vulnerability is public.
This approach also puts your real IP, your hostname, and a fingerprintable HTTP response on the public internet. Shodan will find you. Mass scanners will find you. The question isn't whether traffic hits your proxy — it's whether any of it exploits a service you haven't patched yet.
Self-hosted WireGuard
A single UDP port, usually 51820, listening on your router or a VM. WireGuard is designed so that packets from unknown peers are dropped without a response. From an attacker's perspective, the port looks closed. There's no banner, no handshake, no acknowledgment.
This is a genuine security improvement over exposing HTTP services. The attack surface is a small, well-reviewed codebase rather than a sprawling Rails or Go application. The tradeoff: once a client authenticates, it's on your LAN with whatever routing rules you've configured. That's fine for personal use. It's less fine if you want to give someone access to just one service without handing over the keys to your whole network.
Mesh VPN overlays
Mesh VPN products (the Tailscale-style category) typically work without manually forwarding inbound ports. Devices coordinate connections, use NAT traversal to connect directly when possible, and fall back to a relay when needed. You access services by their mesh IP or MagicDNS name.
This is a real step forward on exposure. It's still a network-level model, though. The default policy allows every device on the tailnet to connect to every other device, and access rules live in a single tailnet policy file. You can narrow that with policy rules, or share a single machine with someone outside your tailnet. But the starting point is open connectivity, and you rely on policy configuration to restrict it.
Outbound-only connectors (ZTNA)
This is the model Twingate uses. A lightweight Connector runs inside your network and establishes outbound connections to Twingate. No inbound router port forward is required for the Connector. Clients get access to defined Resources, such as gitea.home.lan or 192.168.1.50, rather than joining a mesh of devices. You can also restrict the permitted ports.
Twingate uses access controls at the Client and Connector to authorize traffic to Resources. A user granted access only to a narrowly defined Gitea Resource can't use Twingate to reach unrelated LAN devices. This restriction applies to the Twingate path; it doesn't block access through another VPN, a local connection, an existing public endpoint, or an overly broad Resource definition. Twingate can proxy TCP, UDP, and ICMP traffic for authorized Resources.
That's the setup we're going to build.
What you're building
By the end of this walkthrough, you'll have:
A Twingate Connector running on your home network (Docker, or directly on a Pi/NAS)
A single Resource defined — let's use Gitea as the example — with per-resource access
MFA required before access is granted
No inbound port forward needed for Twingate, with any existing Gitea port forwards removed
A client on your phone or laptop that can reach your Gitea Resource remotely, without Twingate access to unrelated Resources
Prerequisites
A device on your home network that can run Docker, or a Linux host (a Raspberry Pi 4+, an old NUC, or a VM on your NAS all work fine)
A Twingate account. The free Starter plan covers up to 5 users. Check current pricing for Resource Policy and native MFA availability. The Home plan is $15 per month and limited to non-commercial use.
A supported login provider. Social login options include Google, Microsoft, GitHub, and LinkedIn. Check the identity provider documentation and current plan details before choosing an enterprise IdP.
The internal hostname or IP of the service you want to reach
Step 1: Create a Remote Network
In the Twingate admin console, go to Network → Remote Networks and click Add Remote Network. Name it something like home and choose On Premise as the location.
A Remote Network is a logical grouping — it represents your home LAN. Connectors deployed into this network can serve Resources that live inside it.
Step 2: Deploy a Connector
In the Remote Network you just created, click Deploy Connector, choose Docker, and generate a pair of tokens. Follow the admin console’s setup instructions to deploy the Connector on a Linux host inside your home network. The Connector establishes outbound connections, so no inbound firewall changes are needed. Within a minute or so, its status should turn green in the admin console.
For redundancy, deploy two Connectors on separate hosts. They provide automatic load balancing and failover, though an active connection may need to reconnect during an outage or restart. Each Connector needs its own token pair, and both must be able to resolve and reach the same Resources. One Connector may be enough for a homelab if you can tolerate downtime. Treat the tokens as secrets; don't share the generated command or commit it to a repository.
If you'd rather not run Docker, the Connector can also run as a systemd service on Linux. The Connector is small and runs happily on a Raspberry Pi.
Step 3: Define the Resource
Still in the Remote Network view, click Add Resource. Enter the internal address of the service you want to expose. For Gitea, that might be:
gitea.home.lan(if your Connector can resolve it using internal DNS)192.168.1.42(if you prefer to use an IP address)
Enter the hostname or IP as the Resource address; configure port restrictions separately. The Connector must be able to resolve the hostname and reach the service on the selected port.
Give it a user-facing name like Gitea. You can also set an alias, such as gitea.int, so an authorized client can reach the Resource by that name without creating a DNS entry for the alias. An alias doesn't automatically make your application's TLS certificate valid for that name; use a certificate matching the hostname in your browser.
By default, a Resource allows all TCP and UDP ports and ICMP ping. Restrict it to what you need — for example, TCP 3000 for the web UI and TCP 22 only if you use Git over SSH. Disable ICMP if you don't need it.
This is the piece that makes per-resource access work. If Gitea is the only Resource granted to a user, they can't reach your router's admin page through Twingate unless another authorized Resource also covers it. Avoid broad CIDR or wildcard Resources if your goal is access to just one service.
Step 4: Set up a Security Policy with MFA
Check pricing for native MFA and Resource Policy availability on your plan. In the admin console, go to Policies → Resource Policies and edit the default policy or create a new one. Set:
Authentication: required
MFA: required
Authentication frequency: choose a re-authentication interval appropriate for your setup, such as 24 hours
Open the Gitea Resource and assign the policy. Check its group-level policy overrides too: if a user belongs to multiple groups with different applicable policies, Twingate may select a less restrictive one.
A Resource Policy applies when the user accesses that Resource; a separate Sign In Policy controls the Client's sign-in requirements. Twingate can enforce native MFA independently of your identity provider. If your provider already requires MFA, Twingate's MFA documentation recommends configuring MFA in one place rather than both to avoid duplicate prompts. MFA reduces the risk from a stolen password, but it doesn't eliminate account or device compromise.
Step 5: Assign access to a Group
Under Team → Groups, create a group called something like Gitea Users. Add yourself. In the Gitea Resource, open Access and grant the group permission.
If you want to share access with a friend, invite them and add them to the group. They'll have Twingate access to Gitea under the assigned policy, not to unrelated Resources. Gitea's own permissions still control which repositories they can use. To revoke Twingate access, remove the user from the group and verify they don't have access through another group; for urgent offboarding, also block their device and deactivate their identity as appropriate.
Step 6: Install the Client
On your laptop or phone, download the Twingate client, sign in with the same identity, and complete MFA. The client registers, pulls down a signed list of the resources you have access to, and starts intercepting DNS queries for those hostnames.
Open a browser and go to the address and port your service uses. For example, if Gitea serves HTTP directly on port 3000, use http://gitea.home.lan:3000; if a reverse proxy serves HTTPS on port 443, use https://gitea.home.lan. Substitute your alias if you configured one, and make sure the certificate matches the hostname when using HTTPS. Prefer HTTPS: HTTP traffic between the Connector and Gitea isn't protected by the Client-to-Connector tunnel. You should see the Gitea login from an external network.
Remove the public access path and test
Twingate doesn't remove existing router or firewall rules for you. Remove any port forwards and other public routes to Gitea that you no longer need, and check for other ways the service may be exposed. Then test from an external network, such as a phone on cellular data:
With the Twingate Client disconnected, confirm you can't reach Gitea through its former public address.
Connect the Client, satisfy the policy, and confirm you can reach Gitea at its configured address and port.
Confirm unrelated LAN addresses aren't reachable through Twingate, and review the user's other group grants and Resources.
These checks help validate your setup; they aren't a complete security audit. Keep Gitea and its host patched, and check your router and other services separately.
What you've reduced
No inbound port forward is required for the Connector. Removing the old Gitea forward reduces its direct exposure, but doesn't close unrelated ports or other public access paths.
Gitea doesn't need a publicly reachable HTTP endpoint. If all other public paths are closed, internet scanners can't directly reach that private endpoint. This doesn't guarantee your home IP or hostname is undiscoverable elsewhere.
Access through Twingate is limited by the Resources and policies you grant. A narrowly scoped Gitea Resource doesn't by itself grant Twingate access to your router, NAS, or other LAN devices.
An unpatched application still has a vulnerability. Restricting access reduces who can reach it over that path, but authorized users, compromised devices, local users, or an overlooked public route can still present risks.
That last point is worth sitting with. ZTNA doesn't patch your software; it changes who can reach it through the protected path. The Gitea advisory explains how open registration can let a visitor obtain the write access this exploit needs. A private Resource can keep an unauthenticated internet user from reaching the registration page through Twingate, provided other access paths are closed. Update Gitea to 1.27.1 or later and disable open registration if you don't need it.
Compared to a mesh overlay
Both approaches can work without manually forwarding inbound ports. The difference shows up in how access is granted after that.
Mesh VPN overlay | Twingate (outbound Connector) | |
|---|---|---|
Inbound port forward required | Usually no | No |
What the client connects to | A virtual network of devices | Authorized Resources through Connectors |
Can client reach LAN services? | Mesh devices directly; other LAN addresses through a subnet router, subject to policy | Through authorized Resources reachable by a Connector, subject to policy |
Access model | Device-to-device on the mesh | User-to-resource |
Policy location | Single tailnet policy file (HuJSON, with a visual editor) | Per-resource, GUI-managed |
Granting a friend access to one service | Share the machine by invite, optionally restrict by policy | Invite user, add to group, assign resource |
Mesh overlays are elegant for setups where you want flat connectivity across all your devices. If you're syncing a laptop, a NAS, a VPS, and a desktop and want them to talk to each other freely, mesh is a good fit. If you're trying to grant a specific set of people access to one service without granting them Twingate access to other Resources, resource-level access is a good fit.
Closing
For more on setting up Connectors, adding Resources, and managing access to your home services, check out the Twingate documentation.
New to Twingate? You can use Twingate for free for up to 5 users, explore the Home plan for non-commercial homelab use, request a personalized demo, or reach out to the team over on the Twingate subreddit.
Rapidly implement a modern Zero Trust network that is more secure and maintainable than VPNs.
How to Reach Your Home Server From Anywhere Without Opening Your Network

A walkthrough of the four common ways to reach a home server remotely, why "just put it behind a reverse proxy" stopped being enough, and how to set up outbound-only access to a single service with Twingate.
On August 25, 2026, CISA added CVE-2026-60004 to its Known Exploited Vulnerabilities catalog: a CVSS 9.8 remote code execution flaw in self-hosted Gitea. A user with repository write access can exploit it. On instances that allow open sign-up (Gitea's default), an attacker can register an account and create a repository to obtain that access. Gitea fixed the flaw in version 1.27.1; update to that version or later and disable open registration if you don't need it.
A default reverse proxy wouldn't necessarily stop this kind of attack: it forwards requests to the application, and the vulnerability lived in the application behind it.
This is the uncomfortable part of self-hosting that doesn't come up until something breaks: how you reach your services from outside your network changes the shape of your attack surface. Some setups expose an HTTP endpoint to the entire internet. Some expose a UDP port that ignores anything unauthenticated. Some expose nothing at all. If you're running Gitea, Jellyfin, Home Assistant, Immich, or anything else you want to reach from your phone, it's worth knowing which category you're actually in.
The four common approaches
Here's how most people solve the "reach my home server from anywhere" problem, and what each one leaves reachable from the public internet.
Approach | Inbound ports open | What's reachable from the internet | Access model |
|---|---|---|---|
Port forward + reverse proxy | 80/443 (or custom) | The reverse proxy, and by extension every service behind it | Network-level |
Self-hosted WireGuard endpoint | 1 UDP port (usually 51820) | The WireGuard listener, which drops unauthenticated packets silently | Network-level (once in, you're on the LAN) |
Mesh VPN overlay (e.g., WireGuard-based mesh products) | Usually no manual port forward | No public application endpoint is required; authenticated peers connect directly or through a relay | Network-level across the mesh |
Outbound-only connector (ZTNA) | No inbound port forward required | No public application endpoint is required; authorized clients connect through a Connector | Per-resource |
A quick tour of each, and then we'll build the last one.
Port forwarding behind a reverse proxy
You open 443 on your router, point it at an Nginx, Caddy, or Traefik instance, and let the proxy route hostnames to internal services. It works. It's also the kind of setup that leaves an application like Gitea reachable by anyone on the internet.
The reverse proxy is good at handling TLS, routing, and basic request filtering. Out of the box, it does not inspect application-layer logic for the services behind it. If your Gitea has an RCE triggered by a crafted HTTP request, a default proxy config will forward that request. You can add forward authentication (Authelia, Authentik) or block specific endpoints, but that's extra configuration you have to know to add before the vulnerability is public.
This approach also puts your real IP, your hostname, and a fingerprintable HTTP response on the public internet. Shodan will find you. Mass scanners will find you. The question isn't whether traffic hits your proxy — it's whether any of it exploits a service you haven't patched yet.
Self-hosted WireGuard
A single UDP port, usually 51820, listening on your router or a VM. WireGuard is designed so that packets from unknown peers are dropped without a response. From an attacker's perspective, the port looks closed. There's no banner, no handshake, no acknowledgment.
This is a genuine security improvement over exposing HTTP services. The attack surface is a small, well-reviewed codebase rather than a sprawling Rails or Go application. The tradeoff: once a client authenticates, it's on your LAN with whatever routing rules you've configured. That's fine for personal use. It's less fine if you want to give someone access to just one service without handing over the keys to your whole network.
Mesh VPN overlays
Mesh VPN products (the Tailscale-style category) typically work without manually forwarding inbound ports. Devices coordinate connections, use NAT traversal to connect directly when possible, and fall back to a relay when needed. You access services by their mesh IP or MagicDNS name.
This is a real step forward on exposure. It's still a network-level model, though. The default policy allows every device on the tailnet to connect to every other device, and access rules live in a single tailnet policy file. You can narrow that with policy rules, or share a single machine with someone outside your tailnet. But the starting point is open connectivity, and you rely on policy configuration to restrict it.
Outbound-only connectors (ZTNA)
This is the model Twingate uses. A lightweight Connector runs inside your network and establishes outbound connections to Twingate. No inbound router port forward is required for the Connector. Clients get access to defined Resources, such as gitea.home.lan or 192.168.1.50, rather than joining a mesh of devices. You can also restrict the permitted ports.
Twingate uses access controls at the Client and Connector to authorize traffic to Resources. A user granted access only to a narrowly defined Gitea Resource can't use Twingate to reach unrelated LAN devices. This restriction applies to the Twingate path; it doesn't block access through another VPN, a local connection, an existing public endpoint, or an overly broad Resource definition. Twingate can proxy TCP, UDP, and ICMP traffic for authorized Resources.
That's the setup we're going to build.
What you're building
By the end of this walkthrough, you'll have:
A Twingate Connector running on your home network (Docker, or directly on a Pi/NAS)
A single Resource defined — let's use Gitea as the example — with per-resource access
MFA required before access is granted
No inbound port forward needed for Twingate, with any existing Gitea port forwards removed
A client on your phone or laptop that can reach your Gitea Resource remotely, without Twingate access to unrelated Resources
Prerequisites
A device on your home network that can run Docker, or a Linux host (a Raspberry Pi 4+, an old NUC, or a VM on your NAS all work fine)
A Twingate account. The free Starter plan covers up to 5 users. Check current pricing for Resource Policy and native MFA availability. The Home plan is $15 per month and limited to non-commercial use.
A supported login provider. Social login options include Google, Microsoft, GitHub, and LinkedIn. Check the identity provider documentation and current plan details before choosing an enterprise IdP.
The internal hostname or IP of the service you want to reach
Step 1: Create a Remote Network
In the Twingate admin console, go to Network → Remote Networks and click Add Remote Network. Name it something like home and choose On Premise as the location.
A Remote Network is a logical grouping — it represents your home LAN. Connectors deployed into this network can serve Resources that live inside it.
Step 2: Deploy a Connector
In the Remote Network you just created, click Deploy Connector, choose Docker, and generate a pair of tokens. Follow the admin console’s setup instructions to deploy the Connector on a Linux host inside your home network. The Connector establishes outbound connections, so no inbound firewall changes are needed. Within a minute or so, its status should turn green in the admin console.
For redundancy, deploy two Connectors on separate hosts. They provide automatic load balancing and failover, though an active connection may need to reconnect during an outage or restart. Each Connector needs its own token pair, and both must be able to resolve and reach the same Resources. One Connector may be enough for a homelab if you can tolerate downtime. Treat the tokens as secrets; don't share the generated command or commit it to a repository.
If you'd rather not run Docker, the Connector can also run as a systemd service on Linux. The Connector is small and runs happily on a Raspberry Pi.
Step 3: Define the Resource
Still in the Remote Network view, click Add Resource. Enter the internal address of the service you want to expose. For Gitea, that might be:
gitea.home.lan(if your Connector can resolve it using internal DNS)192.168.1.42(if you prefer to use an IP address)
Enter the hostname or IP as the Resource address; configure port restrictions separately. The Connector must be able to resolve the hostname and reach the service on the selected port.
Give it a user-facing name like Gitea. You can also set an alias, such as gitea.int, so an authorized client can reach the Resource by that name without creating a DNS entry for the alias. An alias doesn't automatically make your application's TLS certificate valid for that name; use a certificate matching the hostname in your browser.
By default, a Resource allows all TCP and UDP ports and ICMP ping. Restrict it to what you need — for example, TCP 3000 for the web UI and TCP 22 only if you use Git over SSH. Disable ICMP if you don't need it.
This is the piece that makes per-resource access work. If Gitea is the only Resource granted to a user, they can't reach your router's admin page through Twingate unless another authorized Resource also covers it. Avoid broad CIDR or wildcard Resources if your goal is access to just one service.
Step 4: Set up a Security Policy with MFA
Check pricing for native MFA and Resource Policy availability on your plan. In the admin console, go to Policies → Resource Policies and edit the default policy or create a new one. Set:
Authentication: required
MFA: required
Authentication frequency: choose a re-authentication interval appropriate for your setup, such as 24 hours
Open the Gitea Resource and assign the policy. Check its group-level policy overrides too: if a user belongs to multiple groups with different applicable policies, Twingate may select a less restrictive one.
A Resource Policy applies when the user accesses that Resource; a separate Sign In Policy controls the Client's sign-in requirements. Twingate can enforce native MFA independently of your identity provider. If your provider already requires MFA, Twingate's MFA documentation recommends configuring MFA in one place rather than both to avoid duplicate prompts. MFA reduces the risk from a stolen password, but it doesn't eliminate account or device compromise.
Step 5: Assign access to a Group
Under Team → Groups, create a group called something like Gitea Users. Add yourself. In the Gitea Resource, open Access and grant the group permission.
If you want to share access with a friend, invite them and add them to the group. They'll have Twingate access to Gitea under the assigned policy, not to unrelated Resources. Gitea's own permissions still control which repositories they can use. To revoke Twingate access, remove the user from the group and verify they don't have access through another group; for urgent offboarding, also block their device and deactivate their identity as appropriate.
Step 6: Install the Client
On your laptop or phone, download the Twingate client, sign in with the same identity, and complete MFA. The client registers, pulls down a signed list of the resources you have access to, and starts intercepting DNS queries for those hostnames.
Open a browser and go to the address and port your service uses. For example, if Gitea serves HTTP directly on port 3000, use http://gitea.home.lan:3000; if a reverse proxy serves HTTPS on port 443, use https://gitea.home.lan. Substitute your alias if you configured one, and make sure the certificate matches the hostname when using HTTPS. Prefer HTTPS: HTTP traffic between the Connector and Gitea isn't protected by the Client-to-Connector tunnel. You should see the Gitea login from an external network.
Remove the public access path and test
Twingate doesn't remove existing router or firewall rules for you. Remove any port forwards and other public routes to Gitea that you no longer need, and check for other ways the service may be exposed. Then test from an external network, such as a phone on cellular data:
With the Twingate Client disconnected, confirm you can't reach Gitea through its former public address.
Connect the Client, satisfy the policy, and confirm you can reach Gitea at its configured address and port.
Confirm unrelated LAN addresses aren't reachable through Twingate, and review the user's other group grants and Resources.
These checks help validate your setup; they aren't a complete security audit. Keep Gitea and its host patched, and check your router and other services separately.
What you've reduced
No inbound port forward is required for the Connector. Removing the old Gitea forward reduces its direct exposure, but doesn't close unrelated ports or other public access paths.
Gitea doesn't need a publicly reachable HTTP endpoint. If all other public paths are closed, internet scanners can't directly reach that private endpoint. This doesn't guarantee your home IP or hostname is undiscoverable elsewhere.
Access through Twingate is limited by the Resources and policies you grant. A narrowly scoped Gitea Resource doesn't by itself grant Twingate access to your router, NAS, or other LAN devices.
An unpatched application still has a vulnerability. Restricting access reduces who can reach it over that path, but authorized users, compromised devices, local users, or an overlooked public route can still present risks.
That last point is worth sitting with. ZTNA doesn't patch your software; it changes who can reach it through the protected path. The Gitea advisory explains how open registration can let a visitor obtain the write access this exploit needs. A private Resource can keep an unauthenticated internet user from reaching the registration page through Twingate, provided other access paths are closed. Update Gitea to 1.27.1 or later and disable open registration if you don't need it.
Compared to a mesh overlay
Both approaches can work without manually forwarding inbound ports. The difference shows up in how access is granted after that.
Mesh VPN overlay | Twingate (outbound Connector) | |
|---|---|---|
Inbound port forward required | Usually no | No |
What the client connects to | A virtual network of devices | Authorized Resources through Connectors |
Can client reach LAN services? | Mesh devices directly; other LAN addresses through a subnet router, subject to policy | Through authorized Resources reachable by a Connector, subject to policy |
Access model | Device-to-device on the mesh | User-to-resource |
Policy location | Single tailnet policy file (HuJSON, with a visual editor) | Per-resource, GUI-managed |
Granting a friend access to one service | Share the machine by invite, optionally restrict by policy | Invite user, add to group, assign resource |
Mesh overlays are elegant for setups where you want flat connectivity across all your devices. If you're syncing a laptop, a NAS, a VPS, and a desktop and want them to talk to each other freely, mesh is a good fit. If you're trying to grant a specific set of people access to one service without granting them Twingate access to other Resources, resource-level access is a good fit.
Closing
For more on setting up Connectors, adding Resources, and managing access to your home services, check out the Twingate documentation.
New to Twingate? You can use Twingate for free for up to 5 users, explore the Home plan for non-commercial homelab use, request a personalized demo, or reach out to the team over on the Twingate subreddit.
Solutions
Solutions
The VPN replacement your workforce will love.
Solutions