Files
noteserver/README.md
2025-08-14 20:26:16 -07:00

34 lines
1.3 KiB
Markdown

# noteserver
Server for Notes
## Usage
This program is intended for and tested on Linux, but may work on other systems. The server, being a simple binary, can be deployed easily in several ways. The recommended method is using Docker. Simply run ``docker-deploy.sh``. This will build the docker image and run the server on port 3002.
```sh
git clone ssh://git@git.miningtcup.me:222/MiningTcup/noteserver.git
cd noteserver
sh reload.sh
sh docker-deploy.sh
```
After starting the docker instance and checking that it's up, you should use [nginx](https://nginx.org/) or another reverse proxy.
```nginx
server
{
location / {
proxy_pass http://127.0.0.1:3002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
server_name notes.miningtcup.me; # managed by Certbot
listen 443 ssl; # managed by Certbot
listen [::]:443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/miningtcup.me/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/miningtcup.me/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
```