Inkdown

Deploy to Linux

Most Markdown editors are standalone, but the standalone mode has many inconveniences in multi end synchronization and requires the use of third-party tools. It is also not conducive to editing on mobile devices(developing). If you have your own server, it is recommended to deploy the Inkdown editor to your server. The online version of Inkdown has more convenient document sharing capabilities.

The Inkdown online version can seamlessly import local Markdown documents into the editor in bulk using the Chrome file system, or export online documents to the local machine in standard Markdown format with just one click. Therefore, it is also recommended that you use Chrome or Edge browser. (The chrome file system is only valid under HTTPS)

The online version of Indkown caches documents and images to the browser's indexddb, which makes the response speed of Inkdown online version basically consistent with that of standalone software, and there is no delay in operation. The server-side is only used for data backup, as when you manually clear the browser cache, indexddb will be cleared.

In Chrome or Edge browsers, the storage space of indexddb is close to the host hard drive, so you don't need to worry about insufficient cache space.

Storage and indexddb also bring another benefit, which is that in extreme cases, when your server fails and cannot be recovered, documents in the browser cache can still be exported to the local machine to preserve your document data. Just install the Inkdown program again, use the original domain name to open the homepage, and you can see the export button on the login page. Click it to export your document data. As shown below:

image

Each deployment version also supports 5 sub accounts, and the data between accounts is isolated from each other.

Modern browsers all support PWA technology, and installing the online version of Inkdown on the desktop will provide a user experience that is infinitely similar to that of a desktop editor.

Start deployment

The deployment process of Inkdown is very simple, supporting direct deployment and using Docker deployment. Inkdown has added seamless upgrade capabilities. When a new version is released, you only need to click on the upgrade button in the interface.

We suggest that you use the following version of Linux.

Direct Deployment

sh
# Need unzip decompression program or yum install unzip
apt install unzip
# Install nodejs management tool
curl -fsSL https://fnm.vercel.app/install | bash
source $HOME/.bashrc
# Install nodejs 20
fnm install 20
# Download and install Inkdown online version
curl -fsSL https://www.inkdown.me/latest | bash
cd inkdown
pnpm i
pnpm i pm2 --global
# Starting network services
pm2 start ecosystem.config.cjs

Inkdown listens to port3006by default, and you can change it in thepackage.jsondirectory at the root of the project.

json
{
  "scripts": {
    // Modify port here
    "start": "node scripts/start.js && PORT=3006 remix-serve ./build/server/index.js"
  }
}

At this point, Inkdown has been deployed. Open it through a browser and use it directly!

Please note that after starting inkdown, a random secret field will be generated in the package.json ->inkdown field. This field cannot be deleted, and it is also recommended to save it. When backing up database files, if the secret is changed and the original account is still unavailable, you need to backfill the secret in package.json ->inkdown.

Deploying using Docker

sh
apt install unzip
# Download and install Inkdown online version
curl -fsSL https://www.inkdown.me/latest | bash
cd inkdown
## Building an image
docker build -t inkdown-image .
## Start container
docker run -d --name inkdown -p 3006:3006 inkdown-image

We will expose the Inkdown port to the 3006 port of the host, and you can change it as needed.

In most cases, we will use nginx as a proxy, and the following nginx configurations can be used as a reference:

nginx
server {
    listen      80;
    # listen      443 ssl;
    # ssl_certificate path.pem;
    # ssl_certificate_key path.key;
    # ssl_session_timeout 5m;
    # ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    # ssl_prefer_server_ciphers on;
    server_name  inkdown.yourdomain.com;
    gzip on;
    gzip_comp_level 6;
    gzip_min_length 1k;
    gzip_static on;
    gzip_types
    application/javascript
    text/javascript
    text/css
    application/json
    application/manifest+json
    image/svg+xml;
    client_max_body_size 100M;
    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host  $http_host;
        proxy_set_header X-Nginx-Proxy true;
        proxy_http_version 1.1;
        proxy_pass    http://localhost:3006; # 端口
    }
}