https://github.com/songdrop/forgejo-azure
python script to install forgejo on Azure
https://github.com/songdrop/forgejo-azure
azure forgejo python
Last synced: 3 months ago
JSON representation
python script to install forgejo on Azure
- Host: GitHub
- URL: https://github.com/songdrop/forgejo-azure
- Owner: SongDrop
- License: mit
- Created: 2025-07-05T15:51:29.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-05T16:09:43.000Z (3 months ago)
- Last Synced: 2025-07-05T17:05:31.301Z (3 months ago)
- Topics: azure, forgejo, python
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```
▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄
█ █ █ ▄ █ █ █ █ █ █ █
█ ▄▄▄█ ▄ █ █ █ █ █ ▄▄▄▄█ ▄▄▄█ █ █ ▄ █
█ █▄▄▄█ █ █ █ █▄▄█▄█ █ ▄▄█ █▄▄▄ ▄ █ █ █ █ █
█ ▄▄▄█ █▄█ █ ▄▄ █ █ █ █ ▄▄▄█ █▄█ █ █▄█ █
█ █ █ █ █ █ █ █▄▄█ █ █▄▄▄█ █ █
█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█```
# Forgejo Self-Hosted Git Client Server on Azure
This is an **automatic installation** on Azure to set up a forgejo self-hosted git server.
---
## Step 1: Create a Microsoft Azure account on https://portal.azure.com
## Step 2: Point your DNS records to Microsoft Azure
## Step 3: Create a new Application in Microsoft Entra ID and fill out the .evn
## Step 4: Run setup script for automatic software installation on the virtual machine
---
---
> **Important:**
> You will need to update your domain's nameservers at your registrar (e.g., Namecheap) to the following Azure DNS nameservers:
>
> - ns1-01.azure-dns.com
> - ns2-01.azure-dns.net
> - ns3-01.azure-dns.org
> - ns4-01.azure-dns.info
>
> Make sure your DNS records point to Azure **before** you start the installation.---
## Required `.env` values for Azure:
You need to provide the following values in your `.env` file:
```
Azure subscription -> portal.azure.comAZURE_SUBSCRIPTION_ID='' # https://portal.azure.com/#view/Microsoft_Azure_Billing/SubscriptionsBladeV2
AZURE_TENANT_ID='' # https://portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/Overview
AZURE_APP_CLIENT_ID=''
AZURE_APP_CLIENT_SECRET=''
AZURE_APP_TENANT_ID=''
```You also need to create a new Azure Application in Azure Entra ID (Azure Active Directory) to get these credentials.
---
## To start:
```bash
python3 -m venv myenv
source myenv/bin/activate
pip install -r requirements.txt
python3 create_vm.py
```---
## After that, just input these values when prompted, and your forgejo service will be up and running within 5 minutes:
```
Enter VM username [azureuser]:
Enter VM password [azurepassword1234!]:
Enter main domain [example.com]:
Enter subdomain (e.g., 'forgejo') [forgejo]:
[INFO] Full domain to configure: forgejo.example.com
Enter resource group name [forgejogroup]:
Enter VM name [forgejo]:
Enter Azure region [uksouth]:
Enter VM size [Standard_B2s]:
Enter admin email [admin@example.com]:
Enter admin password [forgejopass123!]:
Enter disk size in GB [1024]:
```> You might also need to request Azure quota increase for the specific virtual machine size you plan to use.
---
Happy mailing with your new forgejo setup on Azure! 🚀