Dear All,
I am using Ubuntu 22.04LTS, and I am already using port 80, 443. So I want some guidance from you, On the same machine, I am going to install ODK Central with PostgreSQL 14 and need to change the ports to run ODK Central smoothly.
Dear Abdul_Raziq,
To change the ports on which ODK Central runs, you'll need to modify the configuration settings of the ODK Central application. Here's a step-by-step guide to help you change the ports and run ODK Central smoothly on your Ubuntu 22.04LTS machine:
Open a terminal on your Ubuntu machine.
Navigate to the directory where ODK Central is installed. This is typically the root directory of the ODK Central installation.
Locate the .env file in the ODK Central directory and open it using a text editor. The .env file contains configuration settings for ODK Central.
Look for the ODK_PORT variable in the .env file. This variable defines the port on which ODK Central will run. By default, it is set to 80. Change this value to a different port number that is not already in use. For example, you can set it to 8080.
makefile
Copy code
ODK_PORT=8080
Save the changes to the .env file and close the text editor.
Restart the ODK Central service for the changes to take effect. You can do this by running the following command in the terminal:
shell
Copy code
sudo systemctl restart odk-central
This command will restart the ODK Central service using the updated port configuration.
After restarting the service, you should be able to access ODK Central using the new port number. In this example, you can access it at http://:8080 or http://localhost:8080 if you're running it on the same machine.
Make sure to update any firewall or network settings accordingly to allow traffic on the new port you've chosen.
That's it! You have successfully changed the ports for running ODK Central smoothly on your Ubuntu 22.04LTS machine.