I downloaded the Fabric server jar file to a GitHub Codespace and am able to run the server without trouble. However, I am unable to determine the IP needed to connect to the server. Starting the server automatically forwards port 25565 and I make the port public. However, I can't figure out which IP to paste into Minecraft to connect to it. How do I figure out the IP of the server?
            Asked
            
        
        
            Active
            
        
            Viewed 854 times
        
    1 Answers
0
            I found an answer thanks to inspiration from this question.
Steps:
- Set up the fabric server jar as you normally would, but on the codespace. Start the server.
 - Split the terminal so one is running Java (server console) and the other is running bash.
 - Install ngrok via 
npm i ngrok --save-dev. - Once the server is finished setting up, run the command 
./node_modules/.bin/ngrok tcp 25565. - Copy the ip shown under Forwarding (minus the 
tcp://part and including the port). This should look something like4.tcp.ngrok.io:17063. 
You now have the ip of the server!
Note: The free version of ngrok has URLs which change every time, as well as a limit, but for small-scale servers this shouldn't be an issue. You are also limited by the free codespace usage limit GitHub puts in place. (Edit: found out this is against their ToS; you can only have one free account) However, you can easily get around this by creating a secondary account that you use codespaces on only for the server.
        AdamRaichu
        
- 149
 - 1
 - 13