I’ve manged to change the port. In the end it was very simple.
(if this description is correct I don’t know, I just describe what I did, so that the port was free and I could continue with the installing process)
edit the file discourse-setup
`sudo -s
cd /var/discourse
nano discourse-setup
Nano should open inside the shell. Search for the line with port 80 and change it to a port which is free.
To save the changes and exit nano you press
crl + ^ + x