Every Fly.io organization comes with a private network that lets all your apps connect to each other. This is super convenient when you need to have microservices call each other’s endpoints or use Flycast to let your private apps turn off when you’re not using them. However, this isn’t just limited to your apps. You can jack into this network with WireGuard. This blueprint shows you how to create a WireGuard peer to your private network and connect to it so that you can access it from anywhere.
Prerequisites
To get started, you need to have the following:- A fly.io account
flyctlinstalled (https://fly.io/docs/hands-on/install-flyctl/)- The WireGuard client installed
Steps
To create a WireGuard peer, you need the following information:- The organization you want to create the peer in, such as your personal organization.
- The Fly.io region that’s closest to you.
- The name of the peer, such as your computer’s hostname.
- A filename to save the configuration to.
fly orgs list:
fly platform regions or by checking the regions page in the documentation:
fly wireguard create:
yul.
- Click on the “Import tunnel(s) from file” button.
- Select the configuration file you saved earlier.
- Click on the “Activate” button.
- macOS will ask you if you want to allow the WireGuard app to manage VPN connections. Click “Allow” if you trust it.
_api.internal (on macOS you need to run ping6 _api.internal because it’s an IPv6 address):
OLLAMA_HOSTNAME environment variable to the hostname of the instance you just created (it will be something like xe-ollama.flycast), and then run the following commands:
The sky appears blue because of a phenomenon called Rayleigh scattering, where shorter wavelengths of light (like blue and violet) are scattered more than longer wavelengths (like red and orange) by tiny molecules of gases like nitrogen and oxygen in the Earth’s atmosphere.And there you go! You’re in your private network and can access all your apps and Machines like they were right next to you.