From 24dbc23ab08eec85d281505439c1a40903f8e6c0 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Wed, 3 Mar 2021 13:51:39 +0100 Subject: Docs: Add a note about upgrading to the getting started guide Signed-off-by: David Mehren --- docs/content/setup/getting-started.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/content') diff --git a/docs/content/setup/getting-started.md b/docs/content/setup/getting-started.md index a8180793..3592b6bb 100644 --- a/docs/content/setup/getting-started.md +++ b/docs/content/setup/getting-started.md @@ -8,3 +8,14 @@ To set up your instance follow these steps: 3. [Configure HedgeDoc](https://docs.hedgedoc.org/configuration/) Follow us on :fontawesome-brands-mastodon:{: .mastodon }Mastodon or :fontawesome-brands-twitter:{: .twitter }Twitter for updates. + +## Upgrading HedgeDoc + +HedgeDoc follows [Semantic Versioning](https://semver.org/). +This means that minor and patch releases should not introduce user-facing backwards-incompatible changes. + +You can find more details about upgrading in the instructions of your installation method. + +!!! warning + Before you upgrade, **always read the release notes**. + You can find them on our [releases page](https://hedgedoc.org/releases/). -- cgit v1.2.3 From 1f4388802b9454c74ff4339a6f47b4832fc4c17e Mon Sep 17 00:00:00 2001 From: David Mehren Date: Wed, 3 Mar 2021 13:56:57 +0100 Subject: Docs: Improve manual installation guide - Move the requirements into an info block - Make clear that we use Yarn Classic - Link to our downloads page instead of GitHub - Simplify paragraph about configuring HedgeDoc - Move additional information into `` tags - Match upgrade documentation to installation steps. Signed-off-by: David Mehren --- docs/content/setup/manual-setup.md | 76 ++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 31 deletions(-) (limited to 'docs/content') diff --git a/docs/content/setup/manual-setup.md b/docs/content/setup/manual-setup.md index 4d03b752..072b2168 100644 --- a/docs/content/setup/manual-setup.md +++ b/docs/content/setup/manual-setup.md @@ -1,41 +1,55 @@ # Manual Installation -## Requirements on your server +!!! info "Requirements on your server" + - Node.js 10.13 or higher + - Database (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL) + The database must use charset `utf8`. This is typically the default in PostgreSQL and SQLite. + In MySQL and MariaDB UTF-8 might need to be set with `alter database character set utf8 collate utf8_bin;` + Be aware of older MySQL and MariaDB versions which sometimes use shorter representations of UTF-8 than 4 bytes. + This can break if symbols with more bytes are used. + You can use `alter database character set utf8mb4 COLLATE utf8mb4_unicode_ci` to be on the safe side. + - NPM (and its dependencies, [node-gyp](https://github.com/nodejs/node-gyp#installation)) + - [Yarn Classic](https://classic.yarnpkg.com) 1.22 or higher (Yarn 2 is currently not supported) + - Bash (for the setup script) + - For **building** the HedgeDoc frontend you need a machine with at least **2 GB** RAM. + - Starting with release 1.7 the release tarball includes the prebuilt frontend, so building it yourself is not necessary. -- Node.js 10.13 or up -- Database (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL) - The database must use charset `utf8`. This is typically the default in PostgreSQL and SQLite. - In MySQL and MariaDB UTF-8 might need to be set with `alter database character set utf8 collate utf8_bin;` - Be aware of older MySQL and MariaDB versions which sometimes use shorter representations of UTF-8 than 4 bytes. - This can break if symbols with more bytes are used. - You can use `alter database character set utf8mb4 COLLATE utf8mb4_unicode_ci` to be on the safe side. -- NPM (and its dependencies, [node-gyp](https://github.com/nodejs/node-gyp#installation)) -- Yarn -- Bash (for the setup script) -- For **building** the HedgeDoc frontend you need a machine with at least **2 GB** RAM. - - Starting with release 1.7 the release tarball includes the frontend, so building it yourself is not necessary. - -## Instructions - -1. Check if you meet the [requirements at the top of this document](#requirements-on-your-server). -2. Download a [release](https://github.com/hedgedoc/hedgedoc/releases) tarball and extract it. - Alternatively, you can use Git to clone the repository and checkout a release, e.g. with `git clone -b 1.7.2 https://github.com/hedgedoc/hedgedoc.git`. -3. Enter the directory and type `bin/setup`, which will install the dependencies and create configs. -4. Modify the file named `config.json` or configure HedgeDoc through environment variables which will overwrite the configs, see docs [here](../configuration.md). -5. **If using the release tarball for 1.7.0 or newer, this step can be skipped.** - Build the frontend bundle by `yarn run build` (use `yarn run dev` if you are in development) -6. It is recommended to start your server manually once: `NODE_ENV=production yarn start`, this way it's easier to see warnings or errors that might occur (leave out `NODE_ENV=production` for development). +1. Check if you meet the [requirements at the top of this document](#manual-installation). +2. Download the [latest release](https://hedgedoc.org/latest-release/) and extract it. + Alternatively, you can use Git to clone the repository and checkout a release, e.g. with `git clone -b 1.7.2 https://github.com/hedgedoc/hedgedoc.git`. +3. Enter the directory and type `bin/setup`, which will install the dependencies and create example configs. +4. Configure HedgeDoc: You can either use the `config.json` file or environment variables. + For details, have a look at [the configuration documentation](../configuration.md). +5. *:octicons-light-bulb-16: If you used the release tarball for 1.7.0 or newer, this step can be skipped.* + Build the frontend bundle by running `yarn run build`. +6. It is recommended to start your server manually once: + ```shell + NODE_ENV=production yarn start + ``` + This way it's easier to see warnings or errors that might occur. + You can leave out `NODE_ENV=production` for development. 7. Run the server as you like (node, forever, pm2, SystemD, Init-Scripts) -## How to upgrade your installation +## Upgrading + +!!! warning + Before you upgrade, **always read the release notes**. + You can find them on our [releases page](https://hedgedoc.org/releases/). If you are upgrading HedgeDoc from an older version, follow these steps: -1. Check if you meet the [requirements at the top of this document](#requirements-on-your-server). -2. Verify which version you were running before and take a look at [migrations and breaking changes](../guides/migrations-and-breaking-changes.md) to see if additional steps, or configuration changes are necessary! -3. Fully stop your old HedgeDoc server. -4. `git pull` or unzip a new release in the directory. +1. Check if you still meet the [requirements at the top of this document](#requirements-on-your-server). +2. Ensure you read the [release notes](https://hedgedoc.org/releases/) of all versions between your current version + and the latest release. +2. Fully stop your old HedgeDoc server. +3. [Download](https://hedgedoc.org/latest-release/) the new release and extract it over the old directory. + If you use Git, you can check out the new tag with e.g. `git fetch origin && git checkout 1.7.2` 5. Run `bin/setup`. This will take care of installing dependencies. It is safe to run on an existing installation. -6. Build front-end bundle by `yarn run build` (use `yarn run dev` if you are in development). -7. It is recommended to start your server manually once: `NODE_ENV=production yarn start`, this way it's easier to see warnings or errors that might occur (leave out `NODE_ENV=production` for development). +6. *:octicons-light-bulb-16: If you used the release tarball for 1.7.0 or newer, this step can be skipped.* + Build the frontend bundle by running `yarn run build`. +7. It is recommended to start your server manually once: + ```shell + NODE_ENV=production yarn start + ``` + This way it's easier to see warnings or errors that might occur. 8. You can now restart the HedgeDoc server! -- cgit v1.2.3 From 3eb049e24bbaf18fffeebb7f70824300a8414ed1 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Thu, 4 Mar 2021 18:37:53 +0100 Subject: Migrate container docs to main documentation Signed-off-by: David Mehren --- docs/content/setup/docker.md | 105 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 95 insertions(+), 10 deletions(-) (limited to 'docs/content') diff --git a/docs/content/setup/docker.md b/docs/content/setup/docker.md index f6aeb833..abb339b3 100644 --- a/docs/content/setup/docker.md +++ b/docs/content/setup/docker.md @@ -1,20 +1,105 @@ # HedgeDoc Docker Image -[![Try in PWD](https://cdn.rawgit.com/play-with-docker/stacks/cff22438/assets/images/button.png)](http://play-with-docker.com?stack=https://github.com/hedgedoc/container/raw/master/docker-compose.yml&stack_name=hedgedoc) +!!! info "Requirements on your server" + - [Git](https://git-scm.com/) + - [Docker](https://docs.docker.com/get-docker/) 17.03.1 or higher + - [Docker Compose](https://docs.docker.com/compose/install/) -## Debian-based version +The official docker images are [available on quay.io](https://quay.io/repository/hedgedoc/hedgedoc). +We currently only support the AMD64 architecture. -[![Docker Repository on Quay](https://quay.io/repository/hedgedoc/hedgedoc/status "Docker Repository on Quay")](https://quay.io/repository/hedgedoc/hedgedoc) -## Alpine-based version +The easiest way to get started with HedgeDoc and Docker is to use the following `docker-compose.yml`: -[![Docker Repository on Quay](https://quay.io/repository/hedgedoc/hedgedoc/status "Docker Repository on Quay")](https://quay.io/repository/hedgedoc/hedgedoc) - -The easiest way to setup HedgeDoc using docker are using the following three commands: - -```sh +```shell git clone https://github.com/hedgedoc/container.git hedgedoc-container cd hedgedoc-container docker-compose up ``` -Read more about it in the [container repository](https://github.com/hedgedoc/container). +HedgeDoc should now be available at http://127.0.0.1:3000. +You can configure your container with a config file or with env vars. +Check out [the configuration docs](/configuration) for more details. + +## Upgrading + +!!! warning + Before you upgrade, **always read the release notes**. + You can find them on our [releases page](https://hedgedoc.org/releases/). + +!!! info "Upgrading to 1.7" + Together with changing the name to "HedgeDoc" the default username, + password and database name have been changed in `docker-compose.yml`. + + In order to migrate the existing database to the new default credentials, run + ```shell + docker-compose exec database createuser --superuser -Uhackmd postgres + docker-compose exec database psql -Upostgres -c "alter role hackmd rename to hedgedoc; alter role hedgedoc with password 'password'; alter database hackmd rename to hedgedoc;" + ``` + before running `docker-compose up`. + +You can upgrade to the latest release using these commands: + +```shell +cd hedgedoc-container # Enter the directory you previously cloned into +git pull # Pull new commits +docker-compose pull # Pull new container images +docker-compose up # Start with the new images +``` + +### Migrating from HackMD + +If you used the [`docker-hackmd`](https://github.com/hackmdio/docker-hackmd) repository before, +you can migrate to [`hedgedoc-container`](https://github.com/hedgedoc/container). + +`hedgedoc-container` is a fork of `docker-hackmd`, so you need to replace the upstream URL: + +```shell +git remote set-url origin https://github.com/hedgedoc/container.git +git pull +``` + +Since both codebases diverged since the fork, we recommend that you read the +[HedgeDoc release notes](https://hedgedoc.org/releases/) at +least since 1.6.0 and follow any instructions present there. A particular issue +that has come up is when handling TLS connections when using a reverse proxy. +You must [set the `X-Forwarded-Proto` header +correctly](https://docs.hedgedoc.org/guides/reverse-proxy/). + + +## Backup + +If you use a PostgreSQL database, you can leverage this command to create a backup: + +```shell + docker-compose exec database pg_dump hedgedoc -U hedgedoc > backup.sql +``` + + +## Restore + +If you want to restore your PostgreSQL backup, run these commands before starting the application for the first time: + +```shell +docker-compose up -d database +cat backup.sql | docker exec -i $(docker-compose ps -q database) psql -U hedgedoc +``` + +## Custom build + +The default setting is to use pre-built docker images. +If you want to build your own containers uncomment the `build` section in the +[`docker-compose.yml`](https://github.com/hedgedoc/container/blob/master/docker-compose.yml) +and edit the +[`config.json`](https://github.com/hedgedoc/container/blob/master/resources/config.json). + +If you change the database settings and don't use the `CMD_DB_URL` make sure +you edit the +[`.sequelizerc`](https://github.com/hedgedoc/container/blob/master/resources/.sequelizerc). + +## Issues + +If you have any problems with or questions about this image, please contact us +through a [GitHub issue](https://github.com/hedgedoc/container/issues). + +You can also reach many of the project maintainers via our matrix room +[`#hedgedoc:matrix.org`](https://chat.hedgedoc.org). -- cgit v1.2.3 From 27d53f52330d9b1d0144075c1ae430ecce7d233b Mon Sep 17 00:00:00 2001 From: David Mehren Date: Thu, 4 Mar 2021 18:42:33 +0100 Subject: Remove ancient migration docs Signed-off-by: David Mehren --- .../guides/migrations-and-breaking-changes.md | 55 ---------------------- 1 file changed, 55 deletions(-) delete mode 100644 docs/content/guides/migrations-and-breaking-changes.md (limited to 'docs/content') diff --git a/docs/content/guides/migrations-and-breaking-changes.md b/docs/content/guides/migrations-and-breaking-changes.md deleted file mode 100644 index bbc320b1..00000000 --- a/docs/content/guides/migrations-and-breaking-changes.md +++ /dev/null @@ -1,55 +0,0 @@ -# Migrations and Notable Changes - -## Migrating to 1.4.0 - -We dropped support for node 6 with this version. If you have any trouble running this version, please double check that you are running at least node 8! - -## Migrating to 1.3.2 - -This is not a breaking change, but to stay up to date with the community -repository, you may need to update a few urls. This is not a breaking change. - -See more at [issue #10](https://github.com/hedgedoc/hedgedoc/issues/10) - -### Native setup using git - -Change the upstream remote using `git remote set-url origin https://github.com/hedgedoc/hedgedoc.git`. - -### Docker - -When you use our [container repository](https://github.com/hedgedoc/container) -(which was previously `hedgedoc-container`) all you can simply run `git pull` and -your `docker-compose.yml` will be updated. - -When you setup things yourself, make sure you use the new image: -[`quay.io/hedgedoc/hedgedoc`](https://quay.io/repository/hedgedoc/hedgedoc?tab=tags). - -### Heroku - -All you need to do is [disconnect GitHub](https://devcenter.heroku.com/articles/github-integration#disconnecting-from-github) -and [reconnect it](https://devcenter.heroku.com/articles/github-integration#enabling-github-integration) -with this new repository. - -Or you can use our Heroku button and redeploy your instance and link the old -database again. - -## Migrating to 1.1.0 - -We deprecated the older lower case config style and moved on to camel case style. Please have a look at the current `config.json.example` and check the warnings on startup. - -*Notice: This is not a breaking change right now but will be in the future* - -## Migrating to 0.5.0 - -[migration-to-0.5.0 migration tool](https://github.com/hackmdio/migration-to-0.5.0) - -We don't use LZString to compress socket.io data and DB data after version 0.5.0. -Please run the migration tool if you're upgrading from the old version. - -## Migrating to 0.4.0 - -[migration-to-0.4.0 migration tool](https://github.com/hackmdio/migration-to-0.4.0) - -We've dropped MongoDB after version 0.4.0. -So here is the migration tool for you to transfer the old DB data to the new DB. -This tool is also used for official service. -- cgit v1.2.3 From c54eef10a6bc290e6b3151cfb82e867ec1759c44 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 6 Mar 2021 13:02:05 +0100 Subject: Add an example systemd unit to installation docs Heavily inspired by the unit of Arch Linux: https://github.com/archlinux/svntogit-community/blob/packages/hedgedoc/trunk/hedgedoc.service Fixes https://github.com/hedgedoc/hedgedoc/issues/46 Signed-off-by: David Mehren --- docs/content/setup/manual-setup.md | 70 +++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) (limited to 'docs/content') diff --git a/docs/content/setup/manual-setup.md b/docs/content/setup/manual-setup.md index 072b2168..4c1d2675 100644 --- a/docs/content/setup/manual-setup.md +++ b/docs/content/setup/manual-setup.md @@ -28,7 +28,8 @@ ``` This way it's easier to see warnings or errors that might occur. You can leave out `NODE_ENV=production` for development. -7. Run the server as you like (node, forever, pm2, SystemD, Init-Scripts) +8. Run the server as you like (node, forever, pm2, systemd, Init-Scripts). + See [below](#systemd-unit-example) for an example using systemd. ## Upgrading @@ -53,3 +54,70 @@ If you are upgrading HedgeDoc from an older version, follow these steps: ``` This way it's easier to see warnings or errors that might occur. 8. You can now restart the HedgeDoc server! + +## Systemd Unit Example +Using the unit file below, you can run HedgeDoc as a systemd service. + +!!! warning + - In this example, you must configure HedgeDoc using the `config.json` file and the + `production` key. + - Make sure the user and group `hedgedoc` exists and has appropriate permissions in the + directory you installed HedgeDoc in or change the `User` and `Group` settings in the unit + file. + - Make sure `WorkingDirectory` points to the directory you installed HedgeDoc in. + - Make sure `ReadWritePaths` contains all directories HedgeDoc might write to. This may + include the `public/uploads` folder if you configured local storage. If you use SQLite, you + must also include the directory where the database file is saved. **Do not save the SQLite + file in the root directory of the HedgeDoc installation**, but create a subfolder like `db`! + - If you use an external database like PostgreSQL or MariaDB, make sure to add a corresponding + `After` statement. + +```ini +[Unit] +Description=HedgeDoc - The best platform to write and share markdown. +Documentation=https://docs.hedgedoc.org/ +After=network.target +# Uncomment if you use MariaDB/MySQL +# After=mysql.service +# Uncomment if you use PostgreSQL +# After=postgresql.service + +[Service] +Type=exec +Environment=NODE_ENV=production +Restart=always +RestartSec=2s +ExecStart=/usr/bin/yarn start --production +CapabilityBoundingSet= +NoNewPrivileges=true +PrivateDevices=true +RemoveIPC=true +LockPersonality=true +ProtectControlGroups=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectKernelLogs=true +ProtectClock=true +ProtectHostname=true +ProtectProc=noaccess +RestrictRealtime=true +RestrictSUIDSGID=true +RestrictNamespaces=true +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +ProtectSystem=strict +ProtectHome=true +PrivateTmp=true +SystemCallArchitectures=native +SystemCallFilter=@system-service + +# You may have to adjust these settings +User=hedgedoc +Group=hedgedoc +WorkingDirectory=/opt/hedgedoc + +# Example: local storage for uploads and SQLite +# ReadWritePaths=/opt/hedgedoc/public/uploads /opt/hedgedoc/db + +[Install] +WantedBy=multi-user.target +``` -- cgit v1.2.3 From 2667b642f4b5aeef9ec0166d0c5986e0605d60e2 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Tue, 13 Apr 2021 21:27:35 +0200 Subject: Docs: Include docker-compose snippet Directing users to use the container repo to install HedgeDoc has caused upgrade-trouble in the past, after we made incompatible changes to the docker-compose.yml in the repo. This commit inserts a minimal docker-compose snipped in the docs, which can be used to get started. Upgrading can then be performed by just incrementing the referenced image version. Signed-off-by: David Mehren --- docs/content/setup/docker.md | 52 +++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 15 deletions(-) (limited to 'docs/content') diff --git a/docs/content/setup/docker.md b/docs/content/setup/docker.md index abb339b3..1b162399 100644 --- a/docs/content/setup/docker.md +++ b/docs/content/setup/docker.md @@ -6,18 +6,46 @@ - [Docker Compose](https://docs.docker.com/compose/install/) The official docker images are [available on quay.io](https://quay.io/repository/hedgedoc/hedgedoc). -We currently only support the AMD64 architecture. +We currently only support the `amd64` architecture. The easiest way to get started with HedgeDoc and Docker is to use the following `docker-compose.yml`: -```shell -git clone https://github.com/hedgedoc/container.git hedgedoc-container -cd hedgedoc-container -docker-compose up +!!! warning + This is a minimal example to get started quickly and not intended for production use. + +```yaml +version: '3' +services: + database: + image: postgres:9.6-alpine + environment: + - POSTGRES_USER=hedgedoc + - POSTGRES_PASSWORD=password + - POSTGRES_DB=hedgedoc + volumes: + - database:/var/lib/postgresql/data + restart: always + app: + # Make sure to use the latest release from https://hedgedoc.org/latest-release + image: quay.io/hedgedoc/hedgedoc:1.7.2 + environment: + - CMD_DB_URL=postgres://hedgedoc:password@database:5432/hedgedoc + - CMD_DOMAIN=localhost + - CMD_URL_ADDPORT=true + volumes: + - uploads:/hedgedoc/public/uploads + ports: + - "3000:3000" + restart: always + depends_on: + - database +volumes: + database: + uploads: ``` -HedgeDoc should now be available at http://127.0.0.1:3000. -You can configure your container with a config file or with env vars. +After executing `docker-compose up`, HedgeDoc should be available at [http://127.0.0.1:3000](http://127.0.0.1:3000). +You can now continue to configure your container with environment variables. Check out [the configuration docs](/configuration) for more details. ## Upgrading @@ -37,14 +65,8 @@ Check out [the configuration docs](/configuration) for more details. ``` before running `docker-compose up`. -You can upgrade to the latest release using these commands: - -```shell -cd hedgedoc-container # Enter the directory you previously cloned into -git pull # Pull new commits -docker-compose pull # Pull new container images -docker-compose up # Start with the new images -``` +You can upgrade to the latest release by stopping the containers and changing the referenced image version in `docker-compose.yml`. +Then run `docker-compose up` to start HedgeDoc again. ### Migrating from HackMD -- cgit v1.2.3 From a3ee2c6f8c5ae29b9dd58d5982127ed026956ed4 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Tue, 13 Apr 2021 21:43:48 +0200 Subject: Docs: Move migration hints to getting started page These are relevant for all installation methods, so they should be placed at a 'global' place. Signed-off-by: David Mehren --- docs/content/setup/docker.md | 20 +++----------------- docs/content/setup/getting-started.md | 10 ++++++++++ 2 files changed, 13 insertions(+), 17 deletions(-) (limited to 'docs/content') diff --git a/docs/content/setup/docker.md b/docs/content/setup/docker.md index 1b162399..7803b55d 100644 --- a/docs/content/setup/docker.md +++ b/docs/content/setup/docker.md @@ -68,24 +68,10 @@ Check out [the configuration docs](/configuration) for more details. You can upgrade to the latest release by stopping the containers and changing the referenced image version in `docker-compose.yml`. Then run `docker-compose up` to start HedgeDoc again. -### Migrating from HackMD +### Migrating from CodiMD & HackMD -If you used the [`docker-hackmd`](https://github.com/hackmdio/docker-hackmd) repository before, -you can migrate to [`hedgedoc-container`](https://github.com/hedgedoc/container). - -`hedgedoc-container` is a fork of `docker-hackmd`, so you need to replace the upstream URL: - -```shell -git remote set-url origin https://github.com/hedgedoc/container.git -git pull -``` - -Since both codebases diverged since the fork, we recommend that you read the -[HedgeDoc release notes](https://hedgedoc.org/releases/) at -least since 1.6.0 and follow any instructions present there. A particular issue -that has come up is when handling TLS connections when using a reverse proxy. -You must [set the `X-Forwarded-Proto` header -correctly](https://docs.hedgedoc.org/guides/reverse-proxy/). +If you currently use CodiMD or HackMD, you should be able to swap the docker image for ours. +See [the general migration hints](/setup/getting-started/#migrating-from-codimd-hackmd) for compatibility details. ## Backup diff --git a/docs/content/setup/getting-started.md b/docs/content/setup/getting-started.md index 3592b6bb..4cbb0162 100644 --- a/docs/content/setup/getting-started.md +++ b/docs/content/setup/getting-started.md @@ -19,3 +19,13 @@ You can find more details about upgrading in the instructions of your installati !!! warning Before you upgrade, **always read the release notes**. You can find them on our [releases page](https://hedgedoc.org/releases/). + +## Migrating from CodiMD & HackMD +Migrating from CodiMD <= 1.6.0 or HackMD <= 1.1.0 to HedgeDoc should be safe, +just make sure to read the release notes. +A particular issue that has come up is when handling TLS connections using a reverse proxy. +You must [set the `X-Forwarded-Proto` header correctly](https://docs.hedgedoc.org/guides/reverse-proxy/#reverse-proxy-config). + +Migrating from more recent versions of CodiMD is not guaranteed to work, although some community members +[reported success migrating from CodiMD 2.2](https://community.hedgedoc.org/t/solved-upgrade-from-dockerlized-codimd/271). +If you successfully migrated from other versions, please report your upgrade results in the [community forum](https://community.hedgedoc.org/). -- cgit v1.2.3 From 87e0cea2f99542d6042765dba8d5ed8b082fb60d Mon Sep 17 00:00:00 2001 From: David Mehren Date: Tue, 13 Apr 2021 21:45:28 +0200 Subject: Docs: Cleanup docker page Build instructions are not relevant for most users. Contact info can already be found on the 'Home' page. Signed-off-by: David Mehren --- docs/content/setup/docker.md | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'docs/content') diff --git a/docs/content/setup/docker.md b/docs/content/setup/docker.md index 7803b55d..11ff9b02 100644 --- a/docs/content/setup/docker.md +++ b/docs/content/setup/docker.md @@ -91,23 +91,3 @@ If you want to restore your PostgreSQL backup, run these commands before startin docker-compose up -d database cat backup.sql | docker exec -i $(docker-compose ps -q database) psql -U hedgedoc ``` - -## Custom build - -The default setting is to use pre-built docker images. -If you want to build your own containers uncomment the `build` section in the -[`docker-compose.yml`](https://github.com/hedgedoc/container/blob/master/docker-compose.yml) -and edit the -[`config.json`](https://github.com/hedgedoc/container/blob/master/resources/config.json). - -If you change the database settings and don't use the `CMD_DB_URL` make sure -you edit the -[`.sequelizerc`](https://github.com/hedgedoc/container/blob/master/resources/.sequelizerc). - -## Issues - -If you have any problems with or questions about this image, please contact us -through a [GitHub issue](https://github.com/hedgedoc/container/issues). - -You can also reach many of the project maintainers via our matrix room -[`#hedgedoc:matrix.org`](https://chat.hedgedoc.org). -- cgit v1.2.3 From 70a289aeba9e58845c64f2a13120818c55144b04 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Tue, 13 Apr 2021 22:05:15 +0200 Subject: Docs: Include minimal config on manual setup page To make it easier to get started, this commit adds a minimal `config.json` snipped to the manual setup instruction. Signed-off-by: David Mehren --- docs/content/setup/manual-setup.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'docs/content') diff --git a/docs/content/setup/manual-setup.md b/docs/content/setup/manual-setup.md index 4c1d2675..9329f669 100644 --- a/docs/content/setup/manual-setup.md +++ b/docs/content/setup/manual-setup.md @@ -18,7 +18,20 @@ 2. Download the [latest release](https://hedgedoc.org/latest-release/) and extract it. Alternatively, you can use Git to clone the repository and checkout a release, e.g. with `git clone -b 1.7.2 https://github.com/hedgedoc/hedgedoc.git`. 3. Enter the directory and type `bin/setup`, which will install the dependencies and create example configs. -4. Configure HedgeDoc: You can either use the `config.json` file or environment variables. +4. Configure HedgeDoc: To get started, you can use this minimal `config.json`: + ```json + { + "production": { + "db": { + "dialect": "sqlite", + "storage": "./db.hedgedoc.sqlite" + }, + "urlAddPort": true, + "domain": "localhost" + } + } + ``` + It's also possible to use environment variables. For details, have a look at [the configuration documentation](../configuration.md). 5. *:octicons-light-bulb-16: If you used the release tarball for 1.7.0 or newer, this step can be skipped.* Build the frontend bundle by running `yarn run build`. @@ -27,7 +40,8 @@ NODE_ENV=production yarn start ``` This way it's easier to see warnings or errors that might occur. - You can leave out `NODE_ENV=production` for development. + You can leave out `NODE_ENV=production` for development. +7. If you used the example config, HedgeDoc should now be available at [http://127.0.0.1:3000](http://127.0.0.1:3000). 8. Run the server as you like (node, forever, pm2, systemd, Init-Scripts). See [below](#systemd-unit-example) for an example using systemd. -- cgit v1.2.3 From c7104c94e4274f5010adb2fd6088ff1f4367dbfb Mon Sep 17 00:00:00 2001 From: David Mehren Date: Tue, 13 Apr 2021 22:22:03 +0200 Subject: Docs: Add hint about account creation Signed-off-by: David Mehren --- docs/content/setup/getting-started.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/content') diff --git a/docs/content/setup/getting-started.md b/docs/content/setup/getting-started.md index 4cbb0162..2b1f8653 100644 --- a/docs/content/setup/getting-started.md +++ b/docs/content/setup/getting-started.md @@ -6,6 +6,8 @@ To set up your instance follow these steps: 1. Choose an installation method and follow the instructions 2. [Configure your reverse proxy](https://docs.hedgedoc.org/guides/reverse-proxy/) 3. [Configure HedgeDoc](https://docs.hedgedoc.org/configuration/) +4. If you didn't disable [local accounts](/configuration/#email-local-account), you can use the "Sign In" button to + create an account, login and start using HedgeDoc. Follow us on :fontawesome-brands-mastodon:{: .mastodon }Mastodon or :fontawesome-brands-twitter:{: .twitter }Twitter for updates. -- cgit v1.2.3 From e8465aa8beac309edb36a3d4d2fc85317c921b48 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Fri, 16 Apr 2021 21:16:59 +0200 Subject: Docs: Fixup some wording in manual setup guide Signed-off-by: David Mehren --- docs/content/setup/manual-setup.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/content') diff --git a/docs/content/setup/manual-setup.md b/docs/content/setup/manual-setup.md index 9329f669..e32d6843 100644 --- a/docs/content/setup/manual-setup.md +++ b/docs/content/setup/manual-setup.md @@ -17,7 +17,7 @@ 1. Check if you meet the [requirements at the top of this document](#manual-installation). 2. Download the [latest release](https://hedgedoc.org/latest-release/) and extract it. Alternatively, you can use Git to clone the repository and checkout a release, e.g. with `git clone -b 1.7.2 https://github.com/hedgedoc/hedgedoc.git`. -3. Enter the directory and type `bin/setup`, which will install the dependencies and create example configs. +3. Enter the directory and execute `bin/setup`, which will install the dependencies and create example configs. 4. Configure HedgeDoc: To get started, you can use this minimal `config.json`: ```json { @@ -33,7 +33,7 @@ ``` It's also possible to use environment variables. For details, have a look at [the configuration documentation](../configuration.md). -5. *:octicons-light-bulb-16: If you used the release tarball for 1.7.0 or newer, this step can be skipped.* +5. *:octicons-light-bulb-16: If you use the release tarball for 1.7.0 or newer, this step can be skipped.* Build the frontend bundle by running `yarn run build`. 6. It is recommended to start your server manually once: ```shell @@ -41,7 +41,7 @@ ``` This way it's easier to see warnings or errors that might occur. You can leave out `NODE_ENV=production` for development. -7. If you used the example config, HedgeDoc should now be available at [http://127.0.0.1:3000](http://127.0.0.1:3000). +7. If you use the example config, HedgeDoc should now be available at [http://127.0.0.1:3000](http://127.0.0.1:3000). 8. Run the server as you like (node, forever, pm2, systemd, Init-Scripts). See [below](#systemd-unit-example) for an example using systemd. @@ -51,7 +51,7 @@ Before you upgrade, **always read the release notes**. You can find them on our [releases page](https://hedgedoc.org/releases/). -If you are upgrading HedgeDoc from an older version, follow these steps: +If you want to upgrade HedgeDoc from an older version, follow these steps: 1. Check if you still meet the [requirements at the top of this document](#requirements-on-your-server). 2. Ensure you read the [release notes](https://hedgedoc.org/releases/) of all versions between your current version -- cgit v1.2.3