Deploy NetBird Peer
NetBird peer in a rootless container. Provide a setup key to connect.
NetBird Peer
Just deployed
/var/lib/netbird
Deploy and Host NetBird Peer on Railway
NetBird Peer is the client agent of NetBird, an open-source WireGuard-based mesh VPN. Once registered with a Management Service, the peer joins a private overlay network where it can communicate with other peers over encrypted point-to-point tunnels, with NAT traversal handled automatically and zero-trust access policies enforced centrally.
About Hosting NetBird Peer
Hosting a NetBird Peer on Railway means running the netbirdio/netbird container — the rootless variant, since Railway containers don't grant the NET_ADMIN / SYS_ADMIN / SYS_RESOURCE capabilities or /dev/net/tun access that the standard image expects, so userspace WireGuard is the realistic path. Note that userspace WireGuard has lower throughput than kernel WireGuard. The peer authenticates to a Management Service using a setup key passed via NB_SETUP_KEY and keeps a persistent WireGuard session alive, with a mounted volume preserving its identity across restarts. Only outbound traffic is needed; no public ports have to be exposed.
Common Use Cases
- Giving Railway services a stable presence on a private mesh so they can reach databases, internal APIs, or admin tools running on-prem or in another cloud, without exposing those resources to the public internet.
- Acting as a routing peer / gateway between Railway and a wider NetBird network, bridging environments for hybrid deployments or migrations.
- Providing developers and operators secure access to Railway-hosted private services through their NetBird overlay (using NetBird ACLs and SSO) instead of public URLs or shared credentials.
Dependencies for NetBird Peer Hosting
- An existing NetBird Management Service — either NetBird Cloud (
app.netbird.io) or a self-hosted deployment of the management/signal/relay stack. - A valid setup key generated in the NetBird dashboard under Setup Keys (use a reusable key if the peer may be recreated by Railway).
Deployment Dependencies
- NetBird documentation: https://docs.netbird.io
- Docker install guide (peer/client): https://docs.netbird.io/get-started/install/docker
- Setup keys reference: https://docs.netbird.io/manage/peers/access-infrastructure/setup-keys-add-servers-to-network
- Source repository: https://github.com/netbirdio/netbird
Implementation Details
[Include any code snippets or implementation details. This section is optional. Exclude if nothing to add.]
Why Deploy NetBird Peer on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying NetBird Peer on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
NetBird Peer
netbirdio/netbird:rootless-latestNB_SETUP_KEY
NetBird setup key
