├── .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 ├── LICENSE ├── README.md ├── assets └── ReloadExample.gif ├── dockerfile.amd64 ├── dockerfile.arm64 ├── download_obsdian.py └── 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@v2 25 | 26 | - name: Docker meta 27 | id: meta 28 | uses: docker/metadata-action@v3 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@v1 39 | 40 | - name: Login to GitHub Container Registry 41 | uses: docker/login-action@v1 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@v2 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@v3 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@v2 33 | 34 | - name: Log in to Docker Hub 35 | uses: docker/login-action@v2 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@v2 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@v4 50 | with: 51 | images: | 52 | ${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote 53 | 54 | - name: Build and push Docker images 55 | uses: docker/build-push-action@v3 56 | with: 57 | context: . 58 | file: dockerfile.amd64 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@v3 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-rdesktop-web:focal 2 | 3 | LABEL org.opencontainers.image.authors="braintobytes@braintobytes.com" 4 | LABEL org.opencontainers.image.source="https://github.com/BraintoByte/obsidian-remote" 5 | LABEL org.opencontainers.image.title="Container hosted Obsidian MD" 6 | LABEL org.opencontainers.image.description="Hosted Obsidian (latest version) instance allowing access via web browser" 7 | 8 | RUN \ 9 | echo "**** install packages ****" && \ 10 | # Update and install extra packages. 11 | apt-get update && \ 12 | apt-get install -y --no-install-recommends \ 13 | # Packages needed to download and extract obsidian. 14 | curl \ 15 | libnss3 \ 16 | wget \ 17 | # Install Chrome dependencies. 18 | dbus-x11 \ 19 | uuid-runtime && \ 20 | echo "**** cleanup ****" && \ 21 | apt-get autoclean && \ 22 | rm -rf \ 23 | /var/lib/apt/lists/* \ 24 | /var/tmp/* \ 25 | /tmp/* 26 | 27 | COPY download_obsdian.py . 28 | 29 | RUN python3 download_obsdian.py 30 | 31 | RUN \ 32 | echo "**** extract obsidian ****" && \ 33 | chmod +x /obsidian.AppImage && \ 34 | /obsidian.AppImage --appimage-extract 35 | 36 | ENV \ 37 | CUSTOM_PORT="8080" \ 38 | GUIAUTOSTART="true" \ 39 | HOME="/vaults" \ 40 | TITLE="Obsidian v$OBSIDIAN_VERSION" 41 | 42 | # add local files 43 | COPY root/ / 44 | 45 | EXPOSE 8080 46 | EXPOSE 27123 47 | EXPOSE 27124 48 | VOLUME ["/config","/vaults"] -------------------------------------------------------------------------------- /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 | 2 | ``` 3 | ██████╗ ██████╗ █████╗ ██╗███╗ ██╗ ████████╗ ██████╗ ██████╗ ██╗ ██╗████████╗███████╗███████╗ 4 | ██╔══██╗██╔══██╗██╔══██╗██║████╗ ██║ ╚══██╔══╝██╔═══██╗ ██╔══██╗╚██╗ ██╔╝╚══██╔══╝██╔════╝██╔════╝ 5 | ██████╔╝██████╔╝███████║██║██╔██╗ ██║ ██║ ██║ ██║ ██████╔╝ ╚████╔╝ ██║ █████╗ ███████╗ 6 | ██╔══██╗██╔══██╗██╔══██║██║██║╚██╗██║ ██║ ██║ ██║ ██╔══██╗ ╚██╔╝ ██║ ██╔══╝ ╚════██║ 7 | ██████╔╝██║ ██║██║ ██║██║██║ ╚████║ ██║ ╚██████╔╝ ██████╔╝ ██║ ██║ ███████╗███████║ 8 | ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝ 9 | ``` 10 | 11 | 12 | # obsidian-remote 13 | 14 | This docker image allows you to run **THE LATESTS VERSION OF OBSIDIAN** in docker as a container and access it via your web browser. 15 | 16 | The original project was from github@braintobytes.com and it seemed deprecated, lots of people asking for a docker container running the latest version of obsidian, so here it is. 17 | 18 | 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!! 19 | 20 | - [Roadmap for future features](#roadmap) 21 | - [Docker Hub](#docker-hub) 22 | - [Using the Container](#using-the-container) 23 | - [Ports](#ports) 24 | - [Mapped Volumes](#mapped-volumes) 25 | - [Environment Variables](#environment-variables) 26 | - [Using Docker Compose](#using-docker-compose) 27 | - [Enabling GIT for the obsidian-git plugin](#enabling-git-for-the-obsidian-git-plugin) 28 | - [Docker CLI example](#docker-cli-example) 29 | - [Reloading Obsidan in the Browser](#reloading-obsidan-in-the-browser) 30 | - [Setting PUID and PGID](#setting-puid-and-pgid) 31 | - [Adding missing fonts](#adding-missing-fonts) 32 | - [Map font file using Docker CLI](#map-font-file-using-docker-cli) 33 | - [Map font file using Docker Compose](#map-font-file-using-docker-compose) 34 | - [Hosting behind a reverse proxy](#hosting-behind-a-reverse-proxy) 35 | - [Example nginx configuration](#example-nginx-configuration) 36 | - [Hosting behind Nginx Proxy Manager (NPM)](#hosting-behind-nginx-proxy-manager-npm) 37 | - [Updating Obsidian](#updating-obsidian) 38 | - [Building locally](#building-locally) 39 | - [Copy/Paste From External Source](#copypaste-from-external-source) 40 | - [WARNING!! READ!!](#warnings-and-cautions) 41 | 42 | 43 | ## Docker Hub 44 | 45 | **[Docker Image Here](https://hub.docker.com/r/braintobytes/obsidian-remote)** 46 | 47 | ## Using the Container 48 | 49 | To run a interactive version to test it out. This is using windows based path, update for the OS you are running on. 50 | 51 | ```PowerShell 52 | docker run --rm -it ` 53 | -v D:/ob/vaults:/vaults ` 54 | -v D:/ob/config:/config ` 55 | -p 8080:8080 ` 56 | braintobytes/obsidian-remote:latest 57 | ``` 58 | 59 | To run it as a daemon in the background. 60 | 61 | ```PowerShell 62 | docker run -d ` 63 | -v D:/ob/vaults:/vaults ` 64 | -v D:/ob/config:/config ` 65 | -p 8080:8080 ` 66 | braintobytes/obsidian-remote:latest 67 | ``` 68 | 69 | 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. 70 | 71 | ```PowerShell 72 | docker run -d ` 73 | -v D:/ob/vaults:/vaults ` 74 | -v D:/ob/config:/config ` 75 | -p 8080:8080 ` 76 | braintobytes/obsidian-remote:latest 77 | ``` 78 | 79 | ### Ports 80 | 81 | | Port | Description | 82 | | ----- | --------------------------------------- | 83 | | 8080 | Obsidian Web Interface | 84 | | 27123 | Local REST API Plugin HTTP Server Port | 85 | | 27124 | Local REST API Plugin HTTPS Server Port | 86 | 87 | ### Mapped Volumes 88 | 89 | | Path | Description | 90 | | --------- | ------------------------------------------------------------------------- | 91 | | `/vaults` | The location on the host for your Obsidian Vaults | 92 | | `/config` | The location to store Obsidan configuration and ssh data for obsidian-git | 93 | 94 | ### Environment Variables 95 | 96 | | Environment Variable | Description | 97 | | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 98 | | PUID | Set the user ID for the container user. `911` by default. | 99 | | PGID | Set the group ID for the continer user. `911` by default. | 100 | | 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. | 101 | | 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. | 102 | | 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 | 103 | 104 | ## Using Docker Compose 105 | 106 | ```YAML 107 | version: '3.8' 108 | services: 109 | obsidian: 110 | image: 'braintobytes/obsidian-remote:latest' 111 | container_name: obsidian-remote 112 | restart: unless-stopped 113 | ports: 114 | - 8080:8080 115 | volumes: 116 | - /home/law/obsidian/vaults:/vaults 117 | - /home/law/obsidian/config:/config 118 | environment: 119 | - PUID=1000 120 | - PGID=1000 121 | - TZ=America/Chicago 122 | - DOCKER_MODS=linuxserver/mods:universal-git 123 | ``` 124 | 125 | ## Enabling GIT for the obsidian-git plugin 126 | 127 | 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`. 128 | 129 | ### Docker CLI example 130 | 131 | ```PowerShell 132 | docker run -d ` 133 | -v D:/ob/vaults:/vaults ` 134 | -v D:/ob/config:/config ` 135 | -p 8080:8080 ` 136 | -e DOCKER_MODS=linuxserver/mods:universal-git ` 137 | braintobytes/obsidian-remote:latest 138 | ``` 139 | 140 | ## Reloading Obsidan in the Browser 141 | 142 | 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. 143 | 144 | ![Reloading Obsidian in the Browser](./assets/ReloadExample.gif) 145 | 146 | ## Setting PUID and PGID 147 | 148 | To set PUID and PGID use the follow environment variables on the command line, by default the IDs are 911/911 149 | 150 | ```PowerShell 151 | docker run --rm -it ` 152 | -v D:/ob/vaults:/vaults ` 153 | -v D:/ob/config:/config ` 154 | -e PUID=1000 ` 155 | -e PGID=1000 ` 156 | -p 8080:8080 ` 157 | braintobytes/obsidian-remote:latest 158 | ``` 159 | 160 | Or, if you use docker-compose, add them to the environment: section: 161 | 162 | ```yaml 163 | environment: 164 | - PUID=1000 165 | - PGID=1000 166 | ``` 167 | 168 | 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. 169 | 170 | ```powershell 171 | id $user 172 | ``` 173 | 174 | ## Adding missing fonts 175 | 176 | Thanks to @aaron-jang for this example. 177 | 178 | Download the font of the language that you want to use in Obsidian and add it to the volume as shown below. 179 | 180 | ### Map font file using Docker CLI 181 | 182 | ```PowerShell 183 | -v {downloaded font directory}:/usr/share/fonts/truetype/{font name} 184 | ``` 185 | 186 | ### Map font file using Docker Compose 187 | 188 | ```PowerShell 189 | volumes: 190 | - {downloaded font directory}:/usr/share/fonts/truetype/{font name} 191 | ``` 192 | 193 | ## Hosting behind a reverse proxy 194 | 195 | 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. 196 | 197 | ### Example nginx configuration 198 | 199 | This is an example, I recommend a SSL based proxy and some sort of authentication. 200 | 201 | ``` 202 | server { 203 | set $forward_scheme http; 204 | set $server "10.10.10.10"; 205 | set $port 8080; 206 | 207 | listen 80; 208 | server_name ob.mycooldomain.com; 209 | proxy_set_header Upgrade $http_upgrade; 210 | proxy_set_header Connection $http_connection; 211 | proxy_http_version 1.1; 212 | access_log /data/logs/ob_access.log proxy; 213 | error_log /data/logs/ob_error.log warn; 214 | location / { 215 | proxy_set_header Upgrade $http_upgrade; 216 | proxy_set_header Connection $http_connection; 217 | proxy_http_version 1.1; 218 | # Proxy! 219 | add_header X-Served-By $host; 220 | proxy_set_header Host $host; 221 | proxy_set_header X-Forwarded-Scheme $scheme; 222 | proxy_set_header X-Forwarded-Proto $scheme; 223 | proxy_set_header X-Forwarded-For $remote_addr; 224 | proxy_set_header X-Real-IP $remote_addr; 225 | proxy_pass $forward_scheme://$server:$port$request_uri; 226 | } 227 | } 228 | ``` 229 | 230 | ## Hosting behind Nginx Proxy Manager (NPM) 231 | 232 | Thanks to @fahrenhe1t for this example. 233 | 234 | 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: 235 | 236 | ```yaml 237 | version: '3.8' 238 | services: 239 | obsidian: 240 | image: 'braintobytes/obsidian-remote:latest' 241 | container_name: obsidian-remote 242 | restart: unless-stopped 243 | ports: 244 | - 8080 #only exposes port internally to the container 245 | volumes: 246 | - /home/obsidian/vaults:/vaults 247 | - /home/obsidian/config:/config 248 | environment: 249 | - PUID=1000 250 | - PGID=1000 251 | - TZ=America/Los_Angeles 252 | - DOCKER_MODS=linuxserver/mods:universal-git 253 | networks: 254 | default: 255 | name: 256 | external: true 257 | ``` 258 | 259 | 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) 260 | 261 | ## Updating Obsidian 262 | 263 | 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. 264 | 265 | ## Building locally 266 | 267 | To build and use it locally run the following commands: 268 | 269 | ```PowerShell 270 | docker build --pull --rm ` 271 | -f "Dockerfile" ` 272 | -t obsidian-remote:latest ` 273 | "." 274 | ``` 275 | 276 | To run the localy build image: 277 | 278 | ```PowerShell 279 | docker run --rm -it ` 280 | -v D:/ob/vaults:/vaults ` 281 | -v D:/ob/config:/config ` 282 | -p 8080:8080 ` 283 | obsidian-remote:latest bash 284 | ``` 285 | 286 | 287 | ## Copy/Paste From External Source 288 | 289 | 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. 290 | 291 | ![image](https://user-images.githubusercontent.com/1399443/202805847-a87e2c7c-a5c6-4dea-bbae-4b25b4b5866a.png) 292 | 293 | ## Roadmap 294 | 295 | - Encrypt/Decrypt Obsidian Vaults and Configs 296 | - Log 297 | 298 | ## Warnings and Cautions 299 | 300 | **Security**: By no means this is secure for public exposure, it's full of security holes and RDP tricks that can be used against you, so if you do download it and run it, don't expose to the public interwebs! 301 | 302 | **Operating systems**: This does not work on windows, you can modify my python script (download_obsidian.py) to get the arm-64 version 303 | 304 | 305 |

306 | 307 | Enjoy Responsably! 308 | 309 |

310 | 311 |
312 |
313 |
314 |
315 |

316 | Check out our website, 317 | braintobytes.com 318 | for more! 319 |

-------------------------------------------------------------------------------- /assets/ReloadExample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BraintoByte/obsidian-remote/4f4425357cb7e9b8ef1006b2fa21f9736c0b1c90/assets/ReloadExample.gif -------------------------------------------------------------------------------- /dockerfile.amd64: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/linuxserver/baseimage-rdesktop-web:focal 2 | RUN \ 3 | echo "**** install packages ****" && \ 4 | # Update and install extra packages. 5 | apt-get update && \ 6 | apt-get install -y --no-install-recommends \ 7 | # Explicitly install git. Issue #36 8 | git \ 9 | # Packages needed to download and extract obsidian. 10 | curl \ 11 | libnss3 \ 12 | # Install Chrome dependencies. 13 | dbus-x11 \ 14 | uuid-runtime && \ 15 | echo "**** cleanup ****" && \ 16 | apt-get autoclean && \ 17 | rm -rf \ 18 | /var/lib/apt/lists/* \ 19 | /var/tmp/* \ 20 | /tmp/* 21 | 22 | # set version label 23 | ARG OBSIDIAN_VERSION=1.1.9 24 | 25 | RUN \ 26 | echo "**** download obsidian ****" && \ 27 | curl \ 28 | https://github.com/obsidianmd/obsidian-releases/releases/download/v$OBSIDIAN_VERSION/Obsidian-$OBSIDIAN_VERSION.AppImage \ 29 | -L \ 30 | -o obsidian.AppImage 31 | 32 | RUN \ 33 | echo "**** extract obsidian ****" && \ 34 | chmod +x /obsidian.AppImage && \ 35 | /obsidian.AppImage --appimage-extract 36 | 37 | ENV \ 38 | CUSTOM_PORT="8080" \ 39 | GUIAUTOSTART="true" \ 40 | HOME="/vaults" \ 41 | TITLE="Obsidian v$OBSIDIAN_VERSION" 42 | 43 | # add local files 44 | COPY root/ / 45 | 46 | EXPOSE 8080 47 | EXPOSE 27123 48 | EXPOSE 27124 49 | VOLUME ["/config","/vaults"] 50 | 51 | 52 | -------------------------------------------------------------------------------- /dockerfile.arm64: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/linuxserver/baseimage-rdesktop-web:focal 2 | RUN \ 3 | echo "**** install packages ****" && \ 4 | # Update and install extra packages. 5 | apt-get update && \ 6 | apt-get install -y --no-install-recommends \ 7 | # Explicitly install git. Issue #36 8 | git \ 9 | # Packages needed to download and extract obsidian. 10 | curl \ 11 | libnss3 \ 12 | zlib1g-dev \ 13 | # Install Chrome dependencies. 14 | dbus-x11 \ 15 | uuid-runtime && \ 16 | echo "**** cleanup ****" && \ 17 | apt-get autoclean && \ 18 | rm -rf \ 19 | /var/lib/apt/lists/* \ 20 | /var/tmp/* \ 21 | /tmp/* 22 | 23 | # set version label 24 | ARG OBSIDIAN_VERSION=1.1.9 25 | ARG ARCH=arm64 26 | 27 | RUN \ 28 | echo "**** download obsidian ****" && \ 29 | curl \ 30 | https://github.com/obsidianmd/obsidian-releases/releases/download/v$OBSIDIAN_VERSION/Obsidian-1.1.9-arm64.AppImage -o obsidian.AppImage 31 | 32 | RUN \ 33 | echo "**** extract obsidian ****" && \ 34 | chmod +x /obsidian.AppImage && \ 35 | /obsidian.AppImage --appimage-extract 36 | 37 | ENV \ 38 | CUSTOM_PORT="8080" \ 39 | GUIAUTOSTART="true" \ 40 | HOME="/vaults" \ 41 | TITLE="Obsidian v$OBSIDIAN_VERSION" 42 | 43 | # add local files 44 | COPY root/ / 45 | 46 | EXPOSE 8080 47 | EXPOSE 27123 48 | EXPOSE 27124 49 | VOLUME ["/config","/vaults"] 50 | 51 | 52 | -------------------------------------------------------------------------------- /download_obsdian.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | urls = os.popen('curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest | grep \"browser_download_url.*AppImage\" | cut -d \'\"\' -f 4').read().split('\n') 4 | download_url = '' 5 | 6 | for url in urls: 7 | if 'arm64' not in url: 8 | download_url += url 9 | 10 | os.system('curl ' + download_url + '' + ' -L -o obsidian.AppImage') -------------------------------------------------------------------------------- /root/defaults/autostart: -------------------------------------------------------------------------------- 1 | /squashfs-root/obsidian --no-sandbox --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer 2 | -------------------------------------------------------------------------------- /root/defaults/menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | /squashfs-root/obsidian --no-sandbox --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer 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 | /squashfs-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 | --------------------------------------------------------------------------------