Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure the sydent server doesn't work #366

Closed
Sethox opened this issue Jun 21, 2021 · 5 comments
Closed

Configure the sydent server doesn't work #366

Sethox opened this issue Jun 21, 2021 · 5 comments

Comments

@Sethox
Copy link

Sethox commented Jun 21, 2021

Describe the bug
Using Github clone
The configuration file doesn't seem to run or being used, even if it gets generated when server is starts.

To Reproduce
Steps to reproduce the behavior:

  1. Start server with python -m sydent.sydent
  2. The console output says:
2021-06-21 18:35:59,022 - __main__ - 210 - INFO - Starting Sydent server
2021-06-21 18:35:59,022 - sydent.db.sqlitedb - 32 - INFO - Using DB file sydent.db
2021-06-21 18:35:59,040 - sydent.http.httpcommon - 50 - WARNING - No HTTPS private key / cert found: not starting replication server or doing replication pushes
2021-06-21 18:35:59,041 - sydent.http.httpserver - 144 - INFO - Starting Client API HTTP server on :::8090
2021-06-21 18:35:59,042 - twisted - 147 - INFO - Site starting on 8090
2021-06-21 18:35:59,042 - twisted - 147 - INFO - Starting factory <twisted.web.server.Site object at 0x7fe5d47abc50>
  1. Change the config file sydent.conf:
clientapi.http.bind_address = 0.0.0.0
clientapi.http.port = 8091
  1. still getting:
2021-06-21 18:37:51,658 - __main__ - 210 - INFO - Starting Sydent server
2021-06-21 18:37:51,777 - sydent.http.httpcommon - 50 - WARNING - No HTTPS private key / cert found: not starting replication server or doing replication pushes
2021-06-21 18:37:51,778 - sydent.http.httpserver - 144 - INFO - Starting Client API HTTP server on :::8090
2021-06-21 18:37:51,779 - twisted - 147 - INFO - Site starting on 8090

Still getting port 8090 and with ipv6

Expected behavior
The server should start with the port the configure file

Desktop (please complete the following information):

  • OS: Centos 8 [Kernel 4.18.0-305.3.1.el8.x86_64]
  • Version [github clone]

Additional context
With no way to bind the IP I cannot customize the type of IP protocol (4 or 6)

@Sethox
Copy link
Author

Sethox commented Jun 23, 2021

My fault, I needed to read more. I found the fault. I needed to edit the:
clientapi.http.bind_address = 0.0.0.0 clientapi.http.port = 8091
under the [http] tag to change the variables to the desired bind.

@Sethox Sethox closed this as completed Jun 23, 2021
@Jieiku
Copy link

Jieiku commented Dec 12, 2021

Thanks for posting this. the generated sydent.conf has plenty of values under DEFAULT but no values anywhere else, I do not even know where to begin. which of these values belong where?

Using the information you posted I was able to get it to bind on 0.0.0.0 with ipv4 but I still cannot get this working. my element-web just complains:

Cannot reach identity server
You can log in, but some features will be unavailable until the identity server is back online. If you keep seeing this warning, check your configuration or contact a server admin.

Appreciate any info or links to documentation you can share.

@schroedingersZombie
Copy link

This is still relevant. Any updates on documentation or anything?

@Jieiku
Copy link

Jieiku commented Jan 7, 2024

I did end up getting this all working back then, I run my own sydent, synapse, and element-web.

My solution may not work for you, the sydent.conf is only part of the problem, I also had to create a fairly complicated set of rules in my reverse proxy as well.

here is my sydent.conf:

[DEFAULT]
... leave default section alone

[general]
server.name = example.com
ip.whitelist = 10.5.5.5

[db]

[http]
clientapi.http.bind_address = 0.0.0.0
internalapi.http.bind_address = 0.0.0.0
replication.https.bind_address = 0.0.0.0
replication.https.port = 443
obey_x_forwarded_for = True
client_http_base = https://matrix.example.com

[email]
email.from = Sydent Validation <[email protected]>
email.smtphost = mx.example.com
email.smtpport = 587
email.smtpusername = [email protected]
email.smtppassword = ExampleExampleExampleExampleExample
email.hostname = example.com
email.tlsmode = 1
email.default_web_client_location = https://matrix.example.com

[sms]

[crypto]
... leave crypto section alone

ip.whitelist under [general] is referring to a virtual IP that points to my internal network, was a solution I used because I am running split DNS, I think that entry can probably be ignored in most cases.

Then finally you have to configure your reverse proxy to properly route everything, this was by far the hard part, I use haproxy as my reverse proxy.

@schroedingersZombie
Copy link

Thank you for your help!
I actually found the underlying problem: #585 but forgot to update here ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants