You've already forked dokuwiki-ubuntu
139 lines
2.9 KiB
Markdown
139 lines
2.9 KiB
Markdown
|
|
# DokuWiki for Ubuntu 24.04
|
|||
|
|
[](#)
|
|||
|
|
[](#)
|
|||
|
|
[](#)
|
|||
|
|
[](#)
|
|||
|
|
[](#)
|
|||
|
|
[](./LICENSE)
|
|||
|
|
|
|||
|
|
Install DokuWiki on Ubuntu 24.04 server.
|
|||
|
|
|
|||
|
|
This is not a demo and not a quick experiment.
|
|||
|
|
This is a production installer — designed for long-term use with hardened configs.
|
|||
|
|
|
|||
|
|
## Why this installer exists
|
|||
|
|
Many tutorials skip permissions, hardening, and caching considerations. This one does it correctly and securely.
|
|||
|
|
|
|||
|
|
## What this installer does
|
|||
|
|
✔ Creates isolated host + directory
|
|||
|
|
✔ Applies correct permissions
|
|||
|
|
✔ Removes installer files when done
|
|||
|
|
✔ Supports HTTPS, caching and rate rules
|
|||
|
|
|
|||
|
|
## What this installer does *NOT* do
|
|||
|
|
It won’t stop you from running the script without reading the documentation like there’s no tomorrow.
|
|||
|
|
Skip the README, and whatever happens next is your headache, not a bug report.
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## Requirements
|
|||
|
|
|
|||
|
|
You must already have:
|
|||
|
|
|
|||
|
|
✔ Nginx installed
|
|||
|
|
✔ PHP-FPM running
|
|||
|
|
|
|||
|
|
### Optional Installers (if you need them — saves you some googling)
|
|||
|
|
|
|||
|
|
[Install Nginx + PHP-FPM on Ubuntu](https://git.x-files.dk/webserver/nginx-ubuntu)
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## 1. Download
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
git clone https://git.x-files.dk/webapps/dokuwiki-ubuntu.git
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
cd dokuwiki-ubuntu
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## 2. Install
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
sudo ./dokuwikiinstall <domain>
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
Example:
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
sudo ./dokuwikiinstall wiki.example.com
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
Generated paths:
|
|||
|
|
|
|||
|
|
| File/Dir | Purpose |
|
|||
|
|
|---|---|
|
|||
|
|
| `/var/www/<domain>` | DokuWiki installation |
|
|||
|
|
| `/etc/nginx/conf.d/<domain>.conf` | Virtualhost |
|
|||
|
|
| `/tmp/dokuwiki-postinstall` | Hardening script |
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## 3. Web Setup
|
|||
|
|
|
|||
|
|
Visit:
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
http://<domain>/install.php
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
Create admin + finish setup.
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## 4. Post‑Install Hardening
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
sudo /tmp/dokuwiki-postinstall
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
This script:
|
|||
|
|
|
|||
|
|
✔ Removes installer
|
|||
|
|
✔ Secures permissions
|
|||
|
|
✔ Applies sane defaults
|
|||
|
|
✔ Makes the wiki production‑safe
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## HTTPS
|
|||
|
|
|
|||
|
|
Enable TLS with:
|
|||
|
|
|
|||
|
|
https://git.x-files.dk/webserver/nginx-snippets/src/branch/main/hostfiles/dokuwiki.443.conf
|
|||
|
|
|
|||
|
|
Optional caching (disabled by default):
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
# include /etc/nginx/nginx-snippets/cache-open-files.conf;
|
|||
|
|
# include /etc/nginx/nginx-snippets/cache-statics.conf;
|
|||
|
|
# include /etc/nginx/nginx-snippets/cache-js-css.conf;
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## Troubleshooting
|
|||
|
|
|
|||
|
|
| Issue | Cause | Fix |
|
|||
|
|
|---|---|---|
|
|||
|
|
| Nginx restart fails | Config syntax | `nginx -t` |
|
|||
|
|
| PHP errors | Wrong FPM version | `systemctl status php8.3-fpm` |
|
|||
|
|
| install.php still present | Postinstall not run | `sudo /tmp/dokuwiki-postinstall` |
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
### More Information
|
|||
|
|
|
|||
|
|
More guides and documentation can be found on [wiki.x-files.dk](https://wiki.x-files.dk)
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
### License
|
|||
|
|
Licensed under the [MIT License](./LICENSE).
|
|||
|
|
|
|||
|
|
---
|