jonasu
Well-Known Member
Hi, thought I'd share a simple docker-compose setup for running a full OT stack. This is perfect for running a local development environment but could theoretically be used to host smaller servers. The setup for that is outside of the scope for this guide. Let me know if you're interested.
Requirements:
Ubuntu (or whichever Linux distro you like)
docker
docker-compose
The commands below may have to be run with sudo <command> depending on your permissions, eg. sudo apt install.
In ubuntu run the following comman to install the requirements:
Create your folder structure:
Clone the forgottenserver repo, with version v1.4.2:
Download latest MyAAC release, get the tar.gz and save it to /srv/nginx/www:
github.com
Create your docker-compose.yaml file, change super_secret to your own password:
Build the forgottenserver docker image:
Run the stack for the first time:
Configure your config.lua for use with the mariadb container (Close and save with CTRL+X):
MySQL part should look like this:
Import the schema, use whatever root password you set, replace super_secret:
Make sure your server is running correctly by running:
Now you should be able to access http://localhost/install
Set your ip in /srv/ot/nginx/www/install/install.txt as displayed in the MyAAC install wizard
You should now have a server running TFS v1.4.2 and MyAAC.
For some Linux basics, have a look at this slighty obnoxius but good resource: https://www.youtube.com/playlist?list=PLIhvC56v63IJIujb5cyE13oLuyORZpdkL
I'm not responsible for any dataloss that might occur, you are on your own.
Requirements:
Ubuntu (or whichever Linux distro you like)
docker
docker-compose
The commands below may have to be run with sudo <command> depending on your permissions, eg. sudo apt install.
In ubuntu run the following comman to install the requirements:
Bash:
apt install docker.io docker-compose
Create your folder structure:
Bash:
cd /srv && \
mkdir -p /srv/ot/mariadb && \
mkdir -p /srv/ot/nginx/www
Clone the forgottenserver repo, with version v1.4.2:
Bash:
cd /srv/ot && \
git clone https://github.com/otland/forgottenserver.git srv -b v1.4.2
Download latest MyAAC release, get the tar.gz and save it to /srv/nginx/www:
Releases · slawkens/myaac
A free and open-source Automatic Account Creator (AAC) written in PHP - slawkens/myaac
Bash:
cd /srv/nginx/www && \
tar xf myaac-0.8.9.tar.gz --strip-components=1
Create your docker-compose.yaml file, change super_secret to your own password:
Bash:
cat << 'EOF' > /srv/ot/docker-compose.yaml
---
version: "2.1"
services:
nginx:
image: lscr.io/linuxserver/nginx:latest
container_name: nginx
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
volumes:
- ./nginx:/config
- ./srv:/srv
ports:
- 80:80
- 443:443
restart: unless-stopped
mariadb:
image: lscr.io/linuxserver/mariadb:latest
container_name: mariadb
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- MYSQL_ROOT_PASSWORD=super_secret # change to your own password
- MYSQL_DATABASE=tfs # tfs database name
- MYSQL_USER=tfs # tfs database user
- MYSQL_PASSWORD=super_secret # change to your own password
volumes:
- ./mariadb:/config
ports:
- 3306:3306
restart: unless-stopped
srv:
image: localimage.sh/tfs:latest
container_name: srv
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
volumes:
- ./srv:/srv
ports:
- 7071:7071
- 7072:7072
restart: unless-stopped
EOF
Build the forgottenserver docker image:
Bash:
cd /srv/ot/srv && \
docker build . -t localimage.sh/tfs:latest
Run the stack for the first time:
Bash:
cd /srv/ot && \
docker-compose up -d
Configure your config.lua for use with the mariadb container (Close and save with CTRL+X):
Bash:
cd /srv/ot/srv && \
nano config.lua
MySQL part should look like this:
Bash:
-- MySQL
mysqlHost = "mariadb"
mysqlUser = "tfs"
mysqlPass = "super_secret"
mysqlDatabase = "tfs"
mysqlPort = 3306
mysqlSock = ""
Import the schema, use whatever root password you set, replace super_secret:
Bash:
docker exec -i mariadb mariadb -uroot -psuper_secret tfs < /srv/ot/srv/schema.sql
Make sure your server is running correctly by running:
Bash:
docker restart srv && \
docker logs srv
Now you should be able to access http://localhost/install
Set your ip in /srv/ot/nginx/www/install/install.txt as displayed in the MyAAC install wizard
You should now have a server running TFS v1.4.2 and MyAAC.
For some Linux basics, have a look at this slighty obnoxius but good resource: https://www.youtube.com/playlist?list=PLIhvC56v63IJIujb5cyE13oLuyORZpdkL
I'm not responsible for any dataloss that might occur, you are on your own.
Last edited: