2 min read

What is my Directus Port?

Find out the default port used in Directus and how you can change it.

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 add a domain name to Directus
It’s important to have a domain name for Directus so you’re not exposing your IP address and port to the public. You’ll need to purchase a domain name from a supplier and set up the DNS record to use your server.

How to change the Port?

To change the default port of your new project, edit the .env file where you installed Directus.

vim /path/to/directus/project/.env

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.

PORT=8055

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.

Conclusion

Directus installs on the default port of 8055. If you need to change this, edit the .env configuration file in your Directus project folder.

By continuing to use our website, you consent to use essential cookies. We also use optional tracking cookies which help us gather statistics to improve our services. Do you consent to these cookies?

I Consent Do not track