Server move

From Creative Crowds wiki
Jump to navigation Jump to search

Server move

Notes here: Services on CC

  • ✅ migrate etherpad
    • ✅ install etherpad (/opt/etherpad/)
    • ✅ configure nginx
    • ✅ set etherpad up as a systemd background process
    • ✅ test migration of database
    • ✅ migrate the database
  • ✅ install mediawiki (/var/www/wiki/, version 1.45)
    • ✅ configure nginx
    • ✅ install php + php-fpm + mariadb
    • ✅ migrate the extensions
    • re-download all extensions not needed, only EtherpadLite
    • ✅ applied the hack again to EtherpadLite to hide ip-adresses
    • ✅ migrate the images folder
    • ✅ make new database
    • ✅ test migration of database
    • ✅ migrate the database
    • ✅ check extensions
    • update URL in Localsettings
      • ✅ check if etherpadlite extension works
    • ✅ check if wiki works again!
    • ✅ check CreatePage extension, disabled now as it threw an error
  • ✅ enable home folders
  • ✅ migrate home folders
  • ✅ migrate /var/www/html/
  • ✅ install octomode (/opt/octomode/, running on port 3333)
    • ✅ update pad URL in .env file
    • test if octomode works
  • ✅ install wiki-to-print (/opt/wiki-to-print/, running on port 4444)
    • test if wiki-to-print works
    • ✅ update wiki URL in config.json
    • ✅ update wiki URL in MediaWiki:Common.js
  • change DNS of cc.practices.tools (point to our servus ip-address)
  • enable HTTPS
    • ✅ install certbot
    • ✅ activate cronjob
  • decide on http/https redirect in nginx
  • ✅ redirect / to /wiki/
  • check if https://cc.vvvvvvaria.org still works
  • ✅ let ServPub people know that the new URL is https://cc.practices.tools

SSH

Old server:

Host cc
Hostname 51.195.117.20
User USERNAME
localcommand xtermcontrol --bg "#ffffe0"

New server:

Host cc
Hostname 193.170.194.207
User USERNAME
localcommand xtermcontrol --bg "#ffff00"

Notes from the server move day

23 January 2026

prep
on new CC server, install ssh shortcut to old CC server:

nano .ssh/config

Host cc_ovh
Hostname 51.195.117.20
User mb

move!
mb@cc:~$ sudo systemctl stop octomode
mb@cc:~$ sudo systemctl stop wiki2print
mb@cc:~$ sudo systemctl stop etherpad-lite
mb@cc:~$ sudo systemctl stop nginx

mediawiki
mb@cc:/var/www/html/wiki$ mysqldump --user=wiki --password=XXX wikidb > wikidb_backup.23-jan-2026-10:00CEST.sql
manetta@cc:~$ scp cc_ovh:/var/www/html/wiki/wikidb_backup.23-jan-2026-10:00CEST.sql /var/www/wiki/
manetta@cc:/var/www/wiki$ mysql -u wiki -p wikicc < wikidb_backup.23-jan-2026-10\:00CEST.sql

mb@cc:/var/www/html/wiki$ tar -cvf images.tar images/
mb@cc:/var/www/html/wiki$ ls -lah
-rw-r--r--  1 mb       mb       918M Jan 23 09:03 images.tar
manetta@cc:/var/www/wiki$ scp cc_ovh:/var/www/html/wiki/images.tar /var/www/wiki/
manetta@cc:/var/www/wiki$ mv images images-prev
manetta@cc:/var/www/wiki$ tar -xf images.tar 
manetta@cc:/var/www/wiki$ sudo chown -R www-data:cc images

manetta@cc:/var/www/wiki$ nano LocalSettings.php
change databasename to the new one

manetta@cc:/var/www/wiki$ php maintenance/run.php update
everything works! but.. images don't load...
debugging it here: http://193.170.194.207/wiki/Migrate_Mediawiki#Images_don't_load

moving folders & files

in /var/www/html

copying to /var/www/html
* /var/www/html/conversation-practice-shapes-tools-shapes-practice_17-11-2024.mp3
* /var/www/html/creative-crowds-outlined.svg
* /var/www/html/ecologies-of-dissemination
* /var/www/html/favicon.ico TODO: change favicon to the new CC logo?
* /var/www/html/fonts TODO: remove source code, update wiki page fonts with new URLs
* /var/www/html/index.html
* /var/www/html/pdf

copying to /var/www/traces
* /var/www/html/collective-graphic-design-octomode.html
* /var/www/html/creative-crowd.png
* /var/www/html/creative-crowds.svg
* /var/www/html/index-v0.html

ignoring
* /var/www/html/wiki
* /var/www/html/wiki_db_dump_16-02-2023.sql

in /home

copying to /home/$folders
* cc_ovh:/home/friends/public_html -> cc:/home/friend/public_html (note: I deleted public_html/venv)
* cc_ovh:/home/mb -> cc:/home/manetta
* cc_ovh:/home/mb/public_html -> cc:/home/manetta/public_html (note: I preserved hello.html)
* cc_ovh:/home/simoon/public_html -> cc:/home/simoon/public_html

etherpad
manetta@cc:/opt/etherpad$ sudo systemctl stop etherpad
manetta@cc:/opt/etherpad$ sudo mv etherpad.db etherpad-prev.db
manetta@cc:/opt/etherpad$ cd ~
manetta@cc:~$ scp cc_ovh:/srv/etherpad-lite/etherpad.db .
manetta@cc:~$ sudo mv etherpad.db /opt/etherpad/
manetta@cc:~$ cd /opt/etherpad/
manetta@cc:/opt/etherpad$ sudo chown etherpad:etherpad etherpad.db
manetta@cc:/opt/etherpad$ sudo systemctl start etherpad
works!

octomode
did not need anything

wiki-to-print
changed wiki URL in /opt/wiki-to-print/config.json
change wiki URL in MediaWiki:Common.js

/traces/
manetta@cc:/var/www$ mkdir traces
manetta@cc:/var/www$ sudo chown -R www-data:cc traces/
manetta@cc:/var/www$ sudo nano /etc/nginx/sites-enabled/default
added this to the nginx config:
        location /traces {
                alias /var/www/traces;
                autoindex on;
        }
manetta@cc:/var/www$ sudo systemctl reload nginx
http://193.170.194.207/traces/
:)

/fonts/
manetta@cc:/var/www$ mkdir fonts
manetta@cc:/var/www$ sudo chown -R www-data:cc fonts/
manetta@cc:/var/www$ sudo nano /etc/nginx/sites-enabled/default 
manetta@cc:/var/www$ sudo systemctl reload nginx