• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Script and tutorial to automate install of "Leaked" 7.70 server

I tried to put all of this into docker and I can't make the cip engine bind to my container ip, I just cant connect to the 7172 port, any ideas if there is a special way to bind cip engine to proper ip? Everything works except the game engine itself (even login server in the same container at 7171)
 

(read the bold part below before trying to help)

I did. For one day. One frickin day. That's how long it worked before everything collapsed like a house of cards :(

I was excited to log on to play today, and found that my Ubuntu suddenly can't reach the internet. I panicked about losing what little time I had saved up to play, and I figured it must be the static IP thing that messed it up, because I haven't done anything else. I tried changing it back to automatic, and that changed my frickin IP. The one time it changes is when I no longer want it to change!
I tried launching the server, and when I start the query manager it says "Unable to create server socket (2)!"
At this point I figured I might as well restore to the latest snapshot. So I did that, and then I realized that this might've reset all my early progress in Tibia, forcing me to start over if I get it working again. Please tell me this isn't the case, I don't think I could handle it. This snapshot crap seems to do a lot more harm than good, and all of this Ubuntu crap is just awfully dysfunctional and unstable, how can I ever trust this stuff to work well enough for me to be able to play daily for months to come? I can't even get more than one day of playing... it seems so fragile I barely even dare to touch it because it'll probably just break on me and then it takes weeks to get it working. How can people willingly put up with this torture :S
Anyway, the restored snapshot had yet another new IP. Go figure! Like, why wouldn't it randomly break on me too? That's what they do, after all. So I re-hex'd the client to be able to connect to it so I can just see if my chars are still there or not before I do anything else. And then I tried launching the server, and guess what; "Unable to create server socket (2)!"
So now I don't think I even have a functional snapshot to restore to. I had no choice but to come here and be a bother again. If this was literally any other game or anything pc-related I would've given up, it feels impossible to even come back from this. But this is the only thing in the world I want to do. I don't care if literally every single other game stops working, I only want to play Tibia. But of course all the others work just fine, and Tibia is the only one refusing to work. "Just my luck" doesn't even begin to describe this bull**it. I haven't been this close to killing myself in a good while now. I don't even know why I'm trying to have it fixed here, it seems so hopeless. But I don't know what to do, all I want is to get to play in peace and it seems there's no way to get to do that :(


Edit: I gave it one last chance to fix it myself, since it felt a bit like everything is lost anyway. I went back to my 2nd newest snapshot, and I got the "Unable to create server socket (2)!" error there too. So I went back yet another one, installed the OT scripts from scratch, hex'd the client to the new IP, got the server running and working, set a static IP, made a new snapshot, and launched Ubuntu again to make sure I do get internet, which I did. So, it appears that this time it all works fine (for now). I even had something improve: The strange laggy feeling I described was indeed a problem, because now all of a sudden the game is smooth as hell and that issue is completely gone. So things are even better than the first time, and I now know how to set everything up from scratch to start playing in like 15 minutes on a fresh Ubuntu (but who knows if I'll remember it in the future, I'm not even sure I remembered every detail now). Losing hours of progress was a high price to pay for it though, so here's my question:
1. When things go wrong in the future, how can I avoid losing my chars? If I lose them all to some issue in this Ubuntu crap when I've gotten far on them, it would be too devastating to even imagine (I was already dangerously low last night, and my spirits remain a little crushed even with things working again, it was such a heavy blow). Is there any way to protect my chars and progress?
Also, if you know what the hell went wrong, like why I suddenly had no internet connection in Ubuntu and what the server socket issue was all about, it wouldn't hurt to know so maybe I can resolve it without a snapshot restoration the next time it happens (might be crucial if restoration will no longer be an option in order to preserve my progress).
 
