Services on CC: Difference between revisions
Jump to navigation
Jump to search
| (19 intermediate revisions by the same user not shown) | |||
| Line 46: | Line 46: | ||
</pre> | </pre> | ||
==etherpad | ==etherpad== | ||
===installed=== | ===installed=== | ||
/opt/etherpad | /opt/etherpad/ | ||
runs as user <code>etherpad</code> | |||
===database=== | ===database=== | ||
sqlite | sqlite | ||
* 878MB on 7 Nov 2025 | |||
* 917MB on 11 Dec 2025 | |||
* 942MB on 23 Jan 2026 | |||
===systemd=== | |||
sudo systemctl status etherpad | |||
sudo systemctl start etherpad | |||
sudo systemctl stop etherpad | |||
sudo systemctl restart etherpad | |||
<pre> | |||
[Unit] | |||
Description=etherpad (real-time collaborative document editor) | |||
After=syslog.target network.target | |||
[Service] | |||
Type=simple | |||
User=etherpad | |||
Group=etherpad | |||
#WorkingDirectory=/opt/etherpad | |||
Environment=NODE_ENV=production | |||
#ExecStart=pnpm run prod | |||
ExecStart=/bin/sh /opt/etherpad/bin/run.sh | |||
Restart=always | |||
StandardOutput=append:/var/log/etherpad/etherpad.log | |||
StandardError=append:/var/log/etherpad/etherpad-error.log | |||
[Install] | |||
WantedBy=multi-user.target | |||
</pre> | |||
===logs=== | |||
sudo tail -f /var/log/etherpad/etherpad.log | |||
sudo tail -f /var/log/etherpad/etherpad-error.log | |||
===backups=== | |||
* crontab: every night at 5.55 <code>/opt/etherpad/etherpad.db</code> is copied to <code>/opt/etherpad/etherpad_backup.db</code> (just in case) | |||
===nginx=== | ===nginx=== | ||
<pre> | |||
# ---------------------------------------------------- | |||
# ETHERPAD | |||
location /pad/ { | |||
proxy_buffering off; | proxy_buffering off; | ||
proxy_set_header Host $host; | proxy_set_header Host $host; | ||
| Line 67: | Line 112: | ||
proxy_set_header X-Real-IP $remote_addr; | proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $remote_addr; # EP logs to show the actual remote IP | proxy_set_header X-Forwarded-For $remote_addr; # EP logs to show the actual remote IP | ||
proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when | proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when htt> | ||
# recommended with keepalive connections | # recommended with keepalive connections | ||
proxy_http_version 1.1; | proxy_http_version 1.1; | ||
| Line 74: | Line 119: | ||
# upstream | # upstream | ||
proxy_pass http://127.0.0.1:9001/; | proxy_pass http://127.0.0.1:9001/; | ||
} | |||
# make sure that /pad also works | |||
location = /pad { | |||
return 301 /pad/; | return 301 /pad/; | ||
} | |||
</pre> | </pre> | ||
| Line 110: | Line 136: | ||
/opt/wiki/ | /opt/wiki/ | ||
* php: | * php: php8.4 | ||
* database: mariadb | |||
* installation on Servus server: [[Migrate Mediawiki]] | |||
===nginx=== | |||
Followed this for the nginx config: https://www.mediawiki.org/wiki/Manual:Short_URL/Nginx | |||
==octomode== | ==octomode== | ||
| Line 135: | Line 167: | ||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||
</pre> | </pre> | ||
* installation log: [[Octomode]] | |||
==wiki-to-print== | ==wiki-to-print== | ||
/ | /opt/wiki-to-print/ | ||
* flask application | * flask application | ||
* /etc/systemd/system/ | * /etc/systemd/system/wiki-to-print.service | ||
<pre> | <pre> | ||
[Unit] | [Unit] | ||
Description= | Description=wiki-to-print | ||
After=network.target | After=network.target | ||
[Service] | [Service] | ||
User= | User=wikitoprint | ||
WorkingDirectory=/ | WorkingDirectory=/opt/wiki-to-print/wiki-to-print/ | ||
ExecStart=/usr/bin/make server | ExecStart=/usr/bin/make server | ||
Restart=always | Restart=always | ||
| Line 164: | Line 197: | ||
33 3 * * * mysqldump --user=wiki --password=XXX wikidb > /var/www/html/wiki/ wikidb_backup.sql | 33 3 * * * mysqldump --user=wiki --password=XXX wikidb > /var/www/html/wiki/ wikidb_backup.sql | ||
33 3 * * * mysqldump --user=wiki --password=XXX wikidb --xml > /var/www/html/wiki/wikidb_backup.xml | 33 3 * * * mysqldump --user=wiki --password=XXX wikidb --xml > /var/www/html/wiki/wikidb_backup.xml | ||
* installation log: [[How to install wiki-to-print?]] | |||
==cobbled-paths== | ==cobbled-paths== | ||
| Line 174: | Line 209: | ||
/home/manetta/public_html/ | /home/manetta/public_html/ | ||
/home/simoon/public_html/ | /home/simoon/public_html/ | ||
===home folders=== | |||
<pre> | |||
# user directories!! public_html folders | |||
location ~ ^/~(.+?)(/.*)?$ { | |||
add_header Access-Control-Allow-Origin *; | |||
alias /home/$1/public_html$2; | |||
index index.html index.htm; | |||
autoindex on; | |||
} | |||
</pre> | |||
For the public_html folders to work after a fresh install, the permissions of home folders need to be adjusted (??): | |||
sudo chmod 755 /home/* | |||
==certbot== | ==certbot== | ||
Latest revision as of 13:09, 23 January 2026
debian
- OVH server: debian 11 (bullseye)
- Servus server: debian 12 (bookworm)
- latest stable: debian 13 (trixie)
apt
OVH server
- sources: /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main deb-src http://deb.debian.org/debian bullseye main deb http://security.debian.org/debian-security bullseye-security main deb-src http://security.debian.org/debian-security bullseye-security main deb http://deb.debian.org/debian bullseye-updates main deb-src http://deb.debian.org/debian bullseye-updates main deb http://deb.debian.org/debian bullseye-backports main deb-src http://deb.debian.org/debian bullseye-backports main
backports were added for cobbled-paths installation?
i think we can do without when we upgrade to trixie on the Servus server
Servus server
upgrading from bookworm to trixie: https://www.debian.org/releases/trixie/release-notes/upgrading.en.html
- sources: /etc/apt/sources.list.d/debian.sources
Types: deb URIs: https://deb.debian.org/debian Suites: trixie trixie-updates Components: main non-free-firmware non-free contrib Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg Types: deb URIs: https://security.debian.org/debian-security Suites: trixie-security Components: main non-free-firmware non-free contrib Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
etherpad
installed
/opt/etherpad/
runs as user etherpad
database
sqlite
- 878MB on 7 Nov 2025
- 917MB on 11 Dec 2025
- 942MB on 23 Jan 2026
systemd
sudo systemctl status etherpad sudo systemctl start etherpad sudo systemctl stop etherpad sudo systemctl restart etherpad
[Unit] Description=etherpad (real-time collaborative document editor) After=syslog.target network.target [Service] Type=simple User=etherpad Group=etherpad #WorkingDirectory=/opt/etherpad Environment=NODE_ENV=production #ExecStart=pnpm run prod ExecStart=/bin/sh /opt/etherpad/bin/run.sh Restart=always StandardOutput=append:/var/log/etherpad/etherpad.log StandardError=append:/var/log/etherpad/etherpad-error.log [Install] WantedBy=multi-user.target
logs
sudo tail -f /var/log/etherpad/etherpad.log sudo tail -f /var/log/etherpad/etherpad-error.log
backups
- crontab: every night at 5.55
/opt/etherpad/etherpad.dbis copied to/opt/etherpad/etherpad_backup.db(just in case)
nginx
# ----------------------------------------------------
# ETHERPAD
location /pad/ {
proxy_buffering off;
proxy_set_header Host $host;
# optional headers
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr; # EP logs to show the actual remote IP
proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when htt>
# recommended with keepalive connections
proxy_http_version 1.1;
# WebSocket support
proxy_set_header Upgrade $http_upgrade;
# upstream
proxy_pass http://127.0.0.1:9001/;
}
# make sure that /pad also works
location = /pad {
return 301 /pad/;
}
installation on Servus server
mediawiki
/var/www/html/wiki/
/opt/wiki/
- php: php8.4
- database: mariadb
- installation on Servus server: Migrate Mediawiki
nginx
Followed this for the nginx config: https://www.mediawiki.org/wiki/Manual:Short_URL/Nginx
octomode
/var/www/octomode/
- flask application
- /etc/systemd/system/octomode.service
[Unit] Description=Collective PDF rendering environment After=network.target [Service] User=octomode WorkingDirectory=/var/www/octomode ExecStart=/usr/bin/make action Restart=always StandardOutput=append:/var/log/octomode/octomode.log StandardError=append:/var/log/octomode/octomode.log [Install] WantedBy=multi-user.target
- installation log: Octomode
wiki-to-print
/opt/wiki-to-print/
- flask application
- /etc/systemd/system/wiki-to-print.service
[Unit] Description=wiki-to-print After=network.target [Service] User=wikitoprint WorkingDirectory=/opt/wiki-to-print/wiki-to-print/ ExecStart=/usr/bin/make server Restart=always [Install] WantedBy=multi-user.target
backups through crontab:
# every night at 3:33 33 3 * * * mysqldump --user=wiki --password=XXX wikidb > /var/www/html/wiki/ wikidb_backup.sql 33 3 * * * mysqldump --user=wiki --password=XXX wikidb --xml > /var/www/html/wiki/wikidb_backup.xml
- installation log: How to install wiki-to-print?
cobbled-paths
/var/www/cobbled-paths/
nginx
/var/www/html/ /home/manetta/public_html/ /home/simoon/public_html/
home folders
# user directories!! public_html folders
location ~ ^/~(.+?)(/.*)?$ {
add_header Access-Control-Allow-Origin *;
alias /home/$1/public_html$2;
index index.html index.htm;
autoindex on;
}
For the public_html folders to work after a fresh install, the permissions of home folders need to be adjusted (??):
sudo chmod 755 /home/*
certbot
auto-renewal through crontab:
# every night at 04:44 44 4 * * * certbot renew --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx" --quiet