Play with friends
Status, 27 Nov 2026: friends on the same network work today, and Your Den works from far away with two router ports open. Inviting a friend from anywhere with no router settings is coming (the way forward).
What to click today, step by step, and what will change.
Before you start
Both of you need:
- Leyline, from the download page.
- Your own game folder, the same version, added under Game folders. Game files never travel between you.
No account and no website. Your launchers know each other by their own keys.
1. Add each other as friends
- One of you opens Single player, then the Friends area, and presses Show my friend code. It is copied.
- Send the code (
LF1-…) by message or Discord. It works for a day. - The other pastes it under Add a friend and presses Add.
- The first one presses Accept.
On the same network you can skip the code: press Ask on their name under People near you.
2. Start your world
- Single player or the original world: on the Single player page, press the big button. Wait until your game is in.
- Your Den: press Play solo on Home, or Open my Den on the Your Den page.
3. Invite your friend
On the same network (the same router):
- On your Friends list, press Invite on your friend.
- Your friend presses Join on your name within a day.
- Their game logs in by itself. Their character stays on your world: next time they press Join again.
If you don't see each other, check that your firewall lets Leyline talk on private networks.
From far away, Your Den only, today:
- In your router, send ports 3724 and 8085 (TCP) to your PC.
- In Your Den, under How your friend gets in, type your internet address in Your own address and press Save.
- Press Invite a friend and send the link to one friend.
The router steps are in Invite a friend to your Den.
From far away, Single player or the original world: not yet. That invite needed our server, which closed. Until direct joins land, play together on the same network, or in Your Den.
4. Keep it running
Your world is there while Leyline is open and your PC is awake. Set your PC's sleep to Never while friends play. When you close Leyline, your friends' game stops too.
What will change
| Today | Coming |
|---|---|
| Friend codes, or People near you | The same, plus a friend's Passport card |
| Far away: Your Den only, with router ports | Any world, no router settings: the launcher dials your friend by key |
| An invite works for a day | An invite link opens the launcher on Join, and the link keeps working if your PC moves |
| Your friend's character lives on your PC only | Signed saves on both PCs, sealed backups on friends, move to another world |
| Starting a world: one big button | Host, a template, Start, in under a minute |
Read more: Joining a world, Characters that survive, The Passport.
When something goes wrong
- The friend code doesn't work. It lasts a day. Ask for a new one.
- You don't see each other on the same network. Same router? Firewall allowing Leyline on private networks? Use a friend code instead.
- Your friend far away can't reach your Den. Check both ports are sent to this PC, and that your line has its own internet address (some lines share one, and ports can't be opened on those).
- Still stuck? Ask on the Leyline Discord.
These pages are in the repo at docs/leyline. Source