[Tutorial] Agnis's Dummies' guide to setting up auto mapper

Forum for alternative clients, mods & discussions on the same.

[Tutorial] Agnis's Dummies' guide to setting up auto mapper

Postby insazumi » Fri Apr 02, 2021 2:41 pm

Hi everyone with w13 coming up I'm sure most of us will be lost without a world map. That's why I'm posting this to help everyone who is unable to set up the auto mapper. I would like to start that I have no background in IT, so I will be showing the process by which i set up the mapper for my village. There may or may not be easier and better ways to do this. if so then i don't know them.

This guide will be using windows 10 and a ubuntu sub system in order to set it up. That's why before starting you need to make sure your windows 10 is up to date.

This is also using the mapper v2 by vendan at http://www.havenandhearth.com/forum/viewtopic.php?f=49&t=67298


Step 1: First thing I did was to install the windows docker desktop from: https://www.docker.com/
Once installed you can skip the tutorial and leave it at the main area for now.
Image

Step 2: Unlock your windows 10's ability to use a subsystem.

You want to do this by first opening settings. after then click on apps then on the right side there should be a link for "programs and features" under related settings.
Once here on the left side open "turn windows features on or off"
a menu should then pop up where you want to scroll down and check the "windows Subsystem for linux" option
click ok and you can close the windows.

Step 3: Now that your system can run a linux subsystem you will want to go to your windows store and download Ubuntu
Image

now here you will want to open ubuntu. It should start by loading up everything and then asking for a username and password. Create whatever user and pass you want. this is sort of like a login for your pc when you first turn it on.
now close ubuntu.


Step4: turning on wsl2: If your windows is newer and you installed docker with the default settings wsl2 should already be on. If not you can find a tutorial online easily.
In the docker window you will want to hit the settings icon (gear) in the top right. find your way to resources then wsl Integration. from here you should have an option to turn it on for ubuntu.
Image

now you can minimize docker and open ubuntu up again.
from here I typed: cd
then pressed enter

Next step is to pull the mapper files from docker you can do this by typing and entering:
Code: Select all
docker run --restart=always -v /srv/hnh-map:/map -p 80:8080 andyleap/hnh-auto-mapper:v-4


after a small wait it should load everything and end by saying "Listening on port 8080"

from here you want to leave this window running and open another. Time to isntall apache

now in the new windows do the "cd" command again

next you want to type

Code: Select all
sudo apt update

wait for everything to load then follow by
Code: Select all
sudo apt install apache2

after loading it should ask you if with a y/n press y then enter to finish installing.

at this point the mapper should run on your local machine but is un able to be accessed from outside of it. you can test by finding your internal ip and entering it into your web browser:
Image

next you can go ahead and log in with the login: admin and the password: admin
go to the admin portal and create user. this will be your admin account. Enter your desired user and pass then check the boxes you want. (make sure to include admin privileges') as the admin login is a 1 time use. now after saving it should kick you out back to the login.

you can close out of your browser and close the second ubuntu leaving only the one that you opened the docker img on.

Step4: forward to the port

Next step is to make it so your friends can open and use the mapper tool. to do this you need to set up port forwarding. It will get a bit blurry here and you might have to figure some stuff out with google yourself. to access your router settings it's different for each brand as well as the default log in. some isp will require you to get a static ip from them. for this step you will have to look up how as my isp automatically reserves you a ip when your set up port forward. you will want to set up a tcp/udp on port 80.

You might have to open port 80 on your computer firewall in order for people to be able to connect. And a lot of isp's auto block incoming traffic for port 80. people should be able to connect via your public ip at this point. if not your isp might be blocking port 80.

From here you have a couple options. you can call your isp and try to get them to unblock it (some won't unblock it , some might charge you money.)
Option 2 is to set up the server under a alternative port. In order to do this stop the mapper server on ubuntu and use the docker command again but where it says 80:8080 change 80 to 81
after which you want to allow port 81 through your firewall. then switch your port forward from 80 to 81.

now you can connect to the mapper by opening your browser and typing your IP;port such as http://x.x.x.x:81
this should be useable for anyone who enters it.

from here if you own a domain name you want to use you can forward it to the public ip but would require the :81 if you are using port 81 such ass http://www.example.com:81/

One last thing to do. open up the mapper in your browser and log in to your admin account. go to the admin portal and now we need to add the prefix. this should be the url you use to access the website. such as
http://www.example.com:81/

or if you don't have a domain name


now save it and close and open the mapper again. login the user account. when you log in there should be a button to generate upload token. click it and it should generate a token starting with your prefix.

copy this token then open hnh in your client that has mapper integration. in the options menu there should be a mapper section. open it then paste and save the token into the bar. click the checkboxes you want and close the menu. now you want to log out and close out of the client completely. open your client again log in and now your mapper should be mapping. if you have the tracker option checked it should also track your character in the live map as well.

Image


Now there may or may not be better ways to set this up but this is how i got it to work and don't know how to do it any other way. If you have any questions there is a discord for the mapper https://discord.gg/TMnQDWbs
User avatar
insazumi
 
Posts: 22
Joined: Thu Sep 20, 2012 8:49 pm
Location: TX

Re: [Tutorial] Agnis's Dummies' guide to setting up auto ma

Postby Procne » Fri Apr 02, 2021 3:35 pm

instead of
/srv/hnh-map:/map

on windows I would suggest to use something like
C:/havenmap:/map


/srv/hnh-map is a unix dir. Surprisingly it works with docker on windows, but I have no idea which dir on the host it uses exactly (maybe someone knows?).
That's the dir where all the data is kept, so if you want to move it somewhere someday, or share it with someone, or make a backup - it's better to know where it is ^^
Procne
 
Posts: 968
Joined: Sat May 29, 2010 3:04 pm

Re: [Tutorial] Agnis's Dummies' guide to setting up auto ma

Postby insazumi » Fri Apr 02, 2021 4:48 pm

I'm not to sure how the dir works
Last edited by insazumi on Fri Apr 02, 2021 6:19 pm, edited 1 time in total.
User avatar
insazumi
 
Posts: 22
Joined: Thu Sep 20, 2012 8:49 pm
Location: TX

Re: [Tutorial] Agnis's Dummies' guide to setting up auto ma

Postby wafflecat » Fri Apr 02, 2021 5:59 pm

Procne wrote:instead of
/srv/hnh-map:/map

on windows I would suggest to use something like
C:/havenmap:/map


/srv/hnh-map is a unix dir. Surprisingly it works with docker on windows, but I have no idea which dir on the host it uses exactly (maybe someone knows?).
That's the dir where all the data is kept, so if you want to move it somewhere someday, or share it with someone, or make a backup - it's better to know where it is ^^


I think it works because of WSL.

One thing I'd suggest is using v4 since it has a bunch of useful (some crucial) features, for example not adding snow tiles
User avatar
wafflecat
 
Posts: 257
Joined: Thu Dec 15, 2011 7:46 pm


Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 73 guests