It is currently 04 Apr 2020, 02:14
   
Text Size

Need help configuring a simple, private server

by BetaSteward

Moderators: TheElk801, BetaSteward, LevelX, North, noxx, JayDi, jeffwadsworth, CCGHQ Admins

Need help configuring a simple, private server

Postby JCrook » 13 Dec 2019, 18:08

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.
JCrook
 
Posts: 4
Joined: 13 Dec 2019, 17:53
Has thanked: 0 time
Been thanked: 0 time

Re: Need help configuring a simple, private server

Postby JayDi » 13 Dec 2019, 20:58

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
User avatar
JayDi
 
Posts: 267
Joined: 23 Nov 2017, 15:41
Location: Russia
Has thanked: 0 time
Been thanked: 36 times

Re: Need help configuring a simple, private server

Postby JCrook » 14 Dec 2019, 15:55

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
JCrook
 
Posts: 4
Joined: 13 Dec 2019, 17:53
Has thanked: 0 time
Been thanked: 0 time

Re: Need help configuring a simple, private server

Postby JayDi » 14 Dec 2019, 15:58

You can find instructions about email and smtp here (settings for google's gmail):
https://support.google.com/mail/answer/7126229?hl=en
User avatar
JayDi
 
Posts: 267
Joined: 23 Nov 2017, 15:41
Location: Russia
Has thanked: 0 time
Been thanked: 36 times

Re: Need help configuring a simple, private server

Postby JCrook » 14 Dec 2019, 16:15

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.
JCrook
 
Posts: 4
Joined: 13 Dec 2019, 17:53
Has thanked: 0 time
Been thanked: 0 time

Re: Need help configuring a simple, private server

Postby JCrook » 22 Dec 2019, 13:04

No one who has more info on how the registration setup and stuff works? There's no official documentation explaining this properly after all.
JCrook
 
Posts: 4
Joined: 13 Dec 2019, 17:53
Has thanked: 0 time
Been thanked: 0 time

Re: Need help configuring a simple, private server

Postby JayDi » 22 Dec 2019, 18:13

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.
User avatar
JayDi
 
Posts: 267
Joined: 23 Nov 2017, 15:41
Location: Russia
Has thanked: 0 time
Been thanked: 36 times


Return to XMage

Who is online

Users browsing this forum: No registered users and 6 guests


Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 6 guests

Login Form