Skip to content

Instantly share code, notes, and snippets.

@noraj noraj/README.md
Created Jan 3, 2018

Embed
What would you like to do?
Guides and scripts for installing StackEdit

Installing StackEdit on Debian 8

Pre-requisites


  • Start by update repo list
sudo apt-get update
  • Install dependencies
sudo apt-get install git nodejs
  • Update npm
sudo npm install npm -g
  • Continue to install dependencies
sudo npm install --global gulp
sudo npm install --global bower

StackEdit installation

  • Install StackEdit
cd /opt
sudo git clone https://github.com/benweet/stackedit.git stackedit
cd stackedi
sudo npm install
sudo bower install --allow-root

Make a daemon for StackEdit

  • Choose an internal port
export PORT=80
  • Create a systemd service file
sudo vim /usr/lib/systemd/system/stackedit.service
  • If the folder doesn't exist create it
sudo mkdir -p /usr/lib/systemd/system
  • Add the following code in the stackedit.service file
Description=Stackedit daemon

[Service]
ExecStart=/usr/bin/nodejs /opt/stackedit/server.js
Restart=always

[Install]
WantedBy=multi-user.target
  • Enable the service
sudo systemctl enable stackedit.service
  • Reload systemd daemon and start the stackedit service
sudo systemctl daemon-reload
sudo systemctl start service.service
  • Verify the StackEdit service is running
sudo netstat -tnlup | grep 3000
tcp6       0      0 :::3000                 :::*                    LISTEN      12413/nodejs

Post-configuration

If you need to modify some StackEdit default behaviour, you may need to edit /opt/stackedit/public/res/constants.js. For example to change the Github OAuth url (default is localhost).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.