Skip to content

An OpenTibia 10 (ForgottenServer + ORTS2) system for Raspberry Pi

Notifications You must be signed in to change notification settings

VampawN/nova-secura-10

 
 

Repository files navigation

Nova Secura

An OpenTibia 10.x server running under Docker on a Raspberry Pi.

Hardware & Operating System Setup

Repositories

The following forks are used by this project via Git Submodules:

Setup

  • git clone [email protected]:silic0nalph4/nova-secura-10.git to get a copy of this repo.
  • ./setup_map.sh to unzip the ORTS2 map file. This is distributed as a zip because maps can be big!
  • cp config/config.lua.example config/config.lua to create your config file.
  • Edit the new config file you created - see the config.lua section below as there are some changes you must make before starting the server!
  • docker-compose up to start the cluster.
  • Once the server has started, it's time to configure MyACC.

Website Setup

  • If you've set your server's hostname to nova-secura.local and set up ZeroConf networking, you should get a response to ping nova-secura.local from your workstation. If you haven't set this up, use an IP address for the server that you can route to instead.
  • Navigate to http://nova-secura.local in a web browser - you should see the MyACC install page. It won't let you run the install wizard until you've told it what IP address you're connecting from.
  • Run docker exec -it nova-secura-10_web_1 /bin/bash
  • Run vi install/ip.txt and add the IP address of the computer you're connecting from to the end of the file.
  • Refresh the page, follow the install wizard. The path to your TFS install is /srv - once MyACC has loaded your config file everything else shouldbe straightforward.
  • You'll want to use client version 10.98 when prompted. I'm not sure how much of a difference it makes if the links on the website are wrong, but that's the latest protocol version that TFS supports.
  • When you reach the last page of the wizard, it's time to apply any custom MyACC config you want:
  • Run docker exec -it nova-secura-10_web_1 /bin/bash
  • vi config.local.php and append your personal config changes. I've included my preferences in config/config.local.php in this repo.
  • You can now access the MyACC website to create characters etc.

Client

You'll need an OTClient to connect to the server. I'm using https://github.com/edubart/otclient - you can download a binary from the "Actions" tab on GitHub. You'll also need appropriate .spr and .dat files for the game you're trying to play - but that's beyond the scope of this guide, sorry.

My config.lua

Essential config changes before starting the server:

  • ip = "192.168.0.37" (use the static IP address of your server)
  • mapName = "map" (this is the name of the map file to load)
  • mapAuthor = "ORTS"
  • mysqlHost = "db" (database server name from docker-compose.yaml)
  • mysqlUser = "forgottenserver" (database username from docker-compose.yaml)
  • mysqlPass = "aibit" (database password from docker-compose.yaml)
  • mysqlDatabase = "forgottenserver" (database name from docker-compose.yaml)

Some additional changes that I've made are:

  • worldType = "no-pvp"
  • motd = "Welcome to Nova Secura, a more perfect world."
  • serverName = "Nova Secura"
  • ownerName = "GM Silic0n Alph4"
  • ownerEmail = "[email protected]"
  • url = "192.168.0.37" (you might need to set this for MyACC to load server status correctly - TODO double check)
  • location = "Earth"
  • housePriceEachSQM = 1 (cheapest rent you'll ever find!)
  • houseRentPeriod = "yearly" (house rent only charged annually)

Administration

Starting & Stopping

  • Pause (but not delete) service: docker-compose stop
  • Resume paused service: docker-compose start
  • Stop service & delete containers (but not game state): docker-compose down
    • Note: if you run this you will need to re-setup MyAAC when you start the containers again.
  • Start service: docker-compose up -d
  • Follow logs: docker-compose logs -f

Updating Config/Data

The config file and datapack are mounted from local copies on the filesystem. This means that changes made to those copies are immediately reflected in the running Docker containers. config.lua changes will normally requir you to restart the server (see the pause & resume commands above), but datapack changes can often be made live - especially Lua files.

To make it explicit:

  • config/config.lua is mounted into TheForgottenServer and MyAAC as the config file.
  • orts2/data/ is mounted into TheForgottenServer and MyAAC as the data directory.

These mounts are managed as volumes within docker-compose.yaml.

Working with Submodules

TODO document how to update the underlying submodules

Updating Services

TODO document how to update to new versions of TFS, MyAAC, and ORTS2.

Backups

TODO set up scheduled SQL dumps, document how it works.

About

An OpenTibia 10 (ForgottenServer + ORTS2) system for Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 81.5%
  • Shell 18.5%