What is my Directus Port?
If you are reading this, you are probably wanting to know what port Directus is using. In this article, I'll cover how to find out the port number and how to change it if needed.
The default port for Directus is 8055.
If you are running this on your own device, the address will be http://127.0.0.1:8055 or if remotely, make sure the port is open on the firewall and use your servers public IP address for access http://remote.ip.address.here:8055. However, it's not recommended to access Directus using an IP address. Instead you should obtain a domain name and set up a proxy web service like Nginx.
How to change the Port?
To change the default port of your new project, edit the .env file where you installed Directus.
Near the top, find the PORT parameter and change the number. For those new to vim, press i on your keyboard to enable insert mode. This allows you to edit the page.
Once you have changed the port, save and close the file by pressing ESC then typing :wq (with the leading colon).
You can now start Directus and the new port will be used.
Directus installs on the default port of 8055. If you need to change this, edit the .env configuration file in your Directus project folder.