Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker image references & repository links #100

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Wiki/anonymized-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ In certain scenarios, understanding the structure of a database is crucial for t

This feature creates a copy of your database with all sensitive data removed. Specifically, it strips out note titles, contents, revisions, history, and some non-system attributes while retaining the overall structure and metadata, such as modification dates. After anonymization, the database undergoes a [vacuuming process](https://sqlite.org/lang_vacuum.html) to ensure no sensitive data remnants remain in the file. The anonymized database is saved in the `anonymized` directory within the [data directory](data-directory.md), making it safe to share with bug reports.

This will create a copy of your document and remove all sensitive data (currently note titles, contents, revisions, history and some of the options, and non-system attributes) while leaving all structure and metadata (e.g. date of last change). After this is done, the database is [VACUUMed](https://sqlite.org/lang_vacuum.html) to make sure there's no stale sensitive data in the document file. The resulting file is stored in `anonymized` directory (placed in the [data directory](data-directory.md)). You can safely attach it to a bug report.

## Command Line Anonymization

If your [database](database.md) is corrupted to the point where Trilium cannot start, the anonymization process can still be executed via the command line:
Expand Down
46 changes: 23 additions & 23 deletions Wiki/apache-proxy-setup.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# Apache proxy setup
# Apache proxy setup
I've assumed you have created a DNS A record for `trilium.yourdomain.com` that you want to use for your Trilium server.

1. Download docker image and create container

```text-plain
docker pull zadam/trilium:[VERSION] %%{WARNING}%%
docker create --name trilium -t -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data zadam/trilium:[VERSION]
docker pull triliumnext/notes:[VERSION]
docker create --name trilium -t -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]
```

2. Configure Apache proxy and websocket proxy

1. Enable apache proxy modules

```text-plain
a2enmod ssl
a2enmod proxy
a2enmod proxy_http
a2enmod proxy_wstunnel
```

2. Create a new let's encrypt certificate

```text-plain
sudo certbot certonly -d trilium.mydomain.com
```

Choose standalone (2) and note the location of the created certificates (typically /etc/letsencrypt/live/...)

3. Create a new virtual host file for apache (you may want to use `apachectl -S` to determine the server root location, mine is /etc/apache2)

```text-plain
sudo nano /etc/apache2/sites-available/trilium.yourdomain.com.conf
```

Paste (and customize) the following text into the configuration file

```text-plain
<VirtualHost *:80>
ServerName http://trilium.yourdomain.com
Expand All @@ -55,32 +55,32 @@ I've assumed you have created a DNS A record for `trilium.yourdomain.com` that y
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
```

4. Enable the virtual host with `sudo a2ensite trilium.yourdomain.com.conf`

5. Reload apache2 with `sudo systemctl reload apache2`

3. Create and enable a systemd service to start the docker container on boot

1. Create a new empty file called `/lib/systemd/system/trilium.service` with the contents

```text-plain
[Unit]
Description=Trilium Server
Requires=docker.service
After=docker.service

[Service]
Restart=always
ExecStart=/usr/bin/docker start -a trilium
ExecStop=/usr/bin/docker stop -t 2 trilium

[Install]
WantedBy=local.target
```

2. Install, enable and start service

```text-plain
sudo systemctl daemon-reload
sudo systemctl enable trilium.service
Expand Down
4 changes: 2 additions & 2 deletions Wiki/day-notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Day-notes
# Day-notes
A common pattern in note-taking is that a lot of notes will be centered around a certain date - e.g. you have some tasks which needs to be done on a certain date, you have meeting minutes from a certain date, you have your thoughts etc. and it all revolves around a date on which they occurred. For this reason, it makes sense to create a certain "day workspace" which will centralize all those notes relevant for a certain date.

For this, Trilium provides a concept of "day note". Trilium semi-automatically generates a single note for each day. Under this note you can save all those relevant notes.
Expand Down Expand Up @@ -55,7 +55,7 @@ The default is `{monthNumberPadded} - {month}`
Implementation
--------------

Trilium has some special support for day notes in the form of [backend Script API](https://zadam.github.io/trilium/backend_api/BackendScriptApi.html) - see e.g. getDayNote() function.
Trilium has some special support for day notes in the form of [backend Script API](https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html) - see e.g. getDayNote() function.

Day (and year, month) notes are created with a label - e.g. `#dateNote="2018-08-16"` this can then be used by other scripts to add new notes to day note etc.

Expand Down
4 changes: 2 additions & 2 deletions Wiki/default-note-title.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default-note-title
# Default-note-title
When a new note is created, its name is by default "new note". In some cases, it can be desirable to have a different or even a dynamic default note title.

For this use case, Trilium (since v0.52) supports `#titleTemplate` [label](attributes.md). You can create such a label for a given note, assign it a value, and this value will be used as a default title when creating child notes. As with other labels, you can make it inheritable to apply recursively, and you can even place it on the root note to have it applied globally everywhere.
Expand Down Expand Up @@ -26,6 +26,6 @@ As an example, imagine you collect server outage incidents and write some notes.

You can automatize the date assignment by assigning a label `#titleTemplate="${now.format('YYYY-MM-DD')}: "` to the parent note "Incidents". Whenever a new child note is created, the title template is evaluated with the injected [now](https://day.js.org/docs/en/display/format) object.

Second variable injected is [parentNote](https://zadam.github.io/trilium/backend_api/Note.html), an example could be `#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"`.
Second variable injected is [parentNote](https://triliumnext.github.io/Notes/backend_api/BNote.html), an example could be `#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"`.

See also \[\[[template](template.md)\]\] which provides similar capabilities, including default note's content.
40 changes: 16 additions & 24 deletions Wiki/docker-server-installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Docker Server Installation for Trilium

Trilium can be deployed using a Docker image, which is the recommended method for server installations. Official Docker images for **AMD64**, **ARMv6**, **ARMv7**, and **ARMv8/64** are available on [Docker Hub](https://hub.docker.com/r/zadam/trilium/). %%%{WARNING}%%% zadams dockerhub
Official docker images are published on docker hub for **AMD64**, **ARMv6**, **ARMv7** and **ARMv8/64**: [https://hub.docker.com/r/triliumnext/notes/](https://hub.docker.com/r/triliumnext/notes/)

## Prerequisites

Expand All @@ -12,12 +12,10 @@ If you need help installing Docker, reference the [Docker Installation Docs](htt

## Pulling the Docker Image

To pull the Trilium image, use the following command, replacing `[VERSION]` with the desired version or tag, such as `0.90-latest` or just `latest`:
To pull the image, use the following command, replacing `[VERSION]` with the desired version or tag, such as `0.90-latest` or just `latest`:

%%%{WARNING}%%% zadams container

```sh
docker pull zadam/trilium:[VERSION]
```text-plain
docker pull triliumnext/notes:[VERSION]
```

**Warning:** Avoid using the "latest" tag, as it may automatically upgrade your instance to a new minor version, potentially disrupting sync setups or causing other issues.
Expand All @@ -32,10 +30,8 @@ Trilium requires a directory on the host system to store its data. This director

Run the container to make it accessible only from the localhost. This setup is suitable for testing or when using a proxy server like Nginx or Apache.

%%%{WARNING}%%% zadams container

```sh
sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data zadam/trilium:[VERSION]
```text-plain
sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]
```

1. Verify the container is running using `docker ps`.
Expand All @@ -45,30 +41,29 @@ sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/triliu

To make the container accessible only on your local network, first create a new Docker network:

%%%{WARNING}%%% zadams container

```sh
docker network create -d macvlan -o parent=eth0 --subnet 192.168.2.0/24 --gateway 192.168.2.254 --ip-range 192.168.2.252/27 mynet
```

Then, run the container with the network settings:

%%%{WARNING}%%% zadams container

```sh
docker run --net=mynet -d -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data zadam/trilium:0.52-latest
docker run --net=mynet -d -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:<VERSION>-latest
```

To set a different user ID (UID) and group ID (GID) for the saved data, use the `USER_UID` and `USER_GID` environment variables:

%%%{WARNING}%%% zadams container

```sh
docker run --net=mynet -d -p 127.0.0.1:8080:8080 -e "USER_UID=1001" -e "USER_GID=1001" -v ~/trilium-data:/home/node/trilium-data zadam/trilium:0.52-latest
docker run --net=mynet -d -p 127.0.0.1:8080:8080 -e "USER_UID=1001" -e "USER_GID=1001" -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:<VERSION>-latest
```

Find the local IP address using `docker inspect [container_name]` and access the service from devices on the local network.

```sh
docker ps
docker inspect [container_name]
```

#### Reverse Proxy

1. [Nginx](nginx-proxy-setup.md)
Expand All @@ -78,10 +73,8 @@ Find the local IP address using `docker inspect [container_name]` and access the

To allow access from any IP address, run the container as follows:

%%%{WARNING}%%% zadams container

```sh
docker run -d -p 0.0.0.0:8080:8080 -v ~/trilium-data:/home/node/trilium-data zadam/trilium:[VERSION]
docker run -d -p 0.0.0.0:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]
```

Stop the container with `docker stop <CONTAINER ID>`, where the container ID is obtained from `docker ps`.
Expand All @@ -90,12 +83,11 @@ Stop the container with `docker stop <CONTAINER ID>`, where the container ID is

For a custom data directory, use:

%%%{WARNING}%%% zadams container

```sh
-v ~/YourOwnDirectory:/home/node/trilium-data zadam/trilium:[VERSION]
-v ~/YourOwnDirectory:/home/node/trilium-data triliumnext/notes:[VERSION]
```

If you want to run your instance in a non-default way, please use the volume switch as follows: `-v ~/YourOwnDirectory:/home/node/trilium-data triliumnext/notes:<VERSION>`. It is important to be aware of how Docker works for volumes, with the first path being your own and the second the one to virtually bind to. [https://docs.docker.com/storage/volumes/](https://docs.docker.com/storage/volumes/)
The path before the colon is the host directory, and the path after the colon is the container's path. More details can be found in the [Docker Volumes Documentation](https://docs.docker.com/storage/volumes/).

### Note on --user Directive
Expand Down
4 changes: 2 additions & 2 deletions Wiki/error-logs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Error-logs
# Error-logs
It's important to provide all available error logs together with bug reports. This page will show you how to do it.

Backend logs
Expand Down Expand Up @@ -29,7 +29,7 @@ Copy-paste (or screenshot) the logs. It's better to provide not just errors, but
Providing sensitive data
------------------------

If you don't feel comfortable attaching the logs or anything sensitive to the public GitHub issues, feel free to mail them to [zadam.apps@gmail.com](#root/N3Zt66yETj9g)
If you don't feel comfortable attaching the logs or anything sensitive to the public GitHub issues, feel free to contact the devs in our Matrix [support channel](https://github.com/TriliumNext/Notes#-discuss-with-us).

Use this email to also provide anything which could assist in analysing the bug - e.g. files/images/ZIPs being imported or [anonymized database](anonymized-database.md).

Expand Down
8 changes: 4 additions & 4 deletions Wiki/frontend-basics.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Frontend-Basics
# Frontend-Basics
Frontend API
------------

Expand Down Expand Up @@ -39,14 +39,14 @@ Widgets

Conversely to scripts, widgets do have some specific requirements in order to work. A widget must:

* Extend [BasicWidget](https://zadam.github.io/trilium/frontend_api/BasicWidget.html) or one of it's subclasses.
* Extend [BasicWidget](https://triliumnext.github.io/Notes/frontend_api/BasicWidget.html) or one of it's subclasses.
* Create a new instance and assign it to `module.exports`.
* Define a `parentWidget` member to determine where it should be displayed.
* Define a `position` (integer) that determines the location via sort order.
* Have a `#widget` attribute on the containing note.
* Create, render, and return your element in the render function.
* For [BasicWidget](https://zadam.github.io/trilium/frontend_api/BasicWidget.html) and [NoteContextAwareWidget](https://zadam.github.io/trilium/frontend_api/NoteContextAwareWidget.html) you should create `this.$widget` and render it in `doRender()`.
* For [RightPanelWidget](https://zadam.github.io/trilium/frontend_api/RightPanelWidget.html) the `this.$widget` and `doRender()` are already handled and you should instead return the value in `doRenderBody()`.
* For [BasicWidget](https://triliumnext.github.io/Notes/frontend_api/BasicWidget.html) and [NoteContextAwareWidget](https://triliumnext.github.io/Notes/frontend_api/NoteContextAwareWidget.html) you should create `this.$widget` and render it in `doRender()`.
* For [RightPanelWidget](https://triliumnext.github.io/Notes/frontend_api/RightPanelWidget.html) the `this.$widget` and `doRender()` are already handled and you should instead return the value in `doRenderBody()`.

### parentWidget

Expand Down
4 changes: 2 additions & 2 deletions Wiki/home.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Home
# Home
Overview
--------

Basic overview of the Trilium project is available at project homepage - [https://github.com/zadam/trilium#trilium-notes](https://github.com/zadam/trilium#trilium-notes)
Basic overview of the Trilium project is available at project homepage - [https://github.com/triliumnext/notes#trilium-notes](https://github.com/triliumnext/notes#trilium-notes)

Inspiration for the name "Trilium":

Expand Down
4 changes: 1 addition & 3 deletions Wiki/import-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ To import these docs into your own Trilium instance:
1. Download archive from main branch of this repo:
https://github.com/TriliumNext/Docs/archive/refs/heads/main.zip
2. In Trilim create a new note to act as branch for the docs
3. Right-click on the note, select "Import into note" and select downloaded `Docs-main.zip` file.
3. Right-click on the note, select "Import into note" and select downloaded `Docs-main.zip` file.
- Optionally uncheck "Shrink images"

## Optional cleanup
- delete `!!!meta.json`
- Move `images` node down to the bottom (instead of dragging, it's easier to move out to parent node than back into Wiki. It will go to end of list automatically).

For new releases delete the old docs note tree and start fresh, or you'll get duplicates.

[0]: https://github.com/zadam/trilium/wiki
4 changes: 2 additions & 2 deletions Wiki/manual-server-installation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Manual-server-installation
# Manual-server-installation
This page describes manually installing Trilium on your server. **Note that this is a not well supported way to install Trilium, problems may appear, information laid out here is quite out of date. It is recommended to use either Docker or packaged build installation.**

Requirements
Expand Down Expand Up @@ -30,7 +30,7 @@ Installation
You can either download source code zip/tar from [https://github.com/TriliumNext/Notes/releases/latest\]\]](https://github.com/TriliumNext/Notes/releases/latest%5D%5D) %%{WARNING}%%or clone git repository **from stable branch** with

```text-plain
git clone -b stable https://github.com/zadam/trilium.git %%{WARNING}%%
git clone -b stable https://github.com/triliumnext/notes.git %%{WARNING}%%
```

Installation
Expand Down
4 changes: 2 additions & 2 deletions Wiki/patterns-of-personal-knowledge.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Patterns-of-personal-knowledge
# Patterns-of-personal-knowledge
Patterns-of-personal-knowledge-base
-----------------------------------

This page contains description of some of the patterns I use to organize information in my knowledge base. This is meant to give some inspiration of how one might create and structure their knowledge base in general and also specifically in [Trilium Notes](https://github.com/zadam/trilium). It also gives some background and justification for some of the design decisions.
This page contains description of some of the patterns I use to organize information in my knowledge base. This is meant to give some inspiration of how one might create and structure their knowledge base in general and also specifically in [Trilium Notes](https://github.com/triliumnext/notes). It also gives some background and justification for some of the design decisions.

Meta patterns
-------------
Expand Down
4 changes: 2 additions & 2 deletions Wiki/script-api.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Script API
For [Scripts](scripts.md) to do anything useful, Trilium publishes "Script API". Actually there are two such APIs:

* [Frontend API](https://zadam.github.io/trilium/frontend_api/FrontendScriptApi.html) %%{WARNING}%%
* [Backend API](https://zadam.github.io/trilium/backend_api/BackendScriptApi.html) %%{WARNING}%%
* [Frontend API](https://triliumnext.github.io/Notes/frontend_api/FrontendScriptApi.html)
* [Backend API](https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html)

Backwards compatibility
-----------------------
Expand Down
Loading