Usually legal jurisdiction goes with geography. There are Exceptions (crimes against humanity, sex tourism things). If you host it outside Iran and you are outside Iran, then it’s just a theoretical crime?
extra territorial example: it may be a crime to do things/speak ill of a foreign government. If you lived there you’d get arrested. What if you did this while sitting in your bedroom overseas?