Commit fdc05d

2025-08-21 09:18:41 Kevin Jung Park: First publish
linux/docker containers/wiki & documentation/documize.md ..
@@ 1,1 1,160 @@
# Documize
+ <br/>
+
+ # Introduction
+
+ This guide explains how to install **Documize Community** on a fresh Ubuntu Server (20.04/22.04/24.04), set up PostgreSQL, and configure everything so Documize is ready to use.
+
+ ---
+
+ ## 1. Update the system
+ Always start with the latest updates:
+ ```bash
+ sudo apt update && sudo apt upgrade -y
+ ```
+ <br/>
+
+ ## 2. Install required dependencies
+ Always start with the latest updates:
+ ```bash
+ sudo apt install -y wget curl ca-certificates tar
+ ```
+ <br/>
+
+ ## 3. Install PostgreSQL
+ Run this command to install PostgreSQL:
+ ```bash
+ sudo apt install -y postgresql postgresql-contrib
+ ```
+
+ Enable and start PostgreSQL:
+
+ ```bash
+ sudo systemctl enable --now postgresql
+ ```
+
+ Check status:
+ ```bash
+ sudo systemctl status postgresql
+ ```
+ <br/>
+
+ ## 4. Create PostgreSQL database and user for Documize
+ Switch to the PostgreSQL admin account:
+ ```bash
+ sudo -u postgres psql
+ ```
+
+ Inside the PostgreSQL shell, run the following (replace the password with a strong one):
+ ```bash
+ CREATE DATABASE documize;
+ CREATE USER docuser WITH ENCRYPTED PASSWORD 'StrongPasswordHere';
+ GRANT ALL PRIVILEGES ON DATABASE documize TO docuser;
+ \q
+ ```
+ <br/>
+
+ ## 5. (Optional) Allow remote connections
+ If Documize runs on a different host than PostgreSQL, configure it
+ >| ## Instructions
+ >|
+ >| Edit PostgreSQL config:
+ >| ```bash
+ >| sudo nano /etc/postgresql/*/main/postgresql.conf
+ >| ```
+ >|
+ >| Set:
+ >| ```bash
+ >| listen_addresses = '*'
+ >| ```
+ >|
+ >| Edit host-based authentication:
+ >| ```bash
+ >| sudo nano /etc/postgresql/*/main/pg_hba.conf
+ >| ```
+ >|
+ >| Add (adjust subnet if needed):
+ >| ```bash
+ >| host documize docuser 0.0.0.0/0 md5
+ >| ```
+ >|
+ >| Restart PostgreSQL:
+ >| ```bash
+ >| sudo systemctl restart postgresql
+ >| ```
+
+ ## 6. Download Documize
+ Check [the Documize Community releases](https://https://github.com/documize/community/releases) for the latest version. Example:
+
+ ```bash
+ wget https://github.com/documize/community/releases/download/v5.0.0/documize-community-linux-amd64.tar.gz
+ tar -zxvf documize-community-linux-amd64.tar.gz
+ cd documize-community-linux-amd64
+ ```
+ <br/>
+
+ ## 7. Configure Documize
+ Documize uses the DATABASE_URL environment variable.
+ Set it like this:
+ ```bash
+ export DATABASE_URL=postgres://docuser:StrongPasswordHere@localhost:5432/documize?sslmode=disable&client_encoding=UTF8
+ ```
+
+ To keep this permanent, add it to your shell profile:
+ ```bash
+ echo 'export DATABASE_URL=postgres://docuser:StrongPasswordHere@localhost:5432/documize?sslmode=disable&client_encoding=UTF8' | sudo tee -a /etc/environment
+ ```
+
+ ## 8. Run Documize
+ Start Documize manually:
+ ```bash
+ ./documize --database-url "$DATABASE_URL"
+ ```
+
+ By default, it runs on port 8080.
+ Open in browser:
+ `http://SERVER-IP:8080`
+
+ Follow the setup wizard to create your admin account.
+ <br/>
+
+ ## 9. (Optional) Run Documize as a systemd service
+ To keep Documize running in the background and auto-start on boot.
+ Create a service file:
+ ```bash
+ sudo nano /etc/systemd/system/documize.service
+ ```
+
+ Add:
+ ```bash
+ [Unit]
+ Description=Documize Community
+ After=network.target postgresql.service
+
+ [Service]
+ Type=simple
+ WorkingDirectory=/home/ubuntu/documize-community-linux-amd64
+ ExecStart=/home/ubuntu/documize-community-linux-amd64/documize --database-url=postgres://docuser:StrongPasswordHere@localhost:5432/documize?sslmode=disable&client_encoding=UTF8
+ Restart=always
+ User=ubuntu
+
+ [Install]
+ WantedBy=multi-user.target
+ ```
+
+ Reload systemd and enable:
+ ```bash
+ sudo systemctl daemon-reexec
+ sudo systemctl enable --now documize
+ ```
+
+ Check status:
+ ```bash
+ sudo systemctl status documize
+ ```
+ <br>
+
+ :::success
+ # Installation completed!
+ Documost is now installed.
+ :::
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9