---
title: "How to Install HedgeDoc on Ubuntu Server - CloudBlast"
description: "How to Install HedgeDoc on Ubuntu Server"
url: "https://cloudblast.io/zh/article/How-to-Install-HedgeDoc-on-Ubuntu-Server"
language: "zh-CN"
---

博客

# How to Install HedgeDoc on Ubuntu Server

注册即享 5€ 免费余额

注册 CloudBlast，即可获得 5€ 云端积分用于部署您的 VPS

[领取 5€ 免费额度](https://console.cloudblast.io/auth/login?ref=2)

-   [返回](https://cloudblast.io/zh)
-   [所有文章](https://cloudblast.io/zh/blog)

2024-08-29

### How to Install HedgeDoc on Ubuntu Server

tutorials

**Elevate your team's productivity with HedgeDoc, the ultimate real-time collaborative markdown editor. Follow our comprehensive guide to set up your own HedgeDoc instance on Ubuntu Server.**

In the digital age, seamless collaboration is key to successful projects. HedgeDoc offers a secure, open-source platform for teams to create, edit, and share markdown documents in real-time. By hosting your own HedgeDoc server, you ensure data privacy while enjoying the benefits of collaborative editing.

Before we begin, make sure you have:

-   A server running the latest Ubuntu Server
-   Root access or sudo privileges
-   Basic command line knowledge

**Step 1: Prepare Your System**

Start by updating your system and installing necessary dependencies:

> sudo apt update
> sudo apt upgrade
> sudo apt-get install git build-essential pkg-config curl
> sudo apt-get install libssl-dev libffi-dev python3-dev

**Step 2: Install Node.js**

HedgeDoc requires Node.js. Install it using NVM (Node Version Manager):

> curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
> source ~/.bashrc
> nvm install node

**Step 3: Set Up PostgreSQL**

Install and configure PostgreSQL for HedgeDoc:

> sudo apt-get install postgresql
> sudo -u postgres psql

Once in the PostgreSQL prompt, create a user and database:

> CREATE USER username WITH PASSWORD 'password';
> CREATE DATABASE hedgedoc;
> GRANT ALL PRIVILEGES ON DATABASE hedgedoc TO username;
> \\q

**Step 4: Install HedgeDoc**

Clone the HedgeDoc repository and install its dependencies:

> git clone https://github.com/hedgedoc/hedgedoc.git
> cd hedgedoc
> npm install

**Step 5: Configure HedgeDoc**

Create and edit the configuration file:

> cp .env.example .env
> nano .env

Update the following lines in the .env file:

> DB\_TYPE=postgres
> DB\_HOST=localhost
> DB\_PORT=5432
> DB\_NAME=hedgedoc
> DB\_USERNAME=username
> DB\_PASSWORD=password

**Step 6: Launch HedgeDoc**

Build and start your HedgeDoc instance:

> npm run build
> npm start

**Congratulations! Your HedgeDoc server is now up and running.**

By following these steps, you've successfully set up a personal HedgeDoc instance. This powerful tool enables real-time collaboration on markdown documents, enhancing your team's productivity and creativity. Remember to configure SSL for added security, ensuring your collaborative efforts remain private and protected.

Embrace the future of collaborative editing with HedgeDoc, and transform the way your team works together!

分享

## 继续阅读

[2026-07-25 How to Install and Set Up Mailcow on Ubuntu and Debian VPS tutorials](https://cloudblast.io/article/how-to-install-and-setup-mailcow-on-ubuntu-and-debian-vps)

[2026-07-25 How to Install Chatwoot on the Latest Ubuntu and Debian Server tutorials](https://cloudblast.io/article/how-to-install-chatwoot-on-ubuntu-and-debian-server)

[2026-07-25 How to Install Mattermost on the Latest Ubuntu and Debian Server tutorials](https://cloudblast.io/article/how-to-install-mattermost-on-ubuntu-and-debian-server)

[2026-07-25 How to Install RustDesk on the Latest Ubuntu and Debian Server tutorials](https://cloudblast.io/article/how-to-install-rustdesk-on-ubuntu-and-debian-server)
