Update Apps
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
# obsidian-remote
|
||||
|
||||
This docker image allows you to run [obsidian](https://obsidian.md/) in docker as a container and access it via your web browser.
|
||||
这个 Docker 镜像允许你在 Docker 中以容器形式运行 [obsidian](https://obsidian.md/),并通过你的 web 浏览器访问它。
|
||||
|
||||
Use `http://localhost:8080/` to access it locally, do not expose this to the web unless you secure it and know what you are doing!!
|
||||
请使用 `http://localhost:8080/` 在本地访问它,除非你已对其进行安全设置并清楚自己在做什么,否则不要将其暴露在网络上!
|
||||
|
||||
- [Using the Container](#using-the-container)
|
||||
- [Ports](#ports)
|
||||
- [Mapped Volumes](#mapped-volumes)
|
||||
- [Environment Variables](#environment-variables)
|
||||
- [Using Docker Compose](#using-docker-compose)
|
||||
- [Enabling GIT for the obsidian-git plugin](#enabling-git-for-the-obsidian-git-plugin)
|
||||
- [Docker CLI example](#docker-cli-example)
|
||||
- [Reloading Obsidan in the Browser](#reloading-obsidan-in-the-browser)
|
||||
- [Setting PUID and PGID](#setting-puid-and-pgid)
|
||||
- [Adding missing fonts](#adding-missing-fonts)
|
||||
- [Map font file using Docker CLI](#map-font-file-using-docker-cli)
|
||||
- [Map font file using Docker Compose](#map-font-file-using-docker-compose)
|
||||
- [Hosting behind a reverse proxy](#hosting-behind-a-reverse-proxy)
|
||||
- [Example nginx configuration](#example-nginx-configuration)
|
||||
- [Hosting behind Nginx Proxy Manager (NPM)](#hosting-behind-nginx-proxy-manager-npm)
|
||||
- [Updating Obsidian](#updating-obsidian)
|
||||
- [Building locally](#building-locally)
|
||||
- [Copy/Paste From External Source](#copypaste-from-external-source)
|
||||
* [使用容器](#using-the-container)
|
||||
* [端口](#ports)
|
||||
* [映射卷](#mapped-volumes)
|
||||
* [环境变量](#environment-variables)
|
||||
* [使用 Docker Compose](#using-docker-compose)
|
||||
* [启用 obsidian-git 插件的 GIT](#enabling-git-for-the-obsidian-git-plugin)
|
||||
* [Docker CLI 示例](#docker-cli-example)
|
||||
* [在浏览器中重新加载 Obsidan](#reloading-obsidan-in-the-browser)
|
||||
* [设置 PUID 和 PGID](#setting-puid-and-pgid)
|
||||
* [添加缺失的字体](#adding-missing-fonts)
|
||||
* [使用 Docker CLI 映射字体文件](#map-font-file-using-docker-cli)
|
||||
* [使用 Docker Compose 映射字体文件](#map-font-file-using-docker-compose)
|
||||
* [通过反向代理托管](#hosting-behind-a-reverse-proxy)
|
||||
* [Nginx 配置示例](#example-nginx-configuration)
|
||||
* [通过 Nginx Proxy Manager (NPM) 托管](#hosting-behind-nginx-proxy-manager-npm)
|
||||
* [更新 Obsidian](#updating-obsidian)
|
||||
* [本地构建](#building-locally)
|
||||
* [从外部源复制/粘贴](#copypaste-from-external-source)
|
||||
|
||||
## Using the Container
|
||||
## 使用容器
|
||||
|
||||
To run a interactive version to test it out. This is using windows based path, update for the OS you are running on.
|
||||
运行一个交互版本来测试它。这里使用的是基于 Windows 的路径,请根据您运行的操作系统进行更新。
|
||||
|
||||
```PowerShell
|
||||
docker run --rm -it `
|
||||
@@ -35,7 +35,7 @@ docker run --rm -it `
|
||||
ghcr.io/sytone/obsidian-remote:latest
|
||||
```
|
||||
|
||||
To run it as a daemon in the background.
|
||||
在后台以守护进程方式运行它。
|
||||
|
||||
```PowerShell
|
||||
docker run -d `
|
||||
@@ -45,7 +45,7 @@ docker run -d `
|
||||
ghcr.io/sytone/obsidian-remote:latest
|
||||
```
|
||||
|
||||
The ARM container is now avaliable, will look to make this simpler in the future. The ARM imange is on the docker hub and not the github container registry.
|
||||
ARM 容器现在可用,未来会使其更简单。ARM 镜像在 Docker Hub 而不在 GitHub 容器注册表中。
|
||||
|
||||
```PowerShell
|
||||
docker run -d `
|
||||
@@ -55,38 +55,38 @@ docker run -d `
|
||||
sytone/obsidian-remote:latest
|
||||
```
|
||||
|
||||
### Ports
|
||||
### 端口
|
||||
|
||||
| Port | Description |
|
||||
| ----- | --------------------------------------- |
|
||||
| 8080 | HTTP Obsidian Web Interface |
|
||||
| 8443 | HTTPS Obsidian Web Interface |
|
||||
| 端口 | 描述 |
|
||||
| --- | --- |
|
||||
| 8080 | HTTP Obsidian Web 界面 |
|
||||
| 8443 | HTTPS Obsidian Web 界面 |
|
||||
|
||||
### Mapped Volumes
|
||||
### 映射的卷
|
||||
|
||||
| Path | Description |
|
||||
| --------- | ------------------------------------------------------------------------- |
|
||||
| `/vaults` | The location on the host for your Obsidian Vaults |
|
||||
| `/config` | The location to store Obsidan configuration and ssh data for obsidian-git |
|
||||
| 路径 | 描述 |
|
||||
| --- | --- |
|
||||
| /vaults | 主机上 Obsidian 钥匙库的位置 |
|
||||
| /config | 用于存储 Obsidian 配置和 ssh 数据的位置(obsidian-git) |
|
||||
|
||||
### Environment Variables
|
||||
### 环境变量
|
||||
|
||||
| Environment Variable | Description |
|
||||
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| PUID | Set the user ID for the container user. `911` by default. |
|
||||
| PGID | Set the group ID for the continer user. `911` by default. |
|
||||
| TZ | Set the Time Zone for the container, should match your TZ. `Etc/UTC` by default. See [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for valid options. |
|
||||
| DOCKER_MODS | Use to add mods to the container like git. E.g. `DOCKER_MODS=linuxserver/mods:universal-git` See [Docker Mods](https://github.com/linuxserver/docker-mods) for details. |
|
||||
| KEYBOARD | Used to se the keyboard being used for input. E.g. `KEYBOARD=en-us-qwerty` or `KEYBOARD=de-de-qwertz` a list of other possible values (not tested) can be found at <https://github.com/linuxserver/docker-digikam#keyboard-layouts> |
|
||||
| CUSTOM_PORT | Internal port the container listens on for http if it needs to be swapped from the default 3000. |
|
||||
| CUSTOM_HTTPS_PORT | Internal port the container listens on for https if it needs to be swapped from the default 3001. |
|
||||
| CUSTOM_USER | HTTP Basic auth username, abc is default. |
|
||||
| PASSWORD | HTTP Basic auth password, abc is default. If unset there will be no auth |
|
||||
| SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` |
|
||||
| TITLE | The page title displayed on the web browser, default "KasmVNC Client". |
|
||||
| FM_HOME | This is the home directory (landing) for the file manager, default "/config". |
|
||||
| 环境变量 | 描述 |
|
||||
| --- | --- |
|
||||
| PUID | 为容器用户设置用户 ID。默认值:911。 |
|
||||
| PGID | 为容器用户设置组 ID。默认值:911。 |
|
||||
| TZ | 为容器设置时区,应与您的时区匹配。默认值:Etc/UTC。请参阅 tz 数据库时区列表以获取有效选项。 |
|
||||
| DOCKER\_MODS | 用于向容器添加类似 git 的模组。例如: DOCKER\_MODS=linuxserver/mods:universal-git 。请参阅 Docker Mods 以获取详细信息。 |
|
||||
| KEYBOARD | 用于设置用于输入的键盘。例如:KEYBOARD=en-us-qwerty 或 KEYBOARD=de-de-qwertz,其他可能的值(未测试)可以在 https://github.com/linuxserver/docker-digikam#keyboard-layouts 找到。 |
|
||||
| CUSTOM\_PORT | 容器监听的内部端口,用于 http,如果需要从默认的 3000 端口更改。 |
|
||||
| CUSTOM\_HTTPS\_PORT | 容器监听的内部端口,用于 https,如果需要从默认的 3001 端口更改。 |
|
||||
| CUSTOM\_USER | HTTP 基本认证用户名,默认为 abc。 |
|
||||
| PASSWORD | HTTP 基本认证密码,默认为 abc。如果未设置,则无需认证。 |
|
||||
| SUBFOLDER | 如果运行子文件夹反向代理,则需要在应用中创建一个子文件夹,例如 \`/subfolder/\`。 |
|
||||
| TITLE | 网页浏览器中显示的页面标题,默认为“KasmVNC 客户端”。 |
|
||||
| FM\_HOME | 这是文件管理器的主目录(起始目录),默认为 \`/config\`。 |
|
||||
|
||||
## Using Docker Compose
|
||||
## 使用 Docker Compose
|
||||
|
||||
```YAML
|
||||
services:
|
||||
@@ -112,11 +112,11 @@ services:
|
||||
- SUBFOLDER=""
|
||||
```
|
||||
|
||||
## Enabling GIT for the obsidian-git plugin
|
||||
## 为 obsidian-git 插件启用 GIT
|
||||
|
||||
This container uses the base images from linuxserver.io. This means you can the linuxserver.io mods. To add support for git add the `DOCKER_MODS` environment variable like so `DOCKER_MODS=linuxserver/mods:universal-git`.
|
||||
此容器使用来自 linuxserver.io 的基础镜像。这意味着您可以使用 linuxserver.io 的修改。要添加对 git 的支持,请像这样添加 `DOCKER_MODS` 环境变量: `DOCKER_MODS=linuxserver/mods:universal-git` 。
|
||||
|
||||
### Docker CLI example
|
||||
### Docker CLI 示例
|
||||
|
||||
```PowerShell
|
||||
docker run -d `
|
||||
@@ -127,15 +127,15 @@ docker run -d `
|
||||
ghcr.io/sytone/obsidian-remote:latest
|
||||
```
|
||||
|
||||
## Reloading Obsidan in the Browser
|
||||
## 在浏览器中重新加载 Obsidan
|
||||
|
||||
If you make changes to plugins or do updates that need to have obsidian restarted, instead of having to stop and start the docker container you can just close the Obsidian UI and right click to show the menus and reopen it. Here is a short clip showing how to do it.
|
||||
如果您对插件进行了更改或需要重新启动 Obsidan,则无需停止并重新启动 Docker 容器,只需关闭 Obsidan UI,右键点击以显示菜单并重新打开即可。这里有一个简短的视频演示了如何操作。
|
||||
|
||||

|
||||
|
||||
## Setting PUID and PGID
|
||||
## 设置 PUID 和 PGID
|
||||
|
||||
To set PUID and PGID use the follow environment variables on the command line, by default the IDs are 911/911
|
||||
要设置 PUID 和 PGID,请在命令行中使用以下环境变量,默认值为 911/911
|
||||
|
||||
```PowerShell
|
||||
docker run --rm -it `
|
||||
@@ -147,7 +147,7 @@ docker run --rm -it `
|
||||
ghcr.io/sytone/obsidian-remote:latest
|
||||
```
|
||||
|
||||
Or, if you use docker-compose, add them to the environment: section:
|
||||
或者,如果你使用 docker-compose,请将它们添加到 environment 部分中:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
@@ -155,38 +155,38 @@ environment:
|
||||
- PGID=1000
|
||||
```
|
||||
|
||||
It is most likely that you will use the id of yourself, which can be obtained by running the command below. The two values you will be interested in are the uid and gid.
|
||||
你最有可能使用自己的用户 ID,可以通过运行以下命令获取。你需要关注的两个值是 uid 和 gid。
|
||||
|
||||
```powershell
|
||||
id $user
|
||||
```
|
||||
|
||||
## Adding missing fonts
|
||||
## 添加缺失的字体
|
||||
|
||||
Thanks to @aaron-jang for this example.
|
||||
感谢 @aaron-jang 提供了这个示例。
|
||||
|
||||
Download the font of the language that you want to use in Obsidian and add it to the volume as shown below.
|
||||
在 Obsidian 中使用所需语言的字体,请下载该字体并按如下方式添加到磁盘:
|
||||
|
||||
### Map font file using Docker CLI
|
||||
### 使用 Docker CLI 映射字体文件
|
||||
|
||||
```PowerShell
|
||||
-v {downloaded font directory}:/usr/share/fonts/truetype/{font name}
|
||||
```
|
||||
|
||||
### Map font file using Docker Compose
|
||||
### 使用 Docker Compose 映射字体文件
|
||||
|
||||
```PowerShell
|
||||
volumes:
|
||||
- {downloaded font directory}:/usr/share/fonts/truetype/{font name}
|
||||
```
|
||||
|
||||
## Hosting behind a reverse proxy
|
||||
## 通过反向代理托管
|
||||
|
||||
If you wish to do that **please make sure you are securing it in some way!**. You also need to ensure **websocket** support is enabled.
|
||||
如果您要这样做,请确保以某种方式对其进行保护!您还需要确保启用了 websocket 支持。
|
||||
|
||||
### Example nginx configuration
|
||||
### Nginx 配置示例
|
||||
|
||||
This is an example, I recommend a SSL based proxy and some sort of authentication.
|
||||
这是一个示例,我建议使用基于 SSL 的代理和某种形式的身份验证。
|
||||
|
||||
```
|
||||
server {
|
||||
@@ -217,11 +217,11 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
## Hosting behind Nginx Proxy Manager (NPM)
|
||||
## 通过 Nginx Proxy Manager (NPM) 托管
|
||||
|
||||
Thanks to @fahrenhe1t for this example.
|
||||
感谢 @fahrenhe1t 提供这个示例。
|
||||
|
||||
If you install obsidian-remote in Docker, you can proxy it through [Nginx Proxy Manager](https://nginxproxymanager.com/) (NPM - running on the same Docker instance), and use an access list to provide user authentication. The obsidian-remote container would have to be on the same network as Nginx Proxy Manager. If you don't expose the IP external to the container, authentication would be forced through NPM:
|
||||
如果你在 Docker 中安装 obsidian-remote,可以通过 [Nginx Proxy Manager](https://nginxproxymanager.com/)(NPM - 运行在同一 Docker 实例上)代理它,并使用访问列表提供用户身份验证。obsidian-remote 容器必须与 Nginx Proxy Manager 在同一网络中。如果你不将 IP 地址暴露给容器外部,身份验证将通过 NPM 进行:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
@@ -245,15 +245,15 @@ networks:
|
||||
external: true
|
||||
```
|
||||
|
||||
Create a proxy host in NPM pointing to the "obsidian-remote:8080" container, choose your domain name, use a LetsEncrypt SSL certificate, enable WebSockets. This video talks about it: [Nginx Proxy Manager - ACCESS LIST protection for internal services](https://www.youtube.com/watch?v=G9voYZejH48)
|
||||
在 NPM 中创建一个代理主机,指向 "obsidian-remote:8080" 容器,选择你的域名,使用 Let's Encrypt SSL 证书,启用 WebSocket。这个视频对此进行了说明:[Nginx Proxy Manager - ACCESS LIST 保护内部服务](https://www.youtube.com/watch?v=G9voYZejH48)
|
||||
|
||||
## Updating Obsidian
|
||||
## 更新 Obsidian
|
||||
|
||||
By default obsidian will update itself in the container. If you recreate the container you will have to do the update again. This repo will be updated periodically to keep up with the latest version of Obsidian.
|
||||
obsidian 默认会在容器内更新自身。如果你重新创建容器,就需要再次进行更新。该仓库会定期更新,以保持与最新版本的 obsidian 同步。
|
||||
|
||||
## Building locally
|
||||
## 本地构建
|
||||
|
||||
To build and use it locally run the following commands:
|
||||
要本地构建和使用它,请运行以下命令:
|
||||
|
||||
```PowerShell
|
||||
docker build --pull --rm `
|
||||
@@ -262,7 +262,7 @@ docker build --pull --rm `
|
||||
"."
|
||||
```
|
||||
|
||||
To run the localy build image:
|
||||
要运行本地构建的镜像,请运行以下命令:
|
||||
|
||||
```PowerShell
|
||||
docker run --rm -it `
|
||||
@@ -272,12 +272,8 @@ docker run --rm -it `
|
||||
obsidian-remote:latest bash
|
||||
```
|
||||
|
||||
## 从外部源复制/粘贴
|
||||
|
||||
## Copy/Paste From External Source
|
||||
|
||||
Click on the circle to the left side of your browser window. In there you will find a textbox for updating the remote clipboard or copying from it.
|
||||
|
||||

|
||||
|
||||
|
||||
点击浏览器窗口左侧的圆圈。在那里,您可以找到用于更新远程剪贴板或从中复制的内容的文本框。
|
||||
|
||||

|
||||
283
apps/obsidian/README_en.md
Normal file
283
apps/obsidian/README_en.md
Normal file
@@ -0,0 +1,283 @@
|
||||
# obsidian-remote
|
||||
|
||||
This docker image allows you to run [obsidian](https://obsidian.md/) in docker as a container and access it via your web browser.
|
||||
|
||||
Use `http://localhost:8080/` to access it locally, do not expose this to the web unless you secure it and know what you are doing!!
|
||||
|
||||
- [Using the Container](#using-the-container)
|
||||
- [Ports](#ports)
|
||||
- [Mapped Volumes](#mapped-volumes)
|
||||
- [Environment Variables](#environment-variables)
|
||||
- [Using Docker Compose](#using-docker-compose)
|
||||
- [Enabling GIT for the obsidian-git plugin](#enabling-git-for-the-obsidian-git-plugin)
|
||||
- [Docker CLI example](#docker-cli-example)
|
||||
- [Reloading Obsidan in the Browser](#reloading-obsidan-in-the-browser)
|
||||
- [Setting PUID and PGID](#setting-puid-and-pgid)
|
||||
- [Adding missing fonts](#adding-missing-fonts)
|
||||
- [Map font file using Docker CLI](#map-font-file-using-docker-cli)
|
||||
- [Map font file using Docker Compose](#map-font-file-using-docker-compose)
|
||||
- [Hosting behind a reverse proxy](#hosting-behind-a-reverse-proxy)
|
||||
- [Example nginx configuration](#example-nginx-configuration)
|
||||
- [Hosting behind Nginx Proxy Manager (NPM)](#hosting-behind-nginx-proxy-manager-npm)
|
||||
- [Updating Obsidian](#updating-obsidian)
|
||||
- [Building locally](#building-locally)
|
||||
- [Copy/Paste From External Source](#copypaste-from-external-source)
|
||||
|
||||
## Using the Container
|
||||
|
||||
To run a interactive version to test it out. This is using windows based path, update for the OS you are running on.
|
||||
|
||||
```PowerShell
|
||||
docker run --rm -it `
|
||||
-v D:/ob/vaults:/vaults `
|
||||
-v D:/ob/config:/config `
|
||||
-p 8080:8080 `
|
||||
ghcr.io/sytone/obsidian-remote:latest
|
||||
```
|
||||
|
||||
To run it as a daemon in the background.
|
||||
|
||||
```PowerShell
|
||||
docker run -d `
|
||||
-v D:/ob/vaults:/vaults `
|
||||
-v D:/ob/config:/config `
|
||||
-p 8080:8080 `
|
||||
ghcr.io/sytone/obsidian-remote:latest
|
||||
```
|
||||
|
||||
The ARM container is now avaliable, will look to make this simpler in the future. The ARM imange is on the docker hub and not the github container registry.
|
||||
|
||||
```PowerShell
|
||||
docker run -d `
|
||||
-v D:/ob/vaults:/vaults `
|
||||
-v D:/ob/config:/config `
|
||||
-p 8080:8080 `
|
||||
sytone/obsidian-remote:latest
|
||||
```
|
||||
|
||||
### Ports
|
||||
|
||||
| Port | Description |
|
||||
| ----- | --------------------------------------- |
|
||||
| 8080 | HTTP Obsidian Web Interface |
|
||||
| 8443 | HTTPS Obsidian Web Interface |
|
||||
|
||||
### Mapped Volumes
|
||||
|
||||
| Path | Description |
|
||||
| --------- | ------------------------------------------------------------------------- |
|
||||
| `/vaults` | The location on the host for your Obsidian Vaults |
|
||||
| `/config` | The location to store Obsidan configuration and ssh data for obsidian-git |
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Environment Variable | Description |
|
||||
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| PUID | Set the user ID for the container user. `911` by default. |
|
||||
| PGID | Set the group ID for the continer user. `911` by default. |
|
||||
| TZ | Set the Time Zone for the container, should match your TZ. `Etc/UTC` by default. See [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for valid options. |
|
||||
| DOCKER_MODS | Use to add mods to the container like git. E.g. `DOCKER_MODS=linuxserver/mods:universal-git` See [Docker Mods](https://github.com/linuxserver/docker-mods) for details. |
|
||||
| KEYBOARD | Used to se the keyboard being used for input. E.g. `KEYBOARD=en-us-qwerty` or `KEYBOARD=de-de-qwertz` a list of other possible values (not tested) can be found at <https://github.com/linuxserver/docker-digikam#keyboard-layouts> |
|
||||
| CUSTOM_PORT | Internal port the container listens on for http if it needs to be swapped from the default 3000. |
|
||||
| CUSTOM_HTTPS_PORT | Internal port the container listens on for https if it needs to be swapped from the default 3001. |
|
||||
| CUSTOM_USER | HTTP Basic auth username, abc is default. |
|
||||
| PASSWORD | HTTP Basic auth password, abc is default. If unset there will be no auth |
|
||||
| SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` |
|
||||
| TITLE | The page title displayed on the web browser, default "KasmVNC Client". |
|
||||
| FM_HOME | This is the home directory (landing) for the file manager, default "/config". |
|
||||
|
||||
## Using Docker Compose
|
||||
|
||||
```YAML
|
||||
services:
|
||||
obsidian:
|
||||
image: 'ghcr.io/sytone/obsidian-remote:latest'
|
||||
container_name: obsidian-remote
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 8443:8443
|
||||
volumes:
|
||||
- /home/obsidian/vaults:/vaults
|
||||
- /home/obsidian/config:/config
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/Los_Angeles
|
||||
- DOCKER_MODS=linuxserver/mods:universal-git
|
||||
- CUSTOM_PORT="8080"
|
||||
- CUSTOM_HTTPS_PORT="8443"
|
||||
- CUSTOM_USER=""
|
||||
- PASSWORD=""
|
||||
- SUBFOLDER=""
|
||||
```
|
||||
|
||||
## Enabling GIT for the obsidian-git plugin
|
||||
|
||||
This container uses the base images from linuxserver.io. This means you can the linuxserver.io mods. To add support for git add the `DOCKER_MODS` environment variable like so `DOCKER_MODS=linuxserver/mods:universal-git`.
|
||||
|
||||
### Docker CLI example
|
||||
|
||||
```PowerShell
|
||||
docker run -d `
|
||||
-v D:/ob/vaults:/vaults `
|
||||
-v D:/ob/config:/config `
|
||||
-p 8080:8080 `
|
||||
-e DOCKER_MODS=linuxserver/mods:universal-git `
|
||||
ghcr.io/sytone/obsidian-remote:latest
|
||||
```
|
||||
|
||||
## Reloading Obsidan in the Browser
|
||||
|
||||
If you make changes to plugins or do updates that need to have obsidian restarted, instead of having to stop and start the docker container you can just close the Obsidian UI and right click to show the menus and reopen it. Here is a short clip showing how to do it.
|
||||
|
||||

|
||||
|
||||
## Setting PUID and PGID
|
||||
|
||||
To set PUID and PGID use the follow environment variables on the command line, by default the IDs are 911/911
|
||||
|
||||
```PowerShell
|
||||
docker run --rm -it `
|
||||
-v D:/ob/vaults:/vaults `
|
||||
-v D:/ob/config:/config `
|
||||
-e PUID=1000 `
|
||||
-e PGID=1000 `
|
||||
-p 8080:8080 `
|
||||
ghcr.io/sytone/obsidian-remote:latest
|
||||
```
|
||||
|
||||
Or, if you use docker-compose, add them to the environment: section:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
```
|
||||
|
||||
It is most likely that you will use the id of yourself, which can be obtained by running the command below. The two values you will be interested in are the uid and gid.
|
||||
|
||||
```powershell
|
||||
id $user
|
||||
```
|
||||
|
||||
## Adding missing fonts
|
||||
|
||||
Thanks to @aaron-jang for this example.
|
||||
|
||||
Download the font of the language that you want to use in Obsidian and add it to the volume as shown below.
|
||||
|
||||
### Map font file using Docker CLI
|
||||
|
||||
```PowerShell
|
||||
-v {downloaded font directory}:/usr/share/fonts/truetype/{font name}
|
||||
```
|
||||
|
||||
### Map font file using Docker Compose
|
||||
|
||||
```PowerShell
|
||||
volumes:
|
||||
- {downloaded font directory}:/usr/share/fonts/truetype/{font name}
|
||||
```
|
||||
|
||||
## Hosting behind a reverse proxy
|
||||
|
||||
If you wish to do that **please make sure you are securing it in some way!**. You also need to ensure **websocket** support is enabled.
|
||||
|
||||
### Example nginx configuration
|
||||
|
||||
This is an example, I recommend a SSL based proxy and some sort of authentication.
|
||||
|
||||
```
|
||||
server {
|
||||
set $forward_scheme http;
|
||||
set $server "10.10.10.10";
|
||||
set $port 8080;
|
||||
|
||||
listen 80;
|
||||
server_name ob.mycooldomain.com;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_http_version 1.1;
|
||||
access_log /data/logs/ob_access.log proxy;
|
||||
error_log /data/logs/ob_error.log warn;
|
||||
location / {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_http_version 1.1;
|
||||
# Proxy!
|
||||
add_header X-Served-By $host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Scheme $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_pass $forward_scheme://$server:$port$request_uri;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Hosting behind Nginx Proxy Manager (NPM)
|
||||
|
||||
Thanks to @fahrenhe1t for this example.
|
||||
|
||||
If you install obsidian-remote in Docker, you can proxy it through [Nginx Proxy Manager](https://nginxproxymanager.com/) (NPM - running on the same Docker instance), and use an access list to provide user authentication. The obsidian-remote container would have to be on the same network as Nginx Proxy Manager. If you don't expose the IP external to the container, authentication would be forced through NPM:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
obsidian:
|
||||
image: 'ghcr.io/sytone/obsidian-remote:latest'
|
||||
container_name: obsidian-remote
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 8080 #only exposes port internally to the container
|
||||
volumes:
|
||||
- /home/obsidian/vaults:/vaults
|
||||
- /home/obsidian/config:/config
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/Los_Angeles
|
||||
- DOCKER_MODS=linuxserver/mods:universal-git
|
||||
networks:
|
||||
default:
|
||||
name: <your nginx proxy manager network>
|
||||
external: true
|
||||
```
|
||||
|
||||
Create a proxy host in NPM pointing to the "obsidian-remote:8080" container, choose your domain name, use a LetsEncrypt SSL certificate, enable WebSockets. This video talks about it: [Nginx Proxy Manager - ACCESS LIST protection for internal services](https://www.youtube.com/watch?v=G9voYZejH48)
|
||||
|
||||
## Updating Obsidian
|
||||
|
||||
By default obsidian will update itself in the container. If you recreate the container you will have to do the update again. This repo will be updated periodically to keep up with the latest version of Obsidian.
|
||||
|
||||
## Building locally
|
||||
|
||||
To build and use it locally run the following commands:
|
||||
|
||||
```PowerShell
|
||||
docker build --pull --rm `
|
||||
-f "Dockerfile" `
|
||||
-t obsidian-remote:latest `
|
||||
"."
|
||||
```
|
||||
|
||||
To run the localy build image:
|
||||
|
||||
```PowerShell
|
||||
docker run --rm -it `
|
||||
-v D:/ob/vaults:/vaults `
|
||||
-v D:/ob/config:/config `
|
||||
-p 8080:8080 `
|
||||
obsidian-remote:latest bash
|
||||
```
|
||||
|
||||
|
||||
## Copy/Paste From External Source
|
||||
|
||||
Click on the circle to the left side of your browser window. In there you will find a textbox for updating the remote clipboard or copying from it.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user