0
0
Fork 0
mirror of https://git.verdigado.com/NB-Public/simple-wkd.git synced 2024-12-03 17:32:49 +01:00
public mirror according to agpl3 https://github.com/Delta1925/simple-wkd
Find a file
2024-10-27 10:05:23 +01:00
.github/workflows Fix uppercase in CI 2023-05-20 19:57:44 +02:00
assets Add docker build 2023-04-16 16:05:55 +02:00
backend 1.2.1 2023-05-20 23:58:34 +02:00
website source yaml files to source 2024-10-26 11:36:41 +02:00
build-debian.sh rm musl-dev 2024-10-26 13:55:37 +02:00
example.config.toml Return to debian for docker 2023-04-16 22:20:45 +02:00
LICENSE Add README and LICENSE 2023-04-23 18:42:07 +02:00
package-debian.sh enable execution for scripts 2024-10-27 09:59:26 +01:00
README.md Add development section to README 2023-04-23 22:01:49 +02:00
simple-wkd.code-workspace Fix env variables not working 2023-04-18 23:32:17 +02:00
wkd.service package installer includes service now 2024-10-26 15:48:40 +02:00

Simple WKD

A simple web key directory server written in rust.

AGPLv3 License

Features

  • Simple web interface to manage keys
  • Darkmode support
  • Email confirmations
  • Support for both the Advanced and Direct wkd types
  • Easy to use docker container

Requirements

  • docker-compose

Configuration

Config name Accepted values Meaning
variant Advanced or Direct Use Advanced if the keys are accessible on openpgpkey.yourdomain.tld; Use Direct if the keys are accessible on the same domain (and subdomain) as your email server
max_age Any number How long an addition/deletion request can live before becoming stale
cleanup_interval Any positive number How much time should pass between stale request cleanups
allowed_domains Array of strings What email domains this server should accept
port Any positive number Which port the server should bind to
bind_host An ip address Which address the server should bind to
external_url A valid url The URL to the web interface (this will be used to generate confirmation links)
mail_settings.smtp_host String The SMTP host
mail_settings.smtp_username String The username to be used for authentication
mail_settings.smtp_password String The password to be used for authentication
mail_settings.smtp_port Any positive number The port of the SMTP server
mail_settings.smtp_tls Tls or Starttls The encryption method to use
mail_settings.mail_from String The email address to be used
mail_settings.mail_subject String The confirmation email's subject

Environment Variables

You can choose the logging level by setting the RUST_LOG environment variable, using the env_logger syntax. To filter out logs originating from simple-wkd's dependencies, you should set RUST_LOG to simple_wkd={log_level}

Development

To develop the webpage you just need to cd to the website directory and run the dev server. This allows to see changes to the code in real-time, but doesn't start the backend.

$ cd website
$ pnpm install && pnpm dev

To develop the backend you need to copy the necessary files (aka. config and assets, including the webpage) to the backend directory, and run the server.

# Build the webpage
$ cd website
$ pnpm install && pnpm build
$ cd ..
# Copy necessary files to the backend folder
$ cp -r website/dist assets/webpage && cp -r assets backend/assets 
$ cp example.config.toml backend/example.toml 
# Run the server
$ cd backend
$ cargo run

Deployment

  1. Download the default docker-compose.yml and config.toml

    $ wget https://raw.githubusercontent.com/Delta1925/simple-wkd/master/docker-compose.yml
    $ wget https://raw.githubusercontent.com/Delta1925/simple-wkd/master/example.config.toml -O config.toml
    
  2. Set up simple-wkd by editing the settings in config.toml and docker-compose.yml.

  3. When you're done, start the server using docker-compose

    $ docker-compose up
    

This will run the simple-wkd server and publish it on port 8080. You will need to set up a reverse proxy, like caddy.

Contributing

Contributions are always welcome!

Please check the issues first to avoid having multiple people work on the same thing and to ensure that your contribution is helpful.

License

GNU AGPLv3