feat: readme
This commit is contained in:
parent
7270ecf6ba
commit
8641eeeca8
12
Cargo.lock
generated
12
Cargo.lock
generated
@ -27,17 +27,6 @@ dependencies = [
|
|||||||
"generic-array",
|
"generic-array",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "aes"
|
|
||||||
version = "0.8.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if",
|
|
||||||
"cipher",
|
|
||||||
"cpufeatures",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ahash"
|
name = "ahash"
|
||||||
version = "0.8.11"
|
version = "0.8.11"
|
||||||
@ -2261,7 +2250,6 @@ version = "0.37.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8aad4b767bbed24ac5eb4465bfb83bc1210522eb99d67cf4e547ec2ec7e47786"
|
checksum = "8aad4b767bbed24ac5eb4465bfb83bc1210522eb99d67cf4e547ec2ec7e47786"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes",
|
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"bech32",
|
"bech32",
|
||||||
|
@ -9,7 +9,7 @@ name = "api"
|
|||||||
[features]
|
[features]
|
||||||
default = ["mikrotik", "nostr-dm"]
|
default = ["mikrotik", "nostr-dm"]
|
||||||
mikrotik = []
|
mikrotik = []
|
||||||
nostr-dm = ["dep:nostr-sdk", "nostr-sdk/nip04", "nostr-sdk/nip44", "nostr-sdk/nip59"]
|
nostr-dm = ["dep:nostr-sdk"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
lnvps_db = { path = "lnvps_db" }
|
lnvps_db = { path = "lnvps_db" }
|
||||||
@ -34,4 +34,5 @@ ssh2 = "0.9.4"
|
|||||||
ssh-key = "0.6.7"
|
ssh-key = "0.6.7"
|
||||||
lettre = { version = "0.11.10", features = ["tokio1-native-tls"] }
|
lettre = { version = "0.11.10", features = ["tokio1-native-tls"] }
|
||||||
|
|
||||||
nostr-sdk = { version = "0.37.0", optional = true, default-features = false }
|
#nostr-dm
|
||||||
|
nostr-sdk = { version = "0.37.0", optional = true, default-features = false, features = ["nip44", "nip59"] }
|
94
README.md
Normal file
94
README.md
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
## LNVPS
|
||||||
|
|
||||||
|
A bitcoin powered VPS system.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- MySql database
|
||||||
|
- LND node
|
||||||
|
- Proxmox server
|
||||||
|
|
||||||
|
## Required Config
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# MySql database connection string
|
||||||
|
db: "mysql://root:root@localhost:3376/lnvps"
|
||||||
|
|
||||||
|
# LND node connection details
|
||||||
|
lnd:
|
||||||
|
url: "https://127.0.0.1:10003"
|
||||||
|
cert: "$HOME/.lnd/tls.cert"
|
||||||
|
macaroon: "$HOME/.lnd/data/chain/bitcoin/mainnet/admin.macaroon"
|
||||||
|
|
||||||
|
# Number of days after a VM expires to delete
|
||||||
|
delete_after: 3
|
||||||
|
|
||||||
|
# Provisioner is the main process which handles creating/deleting VM's
|
||||||
|
# Currently supports: Proxmox
|
||||||
|
provisioner:
|
||||||
|
proxmox:
|
||||||
|
# Read-only mode prevents spawning VM's
|
||||||
|
read_only: false
|
||||||
|
# Proxmox (QEMU) settings used for spawning VM's
|
||||||
|
qemu:
|
||||||
|
bios: "ovmf"
|
||||||
|
machine: "q35"
|
||||||
|
os_type: "l26"
|
||||||
|
bridge: "vmbr0"
|
||||||
|
cpu: "kvm64"
|
||||||
|
vlan: 100
|
||||||
|
kvm: false
|
||||||
|
```
|
||||||
|
|
||||||
|
### Email notifications
|
||||||
|
Email notifications can be enabled, this is primarily intended for admin notifications.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# (Optional)
|
||||||
|
# Email notifications settings
|
||||||
|
smtp:
|
||||||
|
# Admin user id, used to send notifications of failed jobs etc. (optional)
|
||||||
|
admin: 1
|
||||||
|
# SMTP server url
|
||||||
|
server: "smtp.gmail.com"
|
||||||
|
# From header used in the email (optional)
|
||||||
|
from: "LNVPS <no-reply@example.com>"
|
||||||
|
username: "no-reply@example.com"
|
||||||
|
password: "mypassword123"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Nostr notifications (NIP-17)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# (Optional)
|
||||||
|
# Nostr connection settings for notifications
|
||||||
|
nostr:
|
||||||
|
# Nostr relays to publish notifications to
|
||||||
|
relays:
|
||||||
|
- "wss://relay.snort.social"
|
||||||
|
- "wss://relay.damus.io"
|
||||||
|
- "wss://nos.lol"
|
||||||
|
# Private key used to sign notifications
|
||||||
|
nsec: "nsec1234xxx"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Network Setup (Advanced)
|
||||||
|
|
||||||
|
When ARP is disabled (reply-only) on your router you may need to create static ARP entries when allocating
|
||||||
|
IPs, we support managing ARP entries on routers directly as part of the provisioning process.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# (Optional)
|
||||||
|
# When allocating IPs for VM's it may be necessary to create static ARP entries on
|
||||||
|
# your router, at least one router can be configured
|
||||||
|
#
|
||||||
|
# Currently supports: Mikrotik
|
||||||
|
router:
|
||||||
|
mikrotik:
|
||||||
|
# !! MAKE SURE TO USE HTTPS !!
|
||||||
|
url: "https://my-router.net"
|
||||||
|
username: "admin"
|
||||||
|
password: "admin"
|
||||||
|
# Interface where the static ARP entry is added
|
||||||
|
arp_interface: "bridge1"
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user