├── .dockerignore ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml └── workflows │ ├── docker-publish.yml │ └── docker.yml ├── .vscode └── settings.json ├── CODE_OF_CONDUCT.md ├── Dockerfile ├── Dockerfile.arm64 ├── LICENSE ├── README.md ├── assets ├── IMEInputMode.png └── ReloadExample.gif └── root ├── defaults ├── autostart ├── menu.xml └── startwm.sh └── etc └── cont-init.d ├── 50-config └── 56-openboxcopy /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .gitignore 3 | .github 4 | .gitattributes 5 | .vscode 6 | READMETEMPLATE.md 7 | README.md 8 | LICENSE 9 | .editorconfig 10 | assets 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | # trim_trailing_whitespace may cause unintended issues and should not be globally set true 11 | trim_trailing_whitespace = false 12 | 13 | [{Dockerfile*,**.yml}] 14 | indent_style = space 15 | indent_size = 2 16 | 17 | [{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}] 18 | indent_style = space 19 | indent_size = 4 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | **Expected behavior** 22 | A clear and concise description of what you expected to happen. 23 | 24 | **Screenshots** 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Desktop (please complete the following information):** 28 | 29 | - OS: [e.g. iOS] 30 | - Browser [e.g. chrome, safari] 31 | - Version [e.g. 22] 32 | 33 | **Smartphone (please complete the following information):** 34 | 35 | - Device: [e.g. iPhone6] 36 | - OS: [e.g. iOS8.1] 37 | - Browser [e.g. stock browser, safari] 38 | - Version [e.g. 22] 39 | 40 | **Additional context** 41 | Add any other context about the problem here. 42 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: 'docker' # See documentation for possible values 9 | directory: '/' # Location of package manifests 10 | schedule: 11 | interval: 'daily' 12 | 13 | - package-ecosystem: "github-actions" 14 | directory: "/" 15 | schedule: 16 | interval: "daily" -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Docker 2 | 3 | # This workflow uses actions that are not certified by GitHub. 4 | # They are provided by a third-party and are governed by 5 | # separate terms of service, privacy policy, and support 6 | # documentation. 7 | 8 | on: 9 | push: 10 | # branches: [main] 11 | # Publish semver tags as releases. 12 | tags: ['v*.*.*'] 13 | 14 | jobs: 15 | build: 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - name: Get current date 20 | id: date 21 | run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%S')" 22 | 23 | - name: Checkout repository 24 | uses: actions/checkout@v4 25 | 26 | - name: Docker meta 27 | id: meta 28 | uses: docker/metadata-action@v5 29 | with: 30 | images: ghcr.io/${{ github.repository_owner }}/obsidian-remote 31 | tags: | 32 | type=ref,event=branch 33 | type=ref,event=pr 34 | type=semver,pattern={{version}} 35 | type=semver,pattern={{major}}.{{minor}} 36 | 37 | - name: Set up Docker Buildx 38 | uses: docker/setup-buildx-action@v3 39 | 40 | - name: Login to GitHub Container Registry 41 | uses: docker/login-action@v3 42 | with: 43 | registry: ghcr.io 44 | username: ${{ github.repository_owner }} 45 | password: ${{ secrets.GITHUB_TOKEN }} 46 | 47 | - name: Build and Push Docker Image 48 | uses: docker/build-push-action@v5 49 | with: 50 | context: . 51 | #file: ./Dockerfile 52 | push: true # Will only build if this is not here 53 | #tags: ghcr.io/${{ github.repository_owner }}/obsidian-remote:latest 54 | # build-args: | 55 | # "BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}" 56 | # "IMAGE_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}" 57 | tags: ${{ steps.meta.outputs.tags }} 58 | labels: ${{ steps.meta.outputs.labels }} 59 | -------------------------------------------------------------------------------- /.github/workflows/docker.yml: -------------------------------------------------------------------------------- 1 | name: Docker 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 0 * * 1" 7 | push: 8 | branches: 9 | - latest 10 | - main 11 | paths-ignore: 12 | - 'README.MD' 13 | - '.github' 14 | 15 | jobs: 16 | build: 17 | name: build 18 | runs-on: ubuntu-latest 19 | 20 | permissions: 21 | packages: write 22 | contents: read 23 | 24 | steps: 25 | - name: Check out the repo 26 | uses: actions/checkout@v4 27 | 28 | - name: Set up QEMU 29 | uses: docker/setup-qemu-action@v2 30 | 31 | - name: Setup Docker buildx 32 | uses: docker/setup-buildx-action@v3 33 | 34 | - name: Log in to Docker Hub 35 | uses: docker/login-action@v3 36 | with: 37 | username: ${{ secrets.DOCKERHUB_USERNAME }} 38 | password: ${{ secrets.DOCKERHUB_TOKEN }} 39 | 40 | # - name: Log in to the Container registry 41 | # uses: docker/login-action@v3 42 | # with: 43 | # registry: ghcr.io 44 | # username: ${{ github.actor }} 45 | # password: ${{ secrets.GIT_TOKEN }} 46 | 47 | - name: Extract metadata (tags, labels) for Docker 48 | id: meta 49 | uses: docker/metadata-action@v5 50 | with: 51 | images: | 52 | ${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote 53 | 54 | - name: Build and push Docker images 55 | uses: docker/build-push-action@v5 56 | with: 57 | context: . 58 | file: Dockerfile 59 | platforms: linux/amd64 60 | push: true 61 | tags: ${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:latest 62 | labels: ${{ steps.meta.outputs.labels }} 63 | cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_amd64 64 | cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_amd64,mode=max 65 | 66 | # - name: Build and push Docker images 67 | # uses: docker/build-push-action@v5 68 | # with: 69 | # context: . 70 | # file: Dockerfile.arm64 71 | # platforms: linux/arm64 72 | # push: true 73 | # tags: ${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:arm64 74 | # labels: ${{ steps.meta.outputs.labels }} 75 | # cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_arm64 76 | # cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_arm64,mode=max 77 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "docker.languageserver.formatter.ignoreMultilineInstructions": true 3 | } -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | github@sytone.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | . 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | . Translations are available at 128 | . 129 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm 2 | 3 | LABEL maintainer="github@sytone.com" \ 4 | org.opencontainers.image.authors="github@sytone.com" \ 5 | org.opencontainers.image.source="https://github.com/sytone/obsidian-remote" \ 6 | org.opencontainers.image.title="Container hosted Obsidian MD" \ 7 | org.opencontainers.image.description="Hosted Obsidian instance allowing access via web browser" 8 | 9 | # Set version label 10 | ARG OBSIDIAN_VERSION=1.7.7 11 | 12 | # Update and install extra packages 13 | RUN echo "**** install packages ****" && \ 14 | apt-get update && \ 15 | apt-get install -y --no-install-recommends curl libgtk-3-0 libnotify4 libatspi2.0-0 libsecret-1-0 libnss3 desktop-file-utils fonts-noto-color-emoji git ssh-askpass && \ 16 | apt-get autoclean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/* 17 | 18 | # Download and install Obsidian 19 | RUN echo "**** download obsidian ****" && \ 20 | curl --location --output obsidian.deb "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/obsidian_${OBSIDIAN_VERSION}_amd64.deb" && \ 21 | dpkg -i obsidian.deb && \ 22 | rm obsidian.deb 23 | 24 | # Environment variables 25 | ENV CUSTOM_PORT="8080" \ 26 | CUSTOM_HTTPS_PORT="8443" \ 27 | CUSTOM_USER="" \ 28 | PASSWORD="" \ 29 | SUBFOLDER="" \ 30 | TITLE="Obsidian v${OBSIDIAN_VERSION}" \ 31 | FM_HOME="/vaults" 32 | 33 | # Add local files 34 | COPY root/ / 35 | 36 | # Expose ports and volumes 37 | EXPOSE 8080 8443 38 | VOLUME ["/config","/vaults"] 39 | 40 | # Define a healthcheck 41 | HEALTHCHECK CMD /bin/sh -c 'if [ -z "$CUSTOM_USER" ] || [ -z "$PASSWORD" ]; then curl --fail http://localhost:"$CUSTOM_PORT"/ || exit 1; else curl --fail --user "$CUSTOM_USER:$PASSWORD" http://localhost:"$CUSTOM_PORT"/ || exit 1; fi' 42 | -------------------------------------------------------------------------------- /Dockerfile.arm64: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-debianbookworm 2 | 3 | LABEL maintainer="github@sytone.com" \ 4 | org.opencontainers.image.authors="github@sytone.com" \ 5 | org.opencontainers.image.source="https://github.com/sytone/obsidian-remote" \ 6 | org.opencontainers.image.title="Container hosted Obsidian MD" \ 7 | org.opencontainers.image.description="Hosted Obsidian instance allowing access via web browser" 8 | 9 | # Set version label 10 | ARG OBSIDIAN_VERSION=1.7.7 11 | ARG ARCH=arm64 12 | 13 | # Update and install extra packages 14 | RUN echo "**** install packages ****" && \ 15 | apt-get update && \ 16 | apt-get install -y --no-install-recommends curl libnss3 zlib1g-dev dbus-x11 uuid-runtime && \ 17 | apt-get clean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/* 18 | 19 | # Download and install Obsidian 20 | RUN echo "**** download obsidian ****" && \ 21 | curl -L -o ./obsidian.AppImage \ 22 | "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/Obsidian-${OBSIDIAN_VERSION}-${ARCH}.AppImage" && \ 23 | chmod +x ./obsidian.AppImage && \ 24 | ./obsidian.AppImage --appimage-extract && \ 25 | rm ./obsidian.AppImage 26 | 27 | # Environment variables 28 | ENV CUSTOM_PORT="8080" \ 29 | CUSTOM_HTTPS_PORT="8443" \ 30 | CUSTOM_USER="" \ 31 | PASSWORD="" \ 32 | SUBFOLDER="" \ 33 | TITLE="Obsidian v$OBSIDIAN_VERSION" \ 34 | FM_HOME="/vaults" 35 | 36 | # Add local files 37 | COPY root/ / 38 | 39 | # Expose ports and volumes 40 | EXPOSE 8080 8443 41 | VOLUME ["/config","/vaults"] 42 | 43 | # Define a healthcheck 44 | HEALTHCHECK CMD /bin/sh -c 'if [ -z "$CUSTOM_USER" ] || [ -z "$PASSWORD" ]; then curl --fail http://localhost:"$CUSTOM_PORT"/ || exit 1; else curl --fail --user "$CUSTOM_USER:$PASSWORD" http://localhost:"$CUSTOM_PORT"/ || exit 1; fi' 45 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Jon Bullen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # obsidian-remote 2 | 3 | This docker image allows you to run [obsidian](https://obsidian.md/) in docker as a container and access it via your web browser. 4 | 5 | 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!! 6 | 7 | - [Using the Container](#using-the-container) 8 | - [Ports](#ports) 9 | - [Mapped Volumes](#mapped-volumes) 10 | - [Environment Variables](#environment-variables) 11 | - [Language Support](#language-support) 12 | - [Using Docker Compose](#using-docker-compose) 13 | - [Enabling GIT for the obsidian-git plugin](#enabling-git-for-the-obsidian-git-plugin) 14 | - [Docker CLI example](#docker-cli-example) 15 | - [Reloading Obsidan in the Browser](#reloading-obsidan-in-the-browser) 16 | - [Setting PUID and PGID](#setting-puid-and-pgid) 17 | - [Adding missing fonts](#adding-missing-fonts) 18 | - [Map font file using Docker CLI](#map-font-file-using-docker-cli) 19 | - [Map font file using Docker Compose](#map-font-file-using-docker-compose) 20 | - [Hosting behind a reverse proxy](#hosting-behind-a-reverse-proxy) 21 | - [Example nginx configuration](#example-nginx-configuration) 22 | - [Hosting behind Nginx Proxy Manager (NPM)](#hosting-behind-nginx-proxy-manager-npm) 23 | - [Updating Obsidian](#updating-obsidian) 24 | - [Building locally](#building-locally) 25 | - [Copy/Paste From External Source](#copypaste-from-external-source) 26 | 27 | ## Using the Container 28 | 29 | ### Windows based path 30 | To run a interactive version to test it out: 31 | 32 | ```PowerShell 33 | docker run --rm -it ` 34 | -v D:/ob/vaults:/vaults ` 35 | -v D:/ob/config:/config ` 36 | -p 8080:8080 ` 37 | ghcr.io/sytone/obsidian-remote:latest 38 | ``` 39 | 40 | To run it as a daemon in the background: 41 | 42 | ```PowerShell 43 | docker run -d ` 44 | -v D:/ob/vaults:/vaults ` 45 | -v D:/ob/config:/config ` 46 | -p 8080:8080 ` 47 | ghcr.io/sytone/obsidian-remote:latest 48 | ``` 49 | 50 | 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. 51 | 52 | ```PowerShell 53 | docker run -d ` 54 | -v D:/ob/vaults:/vaults ` 55 | -v D:/ob/config:/config ` 56 | -p 8080:8080 ` 57 | sytone/obsidian-remote:latest 58 | ``` 59 | 60 | ### Linux bash paths 61 | To run a interactive version to test it out: 62 | 63 | ```bash 64 | mkdir -p ob/{vaults,config} 65 | docker run --rm -it \ 66 | -v ./ob/vaults:/vaults \ 67 | -v ./ob/config:/config \ 68 | -p 8080:8080 \ 69 | ghcr.io/sytone/obsidian-remote:latest 70 | ``` 71 | 72 | To run it as a daemon in the background: 73 | 74 | ```bash 75 | mkdir -p ob/{vaults,config} 76 | docker run -d \ 77 | -v ./ob/vaults:/vaults \ 78 | -v ./ob/config:/config \ 79 | -p 8080:8080 \ 80 | ghcr.io/sytone/obsidian-remote:latest 81 | ``` 82 | 83 | 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. 84 | 85 | ```bash 86 | mkdir -p ob/{vaults,config} 87 | docker run -d \ 88 | -v ./ob/vaults:/vaults \ 89 | -v ./ob/config:/config \ 90 | -p 8080:8080 \ 91 | sytone/obsidian-remote:latest 92 | ``` 93 | 94 | ### Ports 95 | 96 | | Port | Description | 97 | | ----- | --------------------------------------- | 98 | | 8080 | HTTP Obsidian Web Interface | 99 | | 8443 | HTTPS Obsidian Web Interface | 100 | 101 | ### Mapped Volumes 102 | 103 | | Path | Description | 104 | | --------- | ------------------------------------------------------------------------- | 105 | | `/vaults` | The location on the host for your Obsidian Vaults | 106 | | `/config` | The location to store Obsidan configuration and ssh data for obsidian-git | 107 | 108 | ### Environment Variables 109 | 110 | | Environment Variable | Description | 111 | | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 112 | | PUID | Set the user ID for the container user. `911` by default. | 113 | | PGID | Set the group ID for the continer user. `911` by default. | 114 | | 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. | 115 | | 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. | 116 | | INSTALL_PACKAGES | Use to add package for the container like language pack. E.g. `INSTALL_PACKAGES=fonts-noto-cjk fonts-noto-extra` And the docker mod `linuxserver/mods:universal-package-install` is required. | 117 | | 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 | 118 | | CUSTOM_PORT | Internal port the container listens on for http if it needs to be swapped from the default 3000. | 119 | | CUSTOM_HTTPS_PORT | Internal port the container listens on for https if it needs to be swapped from the default 3001. | 120 | | CUSTOM_USER | HTTP Basic auth username, abc is default. | 121 | | PASSWORD | HTTP Basic auth password, abc is default. If unset there will be no auth | 122 | | SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` | 123 | | TITLE | The page title displayed on the web browser, default "KasmVNC Client". | 124 | | FM_HOME | This is the home directory (landing) for the file manager, default "/config". | 125 | 126 | ### Language Support 127 | 128 | To show the other languages, add the mod `linuxserver/mods:universal-package-install` and add the language pack. E.g. `INSTALL_PACKAGES=fonts-noto-cjk fonts-noto-extra` to support CJK (Chinese Japanese Korean). 129 | 130 | To type other language in the browser you should enable the **IME Input Mode** in the side panel. 131 | 132 | ![Settings IME Input Mode](./assets/IMEInputMode.png) 133 | 134 | ## Using Docker Compose 135 | 136 | ```YAML 137 | services: 138 | obsidian: 139 | image: 'ghcr.io/sytone/obsidian-remote:latest' 140 | container_name: obsidian-remote 141 | restart: unless-stopped 142 | ports: 143 | - 8080:8080 144 | - 8443:8443 145 | volumes: 146 | - /home/obsidian/vaults:/vaults 147 | - /home/obsidian/config:/config 148 | environment: 149 | - PUID=1000 150 | - PGID=1000 151 | - TZ=America/Los_Angeles 152 | - DOCKER_MODS=linuxserver/mods:universal-git 153 | - CUSTOM_PORT="8080" 154 | - CUSTOM_HTTPS_PORT="8443" 155 | - CUSTOM_USER="" 156 | - PASSWORD="" 157 | - SUBFOLDER="" 158 | ``` 159 | 160 | ## Enabling GIT for the obsidian-git plugin 161 | 162 | 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`. 163 | 164 | ### Docker CLI example 165 | 166 | ```PowerShell 167 | docker run -d ` 168 | -v D:/ob/vaults:/vaults ` 169 | -v D:/ob/config:/config ` 170 | -p 8080:8080 ` 171 | -e DOCKER_MODS=linuxserver/mods:universal-git ` 172 | ghcr.io/sytone/obsidian-remote:latest 173 | ``` 174 | 175 | ## Reloading Obsidan in the Browser 176 | 177 | 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. 178 | 179 | ![Reloading Obsidian in the Browser](./assets/ReloadExample.gif) 180 | 181 | ## Setting PUID and PGID 182 | 183 | To set PUID and PGID use the follow environment variables on the command line, by default the IDs are 911/911 184 | 185 | ```PowerShell 186 | docker run --rm -it ` 187 | -v D:/ob/vaults:/vaults ` 188 | -v D:/ob/config:/config ` 189 | -e PUID=1000 ` 190 | -e PGID=1000 ` 191 | -p 8080:8080 ` 192 | ghcr.io/sytone/obsidian-remote:latest 193 | ``` 194 | 195 | Or, if you use docker-compose, add them to the environment: section: 196 | 197 | ```yaml 198 | environment: 199 | - PUID=1000 200 | - PGID=1000 201 | ``` 202 | 203 | 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. 204 | 205 | ```powershell 206 | id $user 207 | ``` 208 | 209 | ## Adding missing fonts 210 | 211 | Thanks to @aaron-jang for this example. 212 | 213 | Download the font of the language that you want to use in Obsidian and add it to the volume as shown below. 214 | 215 | ### Map font file using Docker CLI 216 | 217 | ```PowerShell 218 | -v {downloaded font directory}:/usr/share/fonts/truetype/{font name} 219 | ``` 220 | 221 | ### Map font file using Docker Compose 222 | 223 | ```PowerShell 224 | volumes: 225 | - {downloaded font directory}:/usr/share/fonts/truetype/{font name} 226 | ``` 227 | 228 | ## Hosting behind a reverse proxy 229 | 230 | 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. 231 | 232 | ### Example nginx configuration 233 | 234 | This is an example, I recommend a SSL based proxy and some sort of authentication. 235 | 236 | ``` 237 | server { 238 | set $forward_scheme http; 239 | set $server "10.10.10.10"; 240 | set $port 8080; 241 | 242 | listen 80; 243 | server_name ob.mycooldomain.com; 244 | proxy_set_header Upgrade $http_upgrade; 245 | proxy_set_header Connection $http_connection; 246 | proxy_http_version 1.1; 247 | access_log /data/logs/ob_access.log proxy; 248 | error_log /data/logs/ob_error.log warn; 249 | location / { 250 | proxy_set_header Upgrade $http_upgrade; 251 | proxy_set_header Connection $http_connection; 252 | proxy_http_version 1.1; 253 | # Proxy! 254 | add_header X-Served-By $host; 255 | proxy_set_header Host $host; 256 | proxy_set_header X-Forwarded-Scheme $scheme; 257 | proxy_set_header X-Forwarded-Proto $scheme; 258 | proxy_set_header X-Forwarded-For $remote_addr; 259 | proxy_set_header X-Real-IP $remote_addr; 260 | proxy_pass $forward_scheme://$server:$port$request_uri; 261 | } 262 | } 263 | ``` 264 | 265 | ## Hosting behind Nginx Proxy Manager (NPM) 266 | 267 | Thanks to @fahrenhe1t for this example. 268 | 269 | 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: 270 | 271 | ```yaml 272 | services: 273 | obsidian: 274 | image: 'ghcr.io/sytone/obsidian-remote:latest' 275 | container_name: obsidian-remote 276 | restart: unless-stopped 277 | ports: 278 | - 8080 #only exposes port internally to the container 279 | volumes: 280 | - /home/obsidian/vaults:/vaults 281 | - /home/obsidian/config:/config 282 | environment: 283 | - PUID=1000 284 | - PGID=1000 285 | - TZ=America/Los_Angeles 286 | - DOCKER_MODS=linuxserver/mods:universal-git 287 | networks: 288 | default: 289 | name: 290 | external: true 291 | ``` 292 | 293 | 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) 294 | 295 | ## Updating Obsidian 296 | 297 | 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. 298 | 299 | ## Building locally 300 | 301 | To build and use it locally run the following commands: 302 | 303 | ```PowerShell 304 | docker build --pull --rm ` 305 | -f "Dockerfile" ` 306 | -t obsidian-remote:latest ` 307 | "." 308 | ``` 309 | 310 | To run the localy build image: 311 | 312 | ```PowerShell 313 | docker run --rm -it ` 314 | -v D:/ob/vaults:/vaults ` 315 | -v D:/ob/config:/config ` 316 | -p 8080:8080 ` 317 | obsidian-remote:latest bash 318 | ``` 319 | 320 | 321 | ## Copy/Paste From External Source 322 | 323 | 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. 324 | 325 | ![image](https://user-images.githubusercontent.com/1399443/202805847-a87e2c7c-a5c6-4dea-bbae-4b25b4b5866a.png) 326 | 327 | 328 | 329 | -------------------------------------------------------------------------------- /assets/IMEInputMode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sytone/obsidian-remote/0b8857fdf6be9ca9bb45732eab6710109785b575/assets/IMEInputMode.png -------------------------------------------------------------------------------- /assets/ReloadExample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sytone/obsidian-remote/0b8857fdf6be9ca9bb45732eab6710109785b575/assets/ReloadExample.gif -------------------------------------------------------------------------------- /root/defaults/autostart: -------------------------------------------------------------------------------- 1 | sudo /usr/bin/obsidian --no-sandbox --no-xshm --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer 2 | -------------------------------------------------------------------------------- /root/defaults/menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | sudo /usr/bin/obsidian --no-sandbox 7 | 8 | 9 | 10 | 11 | /usr/bin/xterm 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /root/defaults/startwm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | /startpulse.sh & 3 | /usr/bin/openbox-session > /dev/null 2>&1 4 | -------------------------------------------------------------------------------- /root/etc/cont-init.d/50-config: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | if [ -n "$PASSWORD" ]; then 4 | echo "abc:${PASSWORD}" | chpasswd 5 | echo "**** Setting password from environment variable. ****" 6 | else 7 | echo "**** No auth enabled. To enable auth, you can set the PASSWORD var in docker arguments. ****" 8 | fi 9 | 10 | 11 | if [ ! -d /vaults ]; then 12 | echo "**** Creating vaults folder. ****" 13 | mkdir -p /vaults; 14 | fi 15 | 16 | echo "********************************" 17 | echo "**** Debug Information ****" 18 | echo "********************************" 19 | echo "" 20 | echo "********************************" 21 | echo "**** Start Date Information ****" 22 | echo "********************************" 23 | echo "TZ: ${TZ}" 24 | echo "Running dpkg-reconfigure -f noninteractive tzdata" 25 | echo "${TZ}" >/etc/timezone 26 | dpkg-reconfigure -f noninteractive tzdata 27 | echo "Date UTC" 28 | date --utc 29 | echo "Date Local" 30 | date 31 | echo "Zone Info" 32 | zdump /usr/share/zoneinfo/${TZ} 33 | echo "Time Zone Offsets" 34 | zdump -v /etc/localtime 35 | echo "********************************" 36 | echo "**** End Date Information ****" 37 | echo "********************************" 38 | 39 | # permissions 40 | chown -R abc:abc \ 41 | /config \ 42 | /vaults \ 43 | /root 44 | -------------------------------------------------------------------------------- /root/etc/cont-init.d/56-openboxcopy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | # default file copies first run 4 | [[ ! -f /config/.config/openbox/menu.xml ]] && \ 5 | mkdir -p /config/.config/openbox && \ 6 | cp /defaults/menu.xml /config/.config/openbox/menu.xml && \ 7 | chown -R abc:abc /config/.config 8 | --------------------------------------------------------------------------------