Windows Group Policy Editor - Web-Based Interface for All Windows Versions
Features β’ Installation β’ Usage β’ API Documentation β’ Contributing
Go Policy is a modern, web-based Windows Group Policy Editor written in Go. This project is inspired by the original PolicyPlus project, which was written in Visual Basic .NET. Go Policy provides the same powerful functionality with a modern web interface, making it accessible from any browser.
This project is inspired by and based on the excellent work done in PolicyPlus by Fleex255. The original PolicyPlus project demonstrated how to work with Windows Group Policy settings without requiring the full Group Policy infrastructure, making it accessible on all Windows editions including Home versions.
Go Policy takes this concept further by:
- Rewriting the core logic in Go for better performance and cross-platform potential
- Adding a modern web interface for easier access and better user experience
- Maintaining full compatibility with Windows Group Policy structures (ADMX/ADML files)
- Providing RESTful API endpoints for programmatic access
While PolicyPlus is a desktop application, Go Policy is a web-based solution that:
- Runs as a local web server
- Can be accessed from any device on your network
- Provides a REST API for automation
- Uses modern web technologies for a responsive UI
Note: Policy descriptions and explanations will appear in your device's language based on the ADML (Administrative Template Language) files available on your system. The interface automatically detects and uses the appropriate language files.
- β Works on all Windows versions (Home, Pro, Enterprise, Server)
- π Modern web-based interface - Access from any browser
- π Full ADMX/ADML support - Reads all Windows policy definitions
- πΎ Registry-based policy management - Direct registry manipulation
- π Advanced search - Find policies by name or description
- π¨ Dark mode UI - Modern, professional design
- π Fast and lightweight - Built with Go for optimal performance
- π Explorer refresh - Restart Windows Explorer with one click
- π± Responsive design - Works on desktop and tablet devices
- π Multi-language support - Policy descriptions in your system language
Go Policy allows you to manage a wide range of Windows system and user settings through Group Policy. Here are some common use cases:
System Management:
- π Block/enable USB ports - Control USB device access
- πΌοΈ Prevent wallpaper changes - Lock desktop customization
- π¨ Customize Start menu - Configure Start menu appearance and behavior
- π Manage network settings - Control network connection policies
- π Apply security policies - Enforce security configurations
- π Control Windows Update - Manage update settings and policies
- π± Device restrictions - Limit access to specific devices or features
- π« Application control - Block or allow specific applications
- π Password policies - Configure password requirements
- π File system access - Control access to drives and folders
And hundreds more system settings...
Go Policy provides RESTful API endpoints that allow you to integrate Group Policy management into your own applications and automation scripts. Whether you're building:
- Configuration management tools - Automate policy deployment
- IT administration dashboards - Centralized policy management
- DevOps pipelines - Policy enforcement in CI/CD workflows
- Monitoring systems - Track and audit policy changes
- Custom automation scripts - Programmatic policy configuration
You can use the REST API to:
- List and search policies programmatically
- Read current policy states
- Apply policy changes via API calls
- Integrate with existing infrastructure management tools
See the API Documentation section for detailed endpoint information and examples.
- Universal Access: Works on all Windows versions including Home editions
- License Compliance: No Windows components shipped, uses system files
- Full-Featured: Complete Group Policy management capabilities
- Easy to Use: Intuitive web interface accessible from any browser
- Developer Friendly: RESTful API for automation and integration
- Go 1.21 or higher (for building from source)
- Windows Vista or higher (Windows Server 2008+ supported)
- Web browser (Chrome, Firefox, Edge, Safari, etc.)
- Administrator privileges (required for policy changes)
- Download the latest release from the Releases page
- Extract the executable
- Run
gopolicy.exe(orgopolicyon other platforms)- Default port (8080):
gopolicy.exe - Custom port:
gopolicy.exe -p 9000
- Default port (8080):
- Open your browser and navigate to
http://localhost:8080(or your custom port) - Important: For policy changes, run as Administrator (right-click β Run as administrator)
# Clone the repository
git clone https://github.com/SadikSunbul/GoPolicy.git
cd GoPolicy
# Install dependencies
go mod download
# Build the application
go build -o gopolicy.exe
# Run the application
# Default port (8080)
./gopolicy.exe
# Or specify a custom port
./gopolicy.exe -p 9000-p <port>: Specify the port number (default: 8080)- Example:
gopolicy.exe -p 9000runs on port 9000 - Example:
gopolicy.exeruns on default port 8080
- Example:
When you start Go Policy, you'll see output like this:
Policy Plus - Go Edition
Local Group Policy Editor for all Windows editions
========================================
Loading ADMX files: C:\Windows\PolicyDefinitions
Detected locales: [en-US, tr-TR]
Starting web interface: http://localhost:8080
Open in your browser and start using!
-
Open the Web Interface
- Navigate to
http://localhost:8080in your browser - The interface will load with all available policy categories
- Navigate to
-
Browse Categories
- Use the left sidebar to navigate through policy categories
- Categories are organized by User Configuration and Computer Configuration
- Click on a category to see its policies
-
Search Policies
- Use the search box in the sidebar to find policies by name or description
- Filter by User, Computer, or Both sections
- Search results appear in real-time
-
View and Edit Policies
- Click on a policy from the list to view its details in the right panel
- Configure the policy state: Enabled, Disabled, or Not Configured
- Set policy-specific values if the policy has configurable elements
- Click "Apply" to save your changes
-
Refresh Explorer
- After making policy changes, click "Refresh Explorer" to restart Windows Explorer
- This ensures some policy changes take effect immediately
Main interface showing categories and policy list
Policy configuration panel with settings
Search functionality with filtered results
Go Policy provides a RESTful API for programmatic access. All API endpoints return JSON responses.
http://localhost:8080
GET /Returns the main HTML page of the web interface.
Response: HTML content
GET /api/categoriesRetrieves all policy categories organized by User and Computer configurations.
Response:
{
"user": [
{
"id": "category-id",
"name": "Category Name",
"description": "Category description",
"policyCount": 10,
"children": [...]
}
],
"computer": [...]
}Usage Example:
curl http://localhost:8080/api/categoriesGET /api/policies?category={categoryId}Retrieves all policies in a specific category.
Parameters:
category(required): The category ID
Response:
[
{
"id": "policy-id",
"name": "Policy Name",
"description": "Policy description",
"state": "Not Configured",
"section": "User"
}
]Usage Example:
curl "http://localhost:8080/api/policies?category=NetworkConnections"GET /api/policy/{policyId}Retrieves detailed information about a specific policy, including its current state and configurable elements.
Parameters:
policyId(path): The policy ID
Response:
{
"id": "policy-id",
"name": "Policy Name",
"description": "Detailed policy description",
"state": "Enabled",
"section": "User",
"registryKey": "Software\\Policies\\Microsoft\\Windows\\...",
"elements": [
{
"id": "element-id",
"type": "text",
"label": "Element Label",
"description": "Element description",
"required": false,
"defaultValue": "default value"
}
]
}Usage Example:
curl http://localhost:8080/api/policy/NC_AllowAdvancedTCPIPConfigPOST /api/policy/set
Content-Type: application/jsonApplies a policy configuration to the system.
Request Body:
{
"policyId": "policy-id",
"state": "Enabled",
"section": "user",
"options": {
"element-id": "value"
}
}Parameters:
policyId(required): The policy IDstate(required): One ofEnabled,Disabled, orNotConfiguredsection(optional):userormachine(defaults based on policy)options(optional): Object containing element values for the policy
Response:
{
"success": true,
"message": "Policy updated successfully",
"verifiedState": "Enabled"
}Usage Example:
curl -X POST http://localhost:8080/api/policy/set \
-H "Content-Type: application/json" \
-d '{
"policyId": "NC_AllowAdvancedTCPIPConfig",
"state": "Enabled",
"section": "user"
}'GET /api/search?q={query}§ion={section}Searches for policies by name or description.
Parameters:
q(required): Search querysection(optional):user,computer, orboth(default:both)
Response:
{
"query": "search term",
"user": [
{
"id": "policy-id",
"name": "Policy Name",
"description": "Description",
"state": "Not Configured",
"section": "User",
"categoryId": "category-id",
"categoryName": "Category Name"
}
],
"computer": [...],
"total": 5
}Usage Example:
curl "http://localhost:8080/api/search?q=network§ion=both"GET /api/sourcesRetrieves available policy sources (Registry, Local GPO, etc.).
Response:
[
{
"type": "Local GPO",
"path": "C:\\Windows\\System32\\GroupPolicy",
"writable": true
},
{
"type": "Registry",
"path": "HKLM",
"writable": true
}
]Usage Example:
curl http://localhost:8080/api/sourcesPOST /api/saveSaves all pending policy changes to disk (for POL file-based sources).
Response:
{
"success": true,
"message": "Changes saved"
}Usage Example:
curl -X POST http://localhost:8080/api/savePOST /api/refresh-explorerRestarts Windows Explorer to apply policy changes that require a shell restart.
Response:
{
"success": true,
"message": "Windows Explorer restarted successfully"
}Usage Example:
curl -X POST http://localhost:8080/api/refresh-explorerNote: This endpoint requires administrator privileges.
All API endpoints may return error responses in the following format:
{
"error": "Error message description"
}Common HTTP status codes:
200 OK- Request successful400 Bad Request- Invalid request parameters404 Not Found- Resource not found405 Method Not Allowed- Invalid HTTP method500 Internal Server Error- Server error
Edit main.go and modify the port variable:
port := ":8080" // Change to your desired portBy default, Go Policy uses C:\Windows\PolicyDefinitions. To use a custom folder:
admxPath := "C:\\YourCustomPath\\PolicyDefinitions"- Colors: Edit CSS variables in
web/static/style.css - Layout: Modify
internal/handlers/templates/index.gohtml - Behavior: Update
web/static/app.js
Problem: Policies don't appear or categories are empty.
Solution:
- Verify ADMX files exist in
C:\Windows\PolicyDefinitions - On Windows Home editions, download ADMX files from Microsoft
- Extract to
C:\Windows\PolicyDefinitionsfolder
Problem: Application fails to start with port error.
Solution:
- Change the port in
main.go - Or close the application using port 8080
Problem: Policy changes fail with access denied.
Solution:
- Run as Administrator - Right-click the executable and select "Run as administrator"
- Some policy changes require elevated privileges
- Note: Even when compiled to an .exe file, administrator privileges are still required for registry write operations. This is a Windows security requirement, not a limitation of the application.
Problem: Changes are saved but don't apply.
Solution:
- Click "Refresh Explorer" button
- Log off and log back in
- Restart your computer for some policies
- Run
gpupdate /forcein Command Prompt as administrator
Problem: Policy descriptions appear in wrong language.
Solution:
- Go Policy uses ADML files from your system
- Ensure your system has the correct language pack installed
- ADML files should be in
C:\Windows\PolicyDefinitions\{locale}
We welcome contributions! Here's how you can help:
-
Fork the Repository
# Click the "Fork" button on GitHub -
Create a Feature Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Write clean, documented code
- Follow Go coding conventions
- Add tests if applicable
- Update documentation
-
Commit Your Changes
git commit -m "Add: Description of your feature" -
Push to Your Fork
git push origin feature/your-feature-name
-
Open a Pull Request
- Go to the original repository on GitHub
- Click "New Pull Request"
- Select your branch
- Describe your changes
- Code Style: Follow standard Go formatting (
go fmt) - Documentation: Update README.md and code comments
- Testing: Test your changes on Windows
- Issues: Reference related issues in your PR
- Commits: Write clear, descriptive commit messages
- π Bug Fixes: Fix issues reported in the issue tracker
- β¨ New Features: Add requested features
- π Documentation: Improve documentation and examples
- π¨ UI/UX: Enhance the web interface
- β‘ Performance: Optimize code and improve speed
- π Localization: Add support for more languages
- π§ͺ Testing: Add unit tests and integration tests
When reporting issues, please include:
- Windows version
- Go version (if building from source)
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- Error messages
This project is licensed under the MIT License - see the LICENSE file for details.
-
Original PolicyPlus Project: Fleex255/PolicyPlus
- This project is inspired by and based on the excellent work done by Fleex255
- PolicyPlus demonstrated how to work with Windows Group Policy without full infrastructure
- Go Policy adapts these concepts to a modern web-based architecture
-
Go Community: For the excellent tools and libraries
-
Contributors: Everyone who has helped improve this project
β If you liked this project, don't forget to give it a star! β
Made with β€οΈ using Go
