Obsidian 동기화 중
Syncing your Obsidian
Obsidian을 동기화하는 방법에는 여러 가지가 있지만 나중에 세부 사항을 잊지 않고 자신만의 동기화 솔루션을 찾는 다른 사람들을 돕기 위해 선택한 방법을 문서화하기로 결정했습니다.
핵심 요약
자동 요약- 1Obsidian을 동기화하는 방법에는 여러 가지가 있지만 나중에 세부 사항을 잊지 않고 자신만의 동기화 솔루션을 찾는 다른 사람들을 돕기 위해 선택한 방법을 문서…
- 2이 프로젝트에서는 Obsidian LiveSync 플러그인을 사용하겠습니다: vrtmrz/obsidian-livesync 서버의 경우 MagaluCloud에 VP…
- 3전체 프로세스는 콘솔을 통해 수동으로 수행할 예정이지만 mgc(MagaluCloud cli)를 사용하여 모든 작업을 수행하는 것도 가능합니다.
원문 본문
출처 · dev.toThere are several ways to sync Obsidian, but I decided to document the method I chose, both so I don't forget the details in the future and to help anyone else looking for their own sync solution.
For this project, we'll use the Obsidian LiveSync plugin:
Creating a VPS on MagaluCloud
For the server, I'll create a VPS on MagaluCloud. I'll do the whole process manually, through the console, but it's possible to do everything using the mgc (MagaluCloud cli).
- Open the console. To create a new virtual machine, click on Virtual Machines:
- On the Virtual Machines page, click Create Instance:
- Select the desired Availability Zone (in this example, I chose br-se1-a) and also the Operating System. Here I'll go with Debian 13 LTS:
For the server, we can go with the cheapest option! I chose the instance with 1 vCPU and 1 GB of RAM (BV1-1-20). The only detail is storage; for safety, I chose a 20 GB local disk.
Don't forget to leave the option checked to assign a public IPv4 address to the instance. To access the machine, select an existing SSH key (if you already have one). Otherwise, add a new public key. If you don't have one yet, the documentation can help. Keep the generated keys safe, because losing them will prevent access to the machine! Finally, give the instance a descriptive name and click Create instance.
Configuring the server
Access the newly created server with ssh:
ssh debian@your-ip-here.com For this project, we'll need Docker installed. The installation steps were taken from the project's documentation. Run each command below individually to add Docker's repository to your server:
# Add Docker's official GPG key: sudo apt update sudo apt install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Add the repository to Apt sources: sudo tee /etc/apt/sources.list.d/docker.sources <<EOF Types: deb URIs: https://download.docker.com/linux/debian Suites: $(. /etc/os-release && echo "$VERSION_CODENAME") Components: stable Signed-By: /etc/apt/keyrings/docker.asc EOF sudo apt update After adding Docker's official repository with the commands above, install the necessary tools:
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin With Docker installed, create a directory to separate your data and configuration:
mkdir -p ~/obsidian-livesync/{couchdb-data,config} cd ~/obsidian-livesync Create the file ~/obsidian-livesync/config/local.ini and add the following configuration:
[couchdb] single_node=true max_document_size = 50000000 ; 50MB (Adjust based on your note size needs) [chttpd] require_valid_user = true max_http_request_size = 4294967296 ; 4GB (Necessary for large sync batches) enable_cors = true [chttpd_auth] require_valid_user = true authentication_redirect = /_utils/session.html [httpd] WWW-Authenticate = Basic realm="administrator" enable_cors = true [cors] origins = app://obsidian.md,capacitor://localhost,http://localhost credentials = true headers = accept, authorization, content-type, origin, referer methods = GET, PUT, POST, HEAD, DELETE max_age = 3600 To install CouchDB, we'll use a docker compose:
version: '3.8' services: couchdb: image: couchdb:latest container_name: livesync-couchdb restart: always environment: - COUCHDB_USER=admin - COUCHDB_PASSWORD=YOUR_STRONG_PASSWORD_HERE volumes: - ./couchdb-data:/opt/couchdb/data - ./config/local.ini:/opt/couchdb/etc/local.d/local.ini ports: - "127.0.0.1:5984:5984" # Expose only to localhost, Caddy handles external traffic caddy: image: caddy:latest container_name: livesync-caddy restart: always ports: - "80:80" - "443:443" volumes: - ./Caddyfile:/etc/caddy/Caddyfile - caddy_data:/data - caddy_config:/config depends_on: - couchdb volumes: caddy_data: caddy_config: Don't forget to change your database password in the file above. Choose a strong password!
To handle the reverse proxy and digital certificate, we'll use Caddy. Create the file ~/obsidian-livesync/Caddyfile and add the following configuration, adjusting the domain:
obsidian.yourdomain.com { reverse_proxy couchdb:5984 } Bring the stack up with:
docker compose up -d Now let's create a database called obsidian. You're free to use any name here:
curl -X PUT -u admin http://127.0.0.1:5984/obsidian Enter the username and password defined in the file ~/obsidian-livesync/config/local.ini.
Configuring the client
Install the Self-hosted LiveSync Plugin after enabling Community Plugins.
Setup Wizard:
- Open the Plugin Settings
- Select Remote Database Configuration
- Configure the following fields:
- URI: https://obsidian.yourdomain.com
- Username: admin
- Password: YOUR_STRONG_PASSWORD_HERE
- Database Name: obsidian
- End-to-End Encryption: Enabled (Recommended! A new password will be used for encryption!)
- Test: Click "Test Connection". If successful, apply the settings.
For further actions, you may consider blocking this person and/or reporting abuse
이 글은 dev.to 의 원문을 정제해 보여드립니다. 저작권은 원저작자에게 있습니다.
전체 내용이 궁금하다면
dev.to 원문에서 이어 읽기







