Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dispherical/yatcm
Yet another tilde caddy manager
https://github.com/dispherical/yatcm
caddy dn42 tilde
Last synced: about 2 months ago
JSON representation
Yet another tilde caddy manager
- Host: GitHub
- URL: https://github.com/dispherical/yatcm
- Owner: dispherical
- License: agpl-3.0
- Created: 2024-08-24T00:03:08.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-06T04:53:30.000Z (4 months ago)
- Last Synced: 2024-10-27T13:48:54.163Z (3 months ago)
- Topics: caddy, dn42, tilde
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# yatcm
Yet another tilde caddy manager. Runs with [bun](https://bun.sh). This allows your tilde instance users to configure Caddy at the top level themselves instead of having to beg an admin to do it. Supports domain verification for custom domains and the [Burble CA](https://dn42.burble.com/services/ca/) for dn42 domains out of the box.
## Configuration
### Caddy configuration over HTTP
This isn't reccommended if you're using a tilde as anyone can access it then.Set your .env to this:
```bash
CADDY_ADMIN_PATH="http://localhost:2019/load"
# Or whatever port you chose for Caddy admin
```
### Caddy configuration over Unix Socket
This is better as you can control access to the socket.```bash
# Leave CADDY_ADMIN_PATH alone.
CADDY_ADMIN_PATH="http://localhost/load"
CADDY_SOCKET_PATH="unix//run/caddy/caddy-admin.sock"
# Specify where you put your socket at.
```Please protect your socket by only allowing admins/root to access it.
## Setup
1. Clone yactm to a safe location only root/admins can access.
```bash
git clone https://github.com/aboutdavid/yactm.git
```
2. Modify your sudoers file to allow the execution of yactm as sudo.
```bash
ALL ALL=(ALL) NOPASSWD: /var/run/yatcm/index.js
```
3. Add a link to yactm in your `/usr/bin`.
```bash
#!/bin/bash
sudo bun /var/run/yatcm/index.js
```
4. (optional) If you provide your users any subdomains, create a file called `.whitelist` and put a newline seperated list of domains, such as:
```bash
*.freedomains.com
*.freedomains.org
```
Important: Put an astrisk where the subdomain goes!
5. Install the node modules.
```bash
bun install
```
6. Modify the schema.prisma and create the database structure.
```
npx prisma db push
```
7. You're done!## Commands
```
Usage: yatcm [options] [command]Yet another tilde caddy manager
Options:
-V, --version output the version number
-h, --help display help for commandCommands:
list lists all domains you have configured in caddy
add [options] adds a domain to caddy (Use --proxy to proxy to another socket or URL)
rm removes a domain from caddy
help [command] display help for command
```