Last edited:
I tried to put all of this into docker and I can't make the cip engine bind to my container ip, I just cant connect to the 7172 port, any ideas if there is a special way to bind cip engine to proper ip? Everything works except the game engine itself (even login server in the same container at 7171)
Did a docker implementation
here: GitHub - nekiro/dockerized-realots (https://github.com/nekiro/dockerized-realots)
It fails to connect to port 7172 though, I cant find the reason, so if anyone knowledgeable wants to take a look feel free and please submit a pr with fix
 
Did a docker implementation
here: GitHub - nekiro/dockerized-realots (https://github.com/nekiro/dockerized-realots)
It fails to connect to port 7172 though, I cant find the reason, so if anyone knowledgeable wants to take a look feel free and please submit a pr with fix
You need to override the game binary in the tarball with the modified one (the one that is loading satanic libraries).

You also want to decouple your Game.Dockerfile from trying to run everything at once (I assume that is planned, as there are other dockerfiles). You are missing chmod +x on game.sh in either current Game.Dockerfile after copying or just explicitly on the actual file.

You also need to override the .tibia config file with the one in the root of the repository (using 17778 port for QueryManager) instead of copying the one from the tarball. Didn't notice that it's in the readme 🙈

Have fun
 
You need to override the game binary in the tarball with the modified one (the one that is loading satanic libraries).

You also want to decouple your Game.Dockerfile from trying to run everything at once (I assume that is planned, as there are other dockerfiles). You are missing chmod +x on game.sh in either current Game.Dockerfile after copying or just explicitly on the actual file.

You also need to override the .tibia config file with the one in the root of the repository (using 17778 port for QueryManager) instead of copying the one from the tarball. Didn't notice that it's in the readme 🙈

Have fun
I did use the modified binary, just forgot to include in readme, yeah its all in single dockerfile to simulate the setup.sh better, chmod +x on game.sh isnt needed
 
I did use the modified binary, just forgot to include in readme, yeah its all in single dockerfile to simulate the setup.sh better, chmod +x on game.sh isnt needed
It is needed on Linux, at least.

Well, anyway, if you'd check what interface is being bind, you would see it's 127.0.0.1. You won't be able to access this from the host. I have no idea how ip-address.txt works, tried to make it bind 0.0.0.0, or container ip but it doesn't change anything. You'd have to ask someone familiar with cipengine probably.

Here is a docker-compose patch to kind-of solve this:
Code:
diff --git a/docker-compose.yml b/docker-compose.yml
index cde1815..d3f0798 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,11 +5,12 @@ services:
       context: .
       dockerfile: ./docker/Game.Dockerfile
     container_name: game
-    ports:
-      - 7171:7171
-      - 7172:7172
     depends_on:
       - mysql
+    command: >
+      bash -c "rm -f /opt/game/save/game.pid
+      && /opt/exec/game.sh"
+    network_mode: host
     restart: unless-stopped
 
   mysql:
(I have also added removing game.pid here, so you don't have to do down everytime, but just stop :rolleyes:)
This, obviously, also requires you to change mysql host from mysql to 127.0.0.1 in login server and query manager.

1696375667164.png
 
(read the bold part below before trying to help)

I did. For one day. One frickin day. That's how long it worked before everything collapsed like a house of cards :(

I was excited to log on to play today, and found that my Ubuntu suddenly can't reach the internet. I panicked about losing what little time I had saved up to play, and I figured it must be the static IP thing that messed it up, because I haven't done anything else. I tried changing it back to automatic, and that changed my frickin IP. The one time it changes is when I no longer want it to change!
I tried launching the server, and when I start the query manager it says "Unable to create server socket (2)!"
At this point I figured I might as well restore to the latest snapshot. So I did that, and then I realized that this might've reset all my early progress in Tibia, forcing me to start over if I get it working again. Please tell me this isn't the case, I don't think I could handle it. This snapshot crap seems to do a lot more harm than good, and all of this Ubuntu crap is just awfully dysfunctional and unstable, how can I ever trust this stuff to work well enough for me to be able to play daily for months to come? I can't even get more than one day of playing... it seems so fragile I barely even dare to touch it because it'll probably just break on me and then it takes weeks to get it working. How can people willingly put up with this torture :S
Anyway, the restored snapshot had yet another new IP. Go figure! Like, why wouldn't it randomly break on me too? That's what they do, after all. So I re-hex'd the client to be able to connect to it so I can just see if my chars are still there or not before I do anything else. And then I tried launching the server, and guess what; "Unable to create server socket (2)!"
So now I don't think I even have a functional snapshot to restore to. I had no choice but to come here and be a bother again. If this was literally any other game or anything pc-related I would've given up, it feels impossible to even come back from this. But this is the only thing in the world I want to do. I don't care if literally every single other game stops working, I only want to play Tibia. But of course all the others work just fine, and Tibia is the only one refusing to work. "Just my luck" doesn't even begin to describe this bull**it. I haven't been this close to killing myself in a good while now. I don't even know why I'm trying to have it fixed here, it seems so hopeless. But I don't know what to do, all I want is to get to play in peace and it seems there's no way to get to do that :(


Edit: I gave it one last chance to fix it myself, since it felt a bit like everything is lost anyway. I went back to my 2nd newest snapshot, and I got the "Unable to create server socket (2)!" error there too. So I went back yet another one, installed the OT scripts from scratch, hex'd the client to the new IP, got the server running and working, set a static IP, made a new snapshot, and launched Ubuntu again to make sure I do get internet, which I did. So, it appears that this time it all works fine (for now). I even had something improve: The strange laggy feeling I described was indeed a problem, because now all of a sudden the game is smooth as hell and that issue is completely gone. So things are even better than the first time, and I now know how to set everything up from scratch to start playing in like 15 minutes on a fresh Ubuntu (but who knows if I'll remember it in the future, I'm not even sure I remembered every detail now). Losing hours of progress was a high price to pay for it though, so here's my question:
1. When things go wrong in the future, how can I avoid losing my chars? If I lose them all to some issue in this Ubuntu crap when I've gotten far on them, it would be too devastating to even imagine (I was already dangerously low last night, and my spirits remain a little crushed even with things working again, it was such a heavy blow). Is there any way to protect my chars and progress?
Also, if you know what the hell went wrong, like why I suddenly had no internet connection in Ubuntu and what the server socket issue was all about, it wouldn't hurt to know so maybe I can resolve it without a snapshot restoration the next time it happens (might be crucial if restoration will no longer be an option in order to preserve my progress).
The IP won't change if you set the static IP correctly. If you had sent screenshots like we agreed, I would have helped you sooner. There was no need to restore to a previous snapshot, but I'm glad you got it sorted.
Remember that it's not necessarily Ubuntu's fault. If you want to have a stable server, there's no other option: you'll have to learn Ubuntu, networking, database, programming, etc.

I've never needed to create a backup of a char, so I don't know it this will work, but try creating a copy of your char file:
  • In a terminal, run sudo find /home/game/usr -type f -exec grep -l "Name of your char" {} + | xargs sudo gedit
    • This may take a while, but if the command works, a text editor will open up with your char's attributes. Otherwise, it will be empty.
  • Copy the content of the file somewhere else.
An important note is that this process won't backup other stuff like houses and guilds. For the time being, I won't go into details on how to restore the char you just copied, but let me know in case you need it.

In case your IP changes again, I've come up with this script that will update all the required server files. Just tested it on my own server and it worked like a charm:
  • Stop all 3 services (press Ctrl+C in the terminal windows that are running the services)
  • Create a new file in the same folder as the services scripts, then name it "update-ip.sh"
  • Open the file with an editor like "gedit", then paste the following content:
    • Code:
      [/LIST]
      [/LIST]
      #!/bin/bash
      echo "Starting script..."
      # Variables
      GAME_PATH="/home/game"
      PORT=17778
      NEW_IP=$(hostname -I | cut -d' ' -f1)
      IFS='.' read -ra NEW_IP_PARTS <<< "$NEW_IP"
      OLD_IP=$1
      if [ -z "$OLD_IP" ]
      then
          echo "Please enter your OLD IP address:"
          read OLD_IP
      fi
      IFS='.' read -ra OLD_IP_PARTS <<< "$OLD_IP"
      echo "Updating file in '~/.tibia'..."
      sed -i "s/QueryManager = {.*}/QueryManager = {(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\"),(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\"),(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\"),(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\")}/g" ~/.tibia
      echo "Updating MySQL..."
      sed -i "s/^bind-address.*/bind-address = $NEW_IP/g" /etc/mysql/mysql.conf.d/mysqld.cnf
      systemctl restart mysql
      echo "Updating RealOTS query manager..."
      sed -i "s/inet_addr(\"$OLD_IP\")/inet_addr(\"$NEW_IP\")/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[0]});/writeMsg.addByte(${NEW_IP_PARTS[0]});/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[1]});/writeMsg.addByte(${NEW_IP_PARTS[1]});/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[2]});/writeMsg.addByte(${NEW_IP_PARTS[2]});/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[3]});/writeMsg.addByte(${NEW_IP_PARTS[3]});/g" realots-query-manager-master/main.cpp
      make -C realots-query-manager-master
      echo "Configuring RealOTS login server..."
      sed -i "s/^ip = .*/ip = \"$NEW_IP\"/g" realotsloginserver-master/config.lua
      sed -i "s/^mysqlHost = .*/mysqlHost = \"$NEW_IP\"/g" realotsloginserver-master/config.lua
      sed -i "s/ip=\"$OLD_IP\"/ip=\"$NEW_IP\"/g" realotsloginserver-master/gameservers.xml
      echo ""
      echo ""
      echo "IPs changed from '$OLD_IP' to '$NEW_IP'!"
      echo "Stop all game services then launch them again."
      • Open a terminal in the same folder as the file above, then run this command to grant it the right permission: sudo chmod +x update-ip.sh
      • Run the script: sudo ./update-ip.sh
      • The script will ask for your previous IP address, so just type it in then press Enter. E.g.: 192.168.1.101
      • Once it's finished, you can restart the services (in the same order as instructed in the step 4 of the tutorial).
      • Lastly, edit your Tibia client executable with a hex editor and point it to your new IP.
 
The IP won't change if you set the static IP correctly. If you had sent screenshots like we agreed, I would have helped you sooner. There was no need to restore to a previous snapshot, but I'm glad you got it sorted.
Remember that it's not necessarily Ubuntu's fault. If you want to have a stable server, there's no other option: you'll have to learn Ubuntu, networking, database, programming, etc.

I've never needed to create a backup of a char, so I don't know it this will work, but try creating a copy of your char file:
  • In a terminal, run sudo find /home/game/usr -type f -exec grep -l "Name of your char" {} + | xargs sudo gedit
    • This may take a while, but if the command works, a text editor will open up with your char's attributes. Otherwise, it will be empty.
  • Copy the content of the file somewhere else.
An important note is that this process won't backup other stuff like houses and guilds. For the time being, I won't go into details on how to restore the char you just copied, but let me know in case you need it.

In case your IP changes again, I've come up with this script that will update all the required server files. Just tested it on my own server and it worked like a charm:
  • Stop all 3 services (press Ctrl+C in the terminal windows that are running the services)
  • Create a new file in the same folder as the services scripts, then name it "update-ip.sh"
  • Open the file with an editor like "gedit", then paste the following content:
    • Code:
      [/LIST]
      [/LIST]
      #!/bin/bash
      echo "Starting script..."
      # Variables
      GAME_PATH="/home/game"
      PORT=17778
      NEW_IP=$(hostname -I | cut -d' ' -f1)
      IFS='.' read -ra NEW_IP_PARTS <<< "$NEW_IP"
      OLD_IP=$1
      if [ -z "$OLD_IP" ]
      then
          echo "Please enter your OLD IP address:"
          read OLD_IP
      fi
      IFS='.' read -ra OLD_IP_PARTS <<< "$OLD_IP"
      echo "Updating file in '~/.tibia'..."
      sed -i "s/QueryManager = {.*}/QueryManager = {(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\"),(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\"),(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\"),(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\")}/g" ~/.tibia
      echo "Updating MySQL..."
      sed -i "s/^bind-address.*/bind-address = $NEW_IP/g" /etc/mysql/mysql.conf.d/mysqld.cnf
      systemctl restart mysql
      echo "Updating RealOTS query manager..."
      sed -i "s/inet_addr(\"$OLD_IP\")/inet_addr(\"$NEW_IP\")/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[0]});/writeMsg.addByte(${NEW_IP_PARTS[0]});/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[1]});/writeMsg.addByte(${NEW_IP_PARTS[1]});/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[2]});/writeMsg.addByte(${NEW_IP_PARTS[2]});/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[3]});/writeMsg.addByte(${NEW_IP_PARTS[3]});/g" realots-query-manager-master/main.cpp
      make -C realots-query-manager-master
      echo "Configuring RealOTS login server..."
      sed -i "s/^ip = .*/ip = \"$NEW_IP\"/g" realotsloginserver-master/config.lua
      sed -i "s/^mysqlHost = .*/mysqlHost = \"$NEW_IP\"/g" realotsloginserver-master/config.lua
      sed -i "s/ip=\"$OLD_IP\"/ip=\"$NEW_IP\"/g" realotsloginserver-master/gameservers.xml
      echo ""
      echo ""
      echo "IPs changed from '$OLD_IP' to '$NEW_IP'!"
      echo "Stop all game services then launch them again."
      • Open a terminal in the same folder as the file above, then run this command to grant it the right permission: sudo chmod +x update-ip.sh
      • Run the script: sudo ./update-ip.sh
      • The script will ask for your previous IP address, so just type it in then press Enter. E.g.: 192.168.1.101
      • Once it's finished, you can restart the services (in the same order as instructed in the step 4 of the tutorial).
      • Lastly, edit your Tibia client executable with a hex editor and point it to your new IP.

So basically the IP changing breaks the server? Thank you very much for the scripts! It'll be great to be protected from IP issues, and If the internet connection vanishes again I'll make a post before trying to fix it.
 
It is needed on Linux, at least.

Well, anyway, if you'd check what interface is being bind, you would see it's 127.0.0.1. You won't be able to access this from the host. I have no idea how ip-address.txt works, tried to make it bind 0.0.0.0, or container ip but it doesn't change anything. You'd have to ask someone familiar with cipengine probably.

Here is a docker-compose patch to kind-of solve this:
Code:
diff --git a/docker-compose.yml b/docker-compose.yml
index cde1815..d3f0798 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,11 +5,12 @@ services:
       context: .
       dockerfile: ./docker/Game.Dockerfile
     container_name: game
-    ports:
-      - 7171:7171
-      - 7172:7172
     depends_on:
       - mysql
+    command: >
+      bash -c "rm -f /opt/game/save/game.pid
+      && /opt/exec/game.sh"
+    network_mode: host
     restart: unless-stopped
 
   mysql:
(I have also added removing game.pid here, so you don't have to do down everytime, but just stop :rolleyes:)
This, obviously, also requires you to change mysql host from mysql to 127.0.0.1 in login server and query manager.

View attachment 78993
It looks like network_mode: host isnt working on windows nor on mac :(
 
The IP won't change if you set the static IP correctly. If you had sent screenshots like we agreed, I would have helped you sooner. There was no need to restore to a previous snapshot, but I'm glad you got it sorted.
Remember that it's not necessarily Ubuntu's fault. If you want to have a stable server, there's no other option: you'll have to learn Ubuntu, networking, database, programming, etc.

I've never needed to create a backup of a char, so I don't know it this will work, but try creating a copy of your char file:
  • In a terminal, run sudo find /home/game/usr -type f -exec grep -l "Name of your char" {} + | xargs sudo gedit
    • This may take a while, but if the command works, a text editor will open up with your char's attributes. Otherwise, it will be empty.
  • Copy the content of the file somewhere else.
An important note is that this process won't backup other stuff like houses and guilds. For the time being, I won't go into details on how to restore the char you just copied, but let me know in case you need it.

In case your IP changes again, I've come up with this script that will update all the required server files. Just tested it on my own server and it worked like a charm:
  • Stop all 3 services (press Ctrl+C in the terminal windows that are running the services)
  • Create a new file in the same folder as the services scripts, then name it "update-ip.sh"
  • Open the file with an editor like "gedit", then paste the following content:
    • Code:
      [/LIST]
      [/LIST]
      #!/bin/bash
      echo "Starting script..."
      # Variables
      GAME_PATH="/home/game"
      PORT=17778
      NEW_IP=$(hostname -I | cut -d' ' -f1)
      IFS='.' read -ra NEW_IP_PARTS <<< "$NEW_IP"
      OLD_IP=$1
      if [ -z "$OLD_IP" ]
      then
          echo "Please enter your OLD IP address:"
          read OLD_IP
      fi
      IFS='.' read -ra OLD_IP_PARTS <<< "$OLD_IP"
      echo "Updating file in '~/.tibia'..."
      sed -i "s/QueryManager = {.*}/QueryManager = {(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\"),(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\"),(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\"),(\"${NEW_IP}\",${PORT},\"nXE?\/>j\`\")}/g" ~/.tibia
      echo "Updating MySQL..."
      sed -i "s/^bind-address.*/bind-address = $NEW_IP/g" /etc/mysql/mysql.conf.d/mysqld.cnf
      systemctl restart mysql
      echo "Updating RealOTS query manager..."
      sed -i "s/inet_addr(\"$OLD_IP\")/inet_addr(\"$NEW_IP\")/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[0]});/writeMsg.addByte(${NEW_IP_PARTS[0]});/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[1]});/writeMsg.addByte(${NEW_IP_PARTS[1]});/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[2]});/writeMsg.addByte(${NEW_IP_PARTS[2]});/g" realots-query-manager-master/main.cpp
      sed -i "s/writeMsg.addByte(${OLD_IP_PARTS[3]});/writeMsg.addByte(${NEW_IP_PARTS[3]});/g" realots-query-manager-master/main.cpp
      make -C realots-query-manager-master
      echo "Configuring RealOTS login server..."
      sed -i "s/^ip = .*/ip = \"$NEW_IP\"/g" realotsloginserver-master/config.lua
      sed -i "s/^mysqlHost = .*/mysqlHost = \"$NEW_IP\"/g" realotsloginserver-master/config.lua
      sed -i "s/ip=\"$OLD_IP\"/ip=\"$NEW_IP\"/g" realotsloginserver-master/gameservers.xml
      echo ""
      echo ""
      echo "IPs changed from '$OLD_IP' to '$NEW_IP'!"
      echo "Stop all game services then launch them again."
      • Open a terminal in the same folder as the file above, then run this command to grant it the right permission: sudo chmod +x update-ip.sh
      • Run the script: sudo ./update-ip.sh
      • The script will ask for your previous IP address, so just type it in then press Enter. E.g.: 192.168.1.101
      • Once it's finished, you can restart the services (in the same order as instructed in the step 4 of the tutorial).
      • Lastly, edit your Tibia client executable with a hex editor and point it to your new IP.

The internet connection is indeed gone again :(
I checked last night to be sure, rebooting Ubuntu before turning it off for the night, and I thought it still had internet because my otland browser tab was still up. Then this morning I couldn't connect to Tibia again after starting the server, and it turns out the otland tab was just showing because it did that thing where the last page is saved or whatever, and when I tried to enter another page or refresh the open one it just loaded for a while (same as Tibia) and eventually told me it can't reach it. So my internet is just dead on the Ubuntu, and I know you'll yell at me for not including pictures but what am I supposed to take a picture of when I just can't access anything on the internet? Nothing has changed anywhere and the server works fine.
Someone said somewhere that a static IP might mess things up, so as I now have your new script for safety, I tried changing it back to DHCP. This time I got to keep my IP (at least for now), but I still don't get an internet connection. Now I'm losing my most free day and my hope is fading again. Is this even fixable or should I just give up life entirely at this point and accept that only absolute programming gods have any chance at keeping this stuff working for more than 5 minutes? :(

Edit: I put the static IP back, so I don't risk losing my IP on top of everything else. The internet still doesn't work.
 
Last edited:
Tried to run it natively without docker on ubuntu 22.04 4gb ram and 2vcore and getting segmentation faults xD

1696439498596.png

or it crashes when I try to login
 
It looks like network_mode: host isnt working on windows nor on mac :(
You can always use port forwarding for that. Spawn a port forwarder inside that container that will listen on the global interface and redirect the traffic to 7172. For example socat.

I can have another look when I have some time, no promises 🥰
 
So my internet is just dead on the Ubuntu, and I know you'll yell at me for not including pictures but what am I supposed to take a picture of when I just can't access anything on the internet? Nothing has changed anywhere and the server works fine.
That would be the screenshot of the ipv4 settings (like the last image in this post), as well as the result of the hostname -I command. Your Windows will be connected to the Internet, so you can use Windows to take the screenshot of the VM window.

Someone said somewhere that a static IP might mess things up, so as I now have your new script for safety, I tried changing it back to DHCP. This time I got to keep my IP (at least for now), but I still don't get an internet connection. Now I'm losing my most free day and my hope is fading again. Is this even fixable or should I just give up life entirely at this point and accept that only absolute programming gods have any chance at keeping this stuff working for more than 5 minutes? :(
Sounds like something that would happen when you don't have a router in your apartment. Perhaps the main switch in your building is refusing the connection, but that would lead me to another question: how are you connecting your smartphone to the Internet? i.e.: are you connected to a WiFi, or are you using your data plan only?
 
That would be the screenshot of the ipv4 settings (like the last image in this post), as well as the result of the hostname -I command. Your Windows will be connected to the Internet, so you can use Windows to take the screenshot of the VM window.


Sounds like something that would happen when you don't have a router in your apartment. Perhaps the main switch in your building is refusing the connection, but that would lead me to another question: how are you connecting your smartphone to the Internet? i.e.: are you connected to a WiFi, or are you using your data plan only?

But those pics basically just show my IP, which I need to edit out anyway... but they're attached to this post as requested.

I don't have WiFi, my smartphone just has the data thing (or if it has WiFi I haven't tried it). I haven't used the internet on the phone much yet, it's my first one and I only got it a few months ago and got the internet and stuff working just the other week.
(and don't worry, the blacked out numbers are the same, I didn't write them wrong)

Edit: I've tried to google this stuff so much in the past couple of days, and I think I've finally found something that might help. I pinged my IP in Ubuntu, and it received the packages just fine. But I pinged my DNS (8.8.8.8) and I got the result in my new picture I attached. The first message in the picture is one that appeared after a whole bunch of ping attempts (it kept pinging until I closed the terminal), and then it went back to the usual message, which is the next one shown in the picture. I would've shown a big chunk of the log to make it easier, but it'd take forever to black out my IP in all of it. Anyway, the problem seems to lie in my DNS, my Ubuntu doesn't manage to route through it or whatever. I will edit this again if I make any further progress. I really hope this new information can help you solve this for me though.

Edit again: I found something suggesting that I "have no routes to the outside world" in my Ubuntu. I tried pinging my 192.168~ Windows IP and it couldn't reach it, which seems to verify that the lack of routes things might be my issue. In the process I also temporarily disabled my Ubuntu firewall to see if that was causing any issues, but it did not improve results.
 

Attachments

Last edited:
But those pics basically just show my IP, which I need to edit out anyway... but they're attached to this post as requested.

I don't have WiFi, my smartphone just has the data thing (or if it has WiFi I haven't tried it). I haven't used the internet on the phone much yet, it's my first one and I only got it a few months ago and got the internet and stuff working just the other week.
(and don't worry, the blacked out numbers are the same, I didn't write them wrong)

Edit: I've tried to google this stuff so much in the past couple of days, and I think I've finally found something that might help. I pinged my IP in Ubuntu, and it received the packages just fine. But I pinged my DNS (8.8.8.8) and I got the result in my new picture I attached. The first message in the picture is one that appeared after a whole bunch of ping attempts (it kept pinging until I closed the terminal), and then it went back to the usual message, which is the next one shown in the picture. I would've shown a big chunk of the log to make it easier, but it'd take forever to black out my IP in all of it. Anyway, the problem seems to lie in my DNS, my Ubuntu doesn't manage to route through it or whatever. I will edit this again if I make any further progress. I really hope this new information can help you solve this for me though.

Edit again: I found something suggesting that I "have no routes to the outside world" in my Ubuntu. I tried pinging my 192.168~ Windows IP and it couldn't reach it, which seems to verify that the lack of routes things might be my issue. In the process I also temporarily disabled my Ubuntu firewall to see if that was causing any issues, but it did not improve results.
Not sure what it could be, but I still suspect all the problems you've been having with the network are happening because you don't have your own router. You need a way to route multiple IPs, and as long as you connect your PC straight into your building's switch, I'm afraid we won't be able to solve it for good. You should ask around your building how people are connecting their devices to the Internet - no doubt most of them would have a router (or even their own contract with an Internet provider), so they can have WiFi on their smartphones and laptops. Your landlord should be able to help as well.
 
Not sure what it could be, but I still suspect all the problems you've been having with the network are happening because you don't have your own router. You need a way to route multiple IPs, and as long as you connect your PC straight into your building's switch, I'm afraid we won't be able to solve it for good. You should ask around your building how people are connecting their devices to the Internet - no doubt most of them would have a router (or even their own contract with an Internet provider), so they can have WiFi on their smartphones and laptops. Your landlord should be able to help as well.

Ahh, I was really hoping this new information would be helpful. I even included pictures this time. The internet was working at first though, it worked fine for weeks while we were trying to fix the IP thing, and it only stopped working after I set the static IP. Would these assumed building router problems really just pop up out of nowhere after weeks of not being present? And are you saying that if it is the cause anyway, would buying a new router most likely magically make the problems go away without the use of some kind of expert setting up stuff on my router?
I'm routing inside my pc, doesn't a router do it between devices? As in physical things rather than software?
 
Ahh, I was really hoping this new information would be helpful. I even included pictures this time. The internet was working at first though, it worked fine for weeks while we were trying to fix the IP thing, and it only stopped working after I set the static IP. Would these assumed building router problems really just pop up out of nowhere after weeks of not being present? And are you saying that if it is the cause anyway, would buying a new router most likely magically make the problems go away without the use of some kind of expert setting up stuff on my router?
I'm routing inside my pc, doesn't a router do it between devices? As in physical things rather than software?
Impossible to tell without knowing how your building's switch works, but it's common for sudden conflicts to happen due to changes in DNS, or when new devices are connected to the network, during regular maintenance, etc. Setting a static IP works perfectly when you have your own router, but anything can happen when the network is being managed by somebody else (your case currently).

A standard router with standard settings should be enough, as long as you follow the install instructions from your Internet provider. No special config required. This would also enable you to use WiFi in your smartphone while at home instead of using the data plan.
 
Impossible to tell without knowing how your building's switch works, but it's common for sudden conflicts to happen due to changes in DNS, or when new devices are connected to the network, during regular maintenance, etc. Setting a static IP works perfectly when you have your own router, but anything can happen when the network is being managed by somebody else (your case currently).

A standard router with standard settings should be enough, as long as you follow the install instructions from your Internet provider. No special config required. This would also enable you to use WiFi in your smartphone while at home instead of using the data plan.

Doesn't this mean that avoiding setting a static IP should fix it for me? It's clearly broken already now though, and I don't wanna have to reset to an old snapshot again to fix it.

What do you mean by install instructions? Do I have to call my internet provider and ask about my router? What would I even ask? "Hey, I wanna play Tibia, what do I do with my router to achieve that?" lol. Seriously, I have no idea about this, because all I've ever seen about routers (I used them a lot when I hosted LAN parties) is that you plug in the cables and play, no messing with any network settings or anything ever. Sure, it always took hours for us to make it work, as someone always failed to connect, but we never did anything like this.
You even say there's no special config required, so what is my provider supposed to be doing if I get a router?
 
Doesn't this mean that avoiding setting a static IP should fix it for me? It's clearly broken already now though, and I don't wanna have to reset to an old snapshot again to fix it.
Undoing the static IP will work temporarily, but every now and then your building's switch/router may assign your PC a new IP, and you'll have to run the script to change the IP again.

What do you mean by install instructions? Do I have to call my internet provider and ask about my router? What would I even ask? "Hey, I wanna play Tibia, what do I do with my router to achieve that?" lol. Seriously, I have no idea about this, because all I've ever seen about routers (I used them a lot when I hosted LAN parties) is that you plug in the cables and play, no messing with any network settings or anything ever. Sure, it always took hours for us to make it work, as someone always failed to connect, but we never did anything like this.
You even say there's no special config required, so what is my provider supposed to be doing if I get a router?
I don't know how the network is set up in your building, so am not sure if it will be as easy as plug and play. If you hosted LAN parties in this same apartment by just plugging a router, then yes, just do the same thing you did before - perhaps just don't test it with the potentially faulty router you tried the other day. See if someone (a neighbour?) could borrow you a working router before buying a new one.

If that doesn't work, you will have to talk to either a neighbour, your landlord or someone at the Internet provider to know what to do next. Just say you're trying to connect multiple devices to the Internet, but they're being assigned weird IP addresses and that is likely causing them to lose connection frequently. That's what the provider's support team is for anyway, at the very least they'll ask you relevant questions that will help diagnose the problem. Good luck.
 
Undoing the static IP will work temporarily, but every now and then your building's switch/router may assign your PC a new IP, and you'll have to run the script to change the IP again.


I don't know how the network is set up in your building, so am not sure if it will be as easy as plug and play. If you hosted LAN parties in this same apartment by just plugging a router, then yes, just do the same thing you did before - perhaps just don't test it with the potentially faulty router you tried the other day. See if someone (a neighbour?) could borrow you a working router before buying a new one.

If that doesn't work, you will have to talk to either a neighbour, your landlord or someone at the Internet provider to know what to do next. Just say you're trying to connect multiple devices to the Internet, but they're being assigned weird IP addresses and that is likely causing them to lose connection frequently. That's what the provider's support team is for anyway, at the very least they'll ask you relevant questions that will help diagnose the problem. Good luck.

Alright, so, my router arrived today. As expected, it's refusing to work. It just tries to negotiate for DSL forever. A process that should take a minute and then it should all work. The install manual says to get certain information (VCI+VPI, etc) from my ISP, but when I called them they said they don't have that info and can't help me. So now my router is as problematic as the rest of this project.

While waiting for the router, I've been getting help from someone on the VirtualBox forum, and their main conclusion was also that a router might be the fix. But we now concluded that it should also work if I can use NAT instead of Bridged, and the only crux is that it seems the OT server must have Bridged to function. So I'm back to ask if you can shed some light on all of that. I know that Bridged is good for the connection itself in a scenario with a functional network supported by a router, or whatever it takes to get normal IPs like I should. But if the VB guy has a solution to make me able to connect using NAT (like he claims he does) is there any way to run the server with a NAT connection instead of Bridged, or is it specifically configured for Bridged so it will always break if I try to use NAT?
 
Back
Top