Run documize as Linux Service (systemd)

I like documize – a lightweight confluence like documentation platform that’s easy to setup. However, their documentation about running the self hosted version as a Linux service wasn’t as great for someone new to Linux. After searching for a bit and trying different things, I was able to get documize to run as a linux service and here is how I got it done on Ubuntu.

At the end of their installation guide they gave you what should go in the script but no instruction how to get it running. This is what needs to be done…

Create a file with .service extension, e.g. documize.service and enter the following:

[Unit]
Description=documize
After=network.target

[Service]
Type=simple
ExecStart="<Replace with your documize directory>/documize-community-linux-amd64" "<Replace with your documize directory>/config-mysql.conf"

[Install]
WantedBy=multi-user.target

Note 1: This has less instructions than the documize site has
Note 2: Make sure to replace <Replace with your documize directory> with your documize installation folder

Save the file to /etc/systemd/system folder and give it 644 permission

sudo chmod 644 /etc/systemd/system/documize.service

Permissions of 644 means the owner of the file has read and write access, while the group members and other users only have read access

Start the service and check its status

sudo systemctl start documize
sudo systemctl status documize

If it started successfully, you should see something like this. Note the last line, depending on your configuration it should say listening on [port] where [port] will have the number as per your configuration.

Finally, enable the service so the service starts whenever the system boots

sudo systemctl enable documize

Reboot the machine and check its status again or browse to the documize site to make sure it’s working