URL for connecting sync-endpoint (local server) with ODK-X services

Hello everyone! I am new to ODK-X and I have been able to set up local server following this guide: ODK-X Sync Endpoint — ODK-X Docs.

I am confused as to what URL I need to use on Server settings in ODK-X Services on my android device in order to connect it to the local server. I do not have a domain name or SSL certificate. I access the local server using 127.0.0.1 and 127.0.0.1:40000. I searched the forum and googled the issue, but I could not find a solution. It maybe so that I do not know a better way to phrase my issue.

It will help me a lot if someone can explain this to me in simple terms. Thank you!

1 Like

Hi @Apurva_Bhargava ,
Welcome to the Community.

In order to use ODK-X Services app, you will have to access your local server from the Internet.

To access your local server from the Internet, you will have to do a cloud setup. Here you can find the information about setting up the cloud services.
But if you don’t need your remote server continuously running, you can also look for alternatives like ngrok.

Once you expose your local server to the Internet either using cloud services or ngrok you will get an URL on which your server is running. That URL you will have to enter in Server settings of ODK-X services app.

Hope this clarifies your doubt!!

4 Likes

Thank you, I will try the ngrok suggestion for now.

I had tried AWS cloud services following this guide: https://docs.odk-x.org/sync-endpoint-setup/#sync-endpoint-setup-aws, however, after following all 5 steps upto ‘docker stack ls’ check successfully, the page at https://[ip_address]:40000/ does not load. There is connection time out error, and when curl return empty response from page. I tried some troubleshooting tips at AWS (VPC, firewall and browser settings) but to no avail. Do you have any idea of where I might be going wrong? I am certain it is a small thing that I am missing.

1 Like

There is no certificate for the console because most often users tunnel in over SSH to prevent anyone outside from getting to the accounts. You can change it to ‘http’ instead of ‘https’ and it should work once you accept the exception. OR you can follow the instructions posted recently by @chrismclarke on how to create a certificate so you can use ‘https’.

3 Likes

Just to quickly add, as well as testing on http://[ip_address]:40000 and not https:// … you might also need to configure aws to unblock the port in a way similar to what is described for the digital ocean example.

1 Like