Pugmatt / BedrockConnect

Join any Minecraft Bedrock Edition server IP on Xbox One, Nintendo Switch, and PS4/PS5
GNU General Public License v3.0
1.39k stars 161 forks source link

Instructions for self-hosting alongside pihole #346

Open Warmax356 opened 1 year ago

Warmax356 commented 1 year ago

So if you are like me already running a pi-hole instance on linux and would like to run bedrock connect on the same instance where phole is.

This not for the workaround method of inputting the offical urls and using an ip from the serverlist of bedrock connect to connect the devices just to be clear!

my reason for this request is that i am based in malta the closest 2 eu servers listed are uk and germany with over 60 ms ping and usa at over 150ms ping

the eu ones seem to get out of date fast and would like to self host, but my current dns server is pihole on a raspberry pi and would not like to have 2 dns systems running (dns clashing) while pihole is very good at what it does is there a way to integrate bedrock connect into pihole?

Meaning my piholes ip is also the bedrock connects converter. Or am i miss undersranding and there is a simpler way of this with pihole?

So setup would be modem - firewall - rpi (rasboan linux with phole bedrock connect) and anyone local may use this bedrock connect via vpn (for secuirty reasons as not to get doxed by bots and i have a dynamic ip)

Warmax356 commented 1 year ago

@Pugmatt is this possible?, as now the only one not showing out-of-date from the server list on xbox is yours.

i am also looking into finding a cheap vps in europe with decent level of latency to malta to maybe host it publicly instead, though we are a group of around 20 console players wanting to connect to our local MC server

Pugmatt commented 1 year ago

Sorry this issue passed my radar somehow. I don't really know much about PiHole and have never used it, so I'll try to help the best I can. If you're talking about hosting the BedrockConnect .jar instance on the same machine as your PiHole, I don't see why not, as they run on different ports.

If you're talking about the DNS part of it, such as by using BIND like in the Linux BedrockConnect guide, I don't think it would be possible to have two running DNS servers running on the same instance/IP address, since they both would need port 53. But since PiHole seems to be a DNS server itself, or at least I'm assuming, you could use that as the DNS server for BedrockConnect. This would work I imagine if PiHole allows you to modify or set custom DNS records outside of it's default ones. Do you know if that's possible in PiHole's settings?

Also, someone happened to submit another EU/Germany instance today, if you need an instance in the meantime. Try the one maintained by "LazyBirb" https://github.com/Pugmatt/BedrockConnect#publicly-available-bedrockconnect-instances

CrafterPika commented 1 year ago

it’s possible to set replace domains with pihole, as it relies on dnsmasq. How? I don’t know right will look later.

Warmax356 commented 1 year ago

Sorry this issue passed my radar somehow. I don't really know much about PiHole and have never used it, so I'll try to help the best I can. If you're talking about hosting the BedrockConnect .jar instance on the same machine as your PiHole, I don't see why not, as they run on different ports.

If you're talking about the DNS part of it, such as by using BIND like in the Linux BedrockConnect guide, I don't think it would be possible to have two running DNS servers running on the same instance/IP address, since they both would need port 53. But since PiHole seems to be a DNS server itself, or at least I'm assuming, you could use that as the DNS server for BedrockConnect. This would work I imagine if PiHole allows you to modify or set custom DNS records outside of it's default ones. Do you know if that's possible in PiHole's settings?

Also, someone happened to submit another EU/Germany instance today, if you need an instance in the meantime. Try the one maintained by "LazyBirb" https://github.com/Pugmatt/BedrockConnect#publicly-available-bedrockconnect-instances

thanks i have tried lazybirb and i am able to connect to the server via him all others in EU show up as out of date version, and boots me back to the offical realms, i will try the linux install without bind and see if pihole and the java applet play nice...

Warmax356 commented 1 year ago

it’s possible to set replace domains with pihole, as it relies on dnsmasq. How? I don’t know right will look later.

yes under http://192.168.X.X/admin/dns_records.php

this takes A / AAAA records, or else under the CNAME option on the second page in the menu on the left, if the java applet works using the same ip then i would need to give the PI its own IP (not localhost i am assuming, and i also assuming the java applet runs on a different port)

if they both end up working and playing nice i will document this for the FAQ/SETUP for Localised instances

Warmax356 commented 1 year ago

Great... Installed java, ran the java applet skipping bind installer,

Used the bindip=piholeip and custom_servers= startup and now it seems xbox can not phone home to verify gamepass...

Warmax356 commented 1 year ago

Just added another usb ethernet to my pi and will re run the inatance of bedrock connect to bind to another ip of the same device hopefully it works fingers crossed

Warmax356 commented 1 year ago

Screenshot_2022-11-24-00-02-02-909_com server auditor ssh client So it seems when running the applet and leaving 8t a minute i get the following error before getting the bedrock connected started... @Pugmatt is this a failure that is concerning or something that may be ignored as htop marks 3 processes running after launch

Pugmatt commented 1 year ago

As the error suggests, it looks like you have custom_servers set to a path of a directory and not a file. customer_servers should be a path to a JSON file. Example: custom_servers=/home/warren/Public/servers.json

Warmax356 commented 1 year ago

thanks, did not notice that, was starting to doze off at the time tbh, will give it another shot and see if it works.

kmpoppe commented 1 year ago

@Warmax356 is this still an issue for you, if so, please say so within one week (June 17th 2023), otherwise this issue will be closed.