Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Cheong authored Aug 30, 2023
1 parent 2159aff commit e26f6af
Showing 1 changed file with 18 additions and 64 deletions.
82 changes: 18 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Reverse engineered obsidian sync server (NOT OFFICIAL)

These features are not in the latest release but in the main branch. They might not be fully tested and are probably unstable.

- Obsidian publish
- N/A

## To do

Expand All @@ -42,72 +42,26 @@ These features are not in the latest release but in the main branch. They might
- `git clone https://github.com/acheong08/obsidian-sync`
- `cd obsidian-sync`
- `go run cmd/obsidian-sync/main.go`
Optional:
- Configure [nginx](https://github.com/acheong08/rev-obsidian-sync/wiki/Nginx-Configuration)
- HTTPS is recommended.

HTTPS is not required.

When you're done, configure the [plugin](#sync-override-plugin)

<details>
<summary>

### Nginx configuration
</summary>

```nginx
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:3000/;
}
server_name <your domain name>; # e.g. api.obsidian.md
}
# This is for obsidian publish (Optional)
server {
listen 80;
listen [::]:80;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:3000/published/;
}
server_name <another domain name>; # e.g. publish.obsidian.md
}
```

You can use `certbot` or cloudflare to handle HTTPS although it is not mandatory.

</details>
When you're done, install and configure the [plugin](https://github.com/acheong08/rev-obsidian-sync-plugin)

## Adding a new user

`go run cmd/signup/main.go`

## Sync override plugin

Tested on

- IOS
- Linux (Flatpak)

### Usage

> While we have no qualms with reverse engineering as a playground for experimentation, Obsidian Sync is a service we intend to keep first-party only for the foreseeable future. - https://github.com/obsidianmd/obsidian-releases/pull/2353
This plugin will not be part of the official community plugins list.

- Install https://github.com/acheong08/rev-obsidian-sync-plugin
- Go to settings
- Set API endpoint
- e.g. `https://obsidian.yourdomain.com`
- For development: `http://127.0.0.1:3000`
Alternatively:
```bash
curl --request POST \
--url https://yourdomain.com/user/signup \
--header 'Content-Type: application/json' \
--data '{
"email": "example@example.com",
"password": "example_password",
"name": "Example User",
"signup_key": "<SIGNUP_KEY>"
}'
```
You can set the signup key via the `SIGNUP_KEY` environment variable. If it has not been set, you can exclude it from the request.

0 comments on commit e26f6af

Please sign in to comment.