This study conducts a thorough economic and technical analysis to assess the viability of green hydrogen and green ammonia production using renewable energy sources in the Republic of Djibouti. We explore the economic competitiveness of utilizing wind and solar power for sustainable energy production through various measures including levelized cost of energy (LCOE), hydrogen (LCOH), and ammonia (LCOA). Our analysis incorporates sensitivity assessments and Monte Carlo simulations to predict financial feasibility and environmental impact, focusing on CO2 emission reductions. A cost mapping of electricity, green hydrogen, and green ammonia from solar and wind resources was created to find Djibouti's most cost-effective production sites. The feasibility of exporting green ammonia to neighboring countries with high fertilizer demand was also evaluated using rail and truck transport scenarios. Key findings demonstrate that Moulouhlé, endowed with robust wind and solar resources, presents a strategic site for deploying renewable energy technologies. Wind energy, with a lower LCOE of 0.066 $/kWh compared to solar's 0.093 $/kWh, emerges as a more cost-effective solution for both hydrogen and ammonia production. Notably, wind-powered hydrogen production costs are 2.25 $/kgH2, significantly lower than solar-powered costs at 4.17 $/kgH2. In terms of green ammonia, wind power achieves production costs of 399.76 $/tonNH3, outperforming solar power which stands at 537.11 $/tonNH3. Additionally, our study evaluates the logistics of exporting green ammonia, determining rail transport as a more economically viable option than trucking. This research not only underscores Djibouti's potential as a leader in green energy exportation but also aligns with global decarbonization efforts, showcasing significant CO2 savings—154.94 Mt annually from wind. This work emphasizes the importance of strategic resource utilization in Djibouti, offering insights critical for stakeholders in making informed decisions about investing in renewable energy infrastructures. The outcomes suggest a promising future for regional energy sustainability and economic resilience, fostering a transition towards low-carbon energy systems.