Obtaining a visa for Iran takes time. Give yourself a month before receiving the sticker in your passport. The visa is valid for 3 months (meaning you have 3 months to enter Iran) and the duration is usually 30 days. It’s easy to extent the visa once in Iran. Those from the UK, Canada and USA need to book a tour to travel in Iran. Those holding a passport from Israel won’t be allowed in the country or if you have a stamp from Israel in your passport. Don’t mention you are travelling by bicycle.
First, you need an authorization number from the Ministry of Foreign Affairs (MFA). Contact a tour operator selling tours in Iran with direct contact with the MFA. Caravanistan had good reviews. You have to specify the embassy from where you would like to apply for the visa. This can be a different city then the one you applied for the MFA number. For instance, I received my MFA number in Bishkek but applied for the visa in Tashkent. Getting the MFA number takes 10-12 working days, give or take. Mine took 3 weeks to deliver while other travelers received theirs in 10 days. Go figure. The tour operator will contact you once they receive the MFA number. Note that this MFA number is only valid for the embassy you specified.
Once the MFA number received, you can go to the embassy and apply for the visa. Fill in the application form and bring 2-3 passport size photos. Girls will need to cover their head on the photo. Caravanistan is an excellent source for tips to get it right. Note that receiving the MFA number doesn’t guarantee the visa; the officer at the embassy is the person making the decision so be courteous with him/her. It could be another week of waiting before receiving the visa and the fee varies a lot according to the country you are from and which embassy you apply from.