Page 1 of 1

Need help configuring a simple, private server

PostPosted: 13 Dec 2019, 18:08
by JCrook
Haven't found a lot of info about the things I need help with, so I registered to ask here:

- How do I set a server password or enable/disable registration so only selected people can join?

- How do I login as admin so I can start games, add bots, remove bots, set bot difficulty and such?

I want to make a simple and private server I can start up and play on with a few friends if I want or use to play with or against AI.

Re: Need help configuring a simple, private server

PostPosted: 13 Dec 2019, 20:58
by JayDi
Open "\mage-server\config\config.xml"

1. To enable BOTS -- uncomment line:
Code: Select all
<playerType name="Computer - mad" jar="mage-player-ai-ma-1.4.40.jar" className="mage.player.ai.ComputerPlayer7"/>
Image

2. To enable registration -- setup line:
Code: Select all
authenticationActivated="true"
With other "mail*" params: mailSmtpHost, mailSmtpPort, mailUser, mailPassword, mailFromAddress

Re: Need help configuring a simple, private server

PostPosted: 14 Dec 2019, 15:55
by JCrook
That just enables the options but I cannot register a new account on the server. Probably because there's not Smtp host, port etc. set but I dunno what to put there exactly. The guide has 0 info about that.

Tried to register but simply got an "unable to connect to server" error. Wish the guide was expanded with some more info like how to properly set up registration, log in as admin, start/stop games, configure bots with decks, difficulty etc.

Feels like there's a lot of fiddling required just to get a small server for some occasional games going

Re: Need help configuring a simple, private server

PostPosted: 14 Dec 2019, 15:58
by JayDi
You can find instructions about email and smtp here (settings for google's gmail):
https://support.google.com/mail/answer/7126229?hl=en

Re: Need help configuring a simple, private server

PostPosted: 14 Dec 2019, 16:15
by JCrook
I was looking at the config again and found this:

authenticationActivated - "true" = user have to register to signon "false" = user need not to register
* mail configs only needed if authentication is activated:
* if mailUser = "" mailgun is used otherwise nativ mail server on the system

I understand that as "people can join anyway, with and without registration". But that's wrong, isn't it?

And what do I need to add as gunDomain and gunApiKey? I take it that user, password and fromaddress have to contain the login info of my gmail account which then sends the initial password to the player.

Re: Need help configuring a simple, private server

PostPosted: 22 Dec 2019, 13:04
by JCrook
No one who has more info on how the registration setup and stuff works? There's no official documentation explaining this properly after all.

Re: Need help configuring a simple, private server

PostPosted: 22 Dec 2019, 18:13
by JayDi
Enable or disable auth/registration:
authenticationActivated="true"

You can use SMTP (warning, you can't use gmail for sending emails -- xmage does not meet safety requirements by google):
mailSmtpHost="smtp.gmail.com"
mailSmtpPort="465"
mailUser="xxx@gmail.com"
mailPassword="yyy"
mailFromAddress="xxx@gmail.com"

Or you can use mailgun service:
mailgunDomain="domain"
mailgunApiKey="key-xxx"

That's all.