The Grafana backend has a number of configuration options defined in its config file (usually located at /etc/grafana/grafana.ini on linux systems). Grafana uses port 3000 as default, change it if needed and make sure to configure your firewall accordingly.