You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Urko cd42a6b0bf
fix readme
4 months ago
cmd/http fix remove fail2ban 5 months ago
internal fix: get user account 4 months ago
kit init app 5 months ago
.gitignore gitignore and license 5 months ago
LICENSE fix: license and refactor call to post 5 months ago fix readme 4 months ago
go.mod feat: add test forpassword hash 4 months ago
go.sum feat: add test forpassword hash 4 months ago

Prosody Password Manager

This project provides a web interface to change the password for XMPP accounts managed by Prosody. It interfaces with the Prosody server to securely handle password changes.

Project Structure

├── cmd
│   └── http
│       ├── main.go
│       └── views
│           ├── error.hbs
│           ├── index.hbs
│           ├── styles.hbs
│           └── success.hbs
├── go.mod
├── go.sum
├── internal
│   ├── api
│   │   ├── handler
│   │   │   ├── helper.go
│   │   │   └── prosody_hdl.go
│   │   └── server.go
│   └── services
│       ├── fail2ban
│       │   └── fail.go
│       └── prosody
│           ├── account.go
│           ├── change_password.go
│           ├── change_password_test.go
│           └── prosody.go
├── kit
│   ├── config
│   │   └── config.go
│   └── path.go

Key Files

  • logic to change the password in the Prosody server. It interfaces with the Prosody server's command-line tools and verifies the current password before making any changes.

  • prosody.go: Provides utility functions related to the Prosody server, including constructing paths to account data files.

  • account.go: Contains utility functions to load account details from Prosody's data files.

  • server.go: Sets up the web server, routes, and middleware for the application.

  • main.go: The entry point of the application. It initializes the services and starts the web server.


  • Prosody Server: Ensure that the Prosody server is installed and running on your machine. This application interfaces with Prosody's command-line tools to manage XMPP accounts.

  • Environment Variables: The application requires certain environment variables to be set. These can be provided directly or through a .env file. The required variables are:

    • DOMAIN: The domain for the Prosody server (e.g.,
    • API_PORT (optional): The port on which the web server will run. Defaults to 8080 if not provided.
    • VIEWS (optional): The path to the directory containing view templates. Defaults to ./views if not provided.

Setup & Running

  1. Ensure you have Go installed on your machine.
  2. Clone the repository.
  3. Navigate to the project directory.
  4. Run the application using:
go run cmd/http/main.go

Visit http://localhost:<API_PORT> in your browser to access the password change interface.


If you'd like to contribute to this project, please fork the repository and submit a pull request.