User Tools

Site Tools


servers:linux:nginx:friendica

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servers:linux:nginx:friendica [2025/12/22 02:31] Sean Rhoneservers:linux:nginx:friendica [2026/01/01 04:41] (current) – [Etc] Sean Rhone
Line 11: Line 11:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-  * [[linux:distros:server:ubuntu_server|Ubuntu Server]]+  * [[linux:distros:server:opensuse_tumbleweed_server|openSUSE Tumbleweed (Server)]]
   * [[servers:linux:nginx_php_php-fpm|nginx + PHP + PHP-FPM]]   * [[servers:linux:nginx_php_php-fpm|nginx + PHP + PHP-FPM]]
   * [[servers:linux:nginx:lets_encrypt|Certbot (Let's Encrypt)]]   * [[servers:linux:nginx:lets_encrypt|Certbot (Let's Encrypt)]]
Line 21: Line 21:
   * https://wiki.friendi.ca/docs/install#requirements   * https://wiki.friendi.ca/docs/install#requirements
  
-  sudo apt install composer php-curl php-gd php-gmp php-mbstring php-intl php-mysql php-zip+  sudo zypper install php-composer2 php8-curl php-gd php8-gmp php8-pdo php8-mbstring php8-intl php8-mysql php8-zip php8-openssl php8-fileinfo php8-posix
  
 ====== Download Source ====== ====== Download Source ======
Line 27: Line 27:
   * https://github.com/friendica/friendica/commits/develop/   * https://github.com/friendica/friendica/commits/develop/
  
-  sudo git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica.git' '/var/www/social' && sudo chown -R 'www-data':'www-data' '/var/www/social' && sudo chmod -R '0755' '/var/www/social'+  sudo git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica.git' '/srv/www/social' && sudo chown -R 'wwwrun':'www' '/srv/www/social' && sudo chmod -R '0755' '/srv/www/social'
  
 ===== Addons ===== ===== Addons =====
Line 34: Line 34:
   * :!: Required for ''composer install'' even without any addons enabled   * :!: Required for ''composer install'' even without any addons enabled
  
-  sudo git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica-addons.git' '/var/www/social/addon' && sudo chown -R 'www-data':'www-data' '/var/www/social/addon' && sudo chmod -R '0755' '/var/www/social/addon'+  sudo git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica-addons.git' '/srv/www/social/addon' && sudo chown -R 'wwwrun':'www' '/srv/www/social/addon' && sudo chmod -R '0755' '/srv/www/social/addon'
  
 ====== Environment ====== ====== Environment ======
Line 40: Line 40:
 ===== Composer ===== ===== Composer =====
  
-  sudo su 'www-data' -s '/bin/bash'+  sudo su 'wwwrun' -s '/bin/bash'
  
-  cd '/tmp' && '/usr/bin/composer' --working-dir='/var/www/social' --no-cache install --no-dev+  cd '/tmp' && '/usr/bin/composer' --working-dir='/srv/www/social' --no-cache install --no-dev
  
   exit   exit
- 
-===== php-json-ld Fix ===== 
- 
-  * 2025/12/22: ''git.friendi.ca'' requires authentication and fails during ''composer install'' 
-  * [[https://github.com/friendica/friendica/issues/15340|#15340]] 
- 
-  nano '/var/www/social/composer.lock' 
- 
-<code> 
-                "url": "https://github.com/digitalbazaar/php-json-ld.git", 
-                "reference": "fe18c3f2ce47f30ace904ef58e7416f933be25e1"</code> 
- 
-  friendica/json-ld 
- 
-<code> 
-            "name": "friendica/json-ld", 
-            "version": "1.1.4", 
-            "source": { 
-                "type": "git", 
-                "url": "https://github.com/digitalbazaar/php-json-ld.git", 
-                "reference": "fe18c3f2ce47f30ace904ef58e7416f933be25e1" 
-            },</code> 
- 
-==== sed Test ==== 
- 
-  sudo su 'www-data' -s '/bin/bash' 
- 
-  sed -i 's|https://git.friendi.ca/friendica/php-json-ld|https://github.com/digitalbazaar/php-json-ld.git|g' '/var/www/social/composer.lock' 
- 
-  sed -i 's/1f33c8766b5cfbecfbc2122238873debeed35fb6/fe18c3f2ce47f30ace904ef58e7416f933be25e1/g' '/var/www/social/composer.lock' 
  
 ====== Database ====== ====== Database ======
Line 92: Line 62:
 ===== PHP-FPM Socket ===== ===== PHP-FPM Socket =====
  
-  sudo -e '/etc/php/8.4/fpm/pool.d/social.conf' && sudo systemctl restart 'php8.4-fpm'+  sudo -e '/etc/php8/fpm/php-fpm.d/social.conf' && sudo systemctl restart 'php-fpm'
  
 <code> <code>
Line 98: Line 68:
  
 ; User/Group ; User/Group
-user = "www-data+user = "wwwrun
-group = "www-data"+group = "www"
  
 ; Socket ; Socket
-listen = "/run/php/social.sock" +listen = "/run/php-fpm/social.sock" 
-listen.owner = "www-data+listen.owner = "wwwrun
-listen.group = "www-data"+listen.group = "www"
 listen.mode = "0662" listen.mode = "0662"
  
Line 118: Line 88:
 ; General ; General
 php_value[date.timezone] = "America/New_York" php_value[date.timezone] = "America/New_York"
 +
 +; openSUSE php.ini Defaults
 +php_value[session.save_path] = "/var/lib/php8/sessions"
  
 ; Friendica ; Friendica
Line 131: Line 104:
 ===== FastCGI ===== ===== FastCGI =====
  
-  sudo -e '/etc/nginx/snippets/social.conf'+  sudo -e '/etc/nginx/default.d/social.conf'
  
 <code> <code>
Line 144: Line 117:
  fastcgi_param 'HTTPS' 'on';  fastcgi_param 'HTTPS' 'on';
  
- fastcgi_pass 'unix:/run/php/social.sock';+ fastcgi_pass 'unix:/run/php-fpm/social.sock';
  
 } }
Line 152: Line 125:
 ===== Server Block ===== ===== Server Block =====
  
-  * :!: ''sites-enabled'' should be done after [[#initialize]] +  sudo -e '/etc/nginx/vhosts.d/social.conf' && sudo systemctl reload 'nginx'
- +
-  sudo -e '/etc/nginx/sites-available/social.conf'+
  
 <code> <code>
Line 162: Line 133:
  http2 'on';  http2 'on';
  server_name 'social.realmofespionage.xyz';  server_name 'social.realmofespionage.xyz';
- root '/var/www/social';+ root '/srv/www/social';
  index 'index.php';  index 'index.php';
  
- include '/etc/nginx/snippets/social.conf'; + include '/etc/nginx/default.d/social.conf'; 
- include '/etc/nginx/snippets/headers.conf';+ include '/etc/nginx/default.d/headers.conf';
  
  client_max_body_size '10M';  client_max_body_size '10M';
Line 193: Line 164:
  
 # End</code> # End</code>
- 
-  sudo ln -s -f '/etc/nginx/sites-available/social.conf' '/etc/nginx/sites-enabled/social.conf' && sudo systemctl reload 'nginx' 
  
 ====== Initial Setup ====== ====== Initial Setup ======
Line 205: Line 174:
   * :?: Might be able to use ''--file'' on manually-created [[#localconfigphp|local.config.php]] instead   * :?: Might be able to use ''--file'' on manually-created [[#localconfigphp|local.config.php]] instead
  
-  sudo su 'www-data' -s '/bin/bash'+  sudo su 'wwwrun' -s '/bin/bash'
  
-  cd '/var/www/social' && '/var/www/social/bin/console' autoinstall --dbhost 'localhost' --dbport '3365' --dbdata 'friendica' --dbuser 'friendica' --url 'https://social.realmofespionage.xyz' --basepath '/var/www/social' --dbpass 'x' --admin 'x'+  cd '/srv/www/social' && '/srv/www/social/bin/console' autoinstall --dbhost 'localhost' --dbport '3365' --dbdata 'friendica' --dbuser 'friendica' --url 'https://social.realmofespionage.xyz' --basepath '/srv/www/social' --dbpass 'x' --admin 'x'
  
 ===== Account Create ===== ===== Account Create =====
Line 218: Line 187:
   * :!: ''x'' is the **nickname** chosen at website registration   * :!: ''x'' is the **nickname** chosen at website registration
  
-  sudo su 'www-data' -s '/bin/bash'+  sudo su 'wwwrun' -s '/bin/bash'
  
-  cd '/var/www/social' && '/var/www/social/bin/console' user password 'x'+  cd '/srv/www/social' && '/srv/www/social/bin/console' user password 'x'
  
 ===== Disable Registration ===== ===== Disable Registration =====
  
-  sudo su 'www-data' -s '/bin/bash'+  sudo su 'wwwrun' -s '/bin/bash'
  
-  cd '/var/www/social' && '/usr/bin/php' '/var/www/social/bin/console.php' config 'config' 'register_policy' '0'+  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' config 'config' 'register_policy' '0'
  
 ===== Etc ===== ===== Etc =====
  
-  sudo su 'www-data' -s '/bin/bash'+  sudo su 'wwwrun' -s '/bin/bash'
  
-  cd '/var/www/social' && '/usr/bin/php' '/var/www/social/bin/console.php' worker+  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' worker
  
-  cd '/var/www/social' && '/usr/bin/php' '/var/www/social/bin/console.php' dbstructure update --force+  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' dbstructure update --force
  
-  cd '/var/www/social' && '/usr/bin/php' '/var/www/social/bin/console.php' dbstructure drop --execute+  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' dbstructure drop --execute
  
-  cd '/var/www/social' && '/usr/bin/php' '/var/www/social/bin/console.php' postupdate+  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' postupdate
  
-  cd '/var/www/social' && '/usr/bin/php' '/var/www/social/bin/console.php' cache clear+  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' cache clear
  
-  cd '/var/www/social' && '/usr/bin/php' '/var/www/social/bin/console.php' clearavatarcache+  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' clearavatarcache
  
-  cd '/var/www/social' && '/usr/bin/php' '/var/www/social/bin/console.php' config 'config' 'info' 'https://wiki.realmofespionage.xyz/servers:linux:nginx:friendica'+  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' config 'system' 'basepath' '/srv/www/social' 
 + 
 +  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' config 'config' 'info' 'https://wiki.realmofespionage.xyz/servers:linux:nginx:friendica'
  
   exit   exit
Line 266: Line 237:
   * :!: Change database ''password'' and config ''admin_email''   * :!: Change database ''password'' and config ''admin_email''
  
-  sudo -'www-data' -'/var/www/social/config/local.config.php'+  sudo -'/srv/www/social/config/local.config.php&& sudo chown -v 'wwwrun':'www' '/srv/www/social/config/local.config.php'
  
 <code> <code>
Line 289: Line 260:
         'system' => [         'system' => [
                 'url' => 'https://social.realmofespionage.xyz',                 'url' => 'https://social.realmofespionage.xyz',
-                'basepath' => '/var/www/social',+                'basepath' => '/srv/www/social',
                 'default_timezone' => 'America/New_York',                 'default_timezone' => 'America/New_York',
                 'language' => 'en',                 'language' => 'en',
Line 303: Line 274:
   * :!: Set email for **both** ''user.email''   * :!: Set email for **both** ''user.email''
  
-  sudo mkdir -p '/etc/nginx/scripts/social' && sudo -e '/etc/nginx/scripts/social/git-fix.sh' && sudo chmod '0500' '/etc/nginx/scripts/social/git-fix.sh' && sudo chown 'www-data':'www-data' '/etc/nginx/scripts/social/git-fix.sh'+  sudo mkdir -p '/etc/nginx/scripts/social' && sudo -e '/etc/nginx/scripts/social/git-fix.sh' && sudo chmod '0500' '/etc/nginx/scripts/social/git-fix.sh' && sudo chown 'wwwrun':'www' '/etc/nginx/scripts/social/git-fix.sh'
  
 <code> <code>
Line 310: Line 281:
 cd '/tmp' cd '/tmp'
  
-'/usr/bin/rm' -Rf '/var/www/social/.git' +'/usr/bin/rm' -Rf '/srv/www/social/.git' 
-'/usr/bin/git' -C '/var/www/social' init --initial-branch='develop' +'/usr/bin/git' -C '/srv/www/social' init --initial-branch='develop' 
-'/usr/bin/git' -C '/var/www/social' add '.'+'/usr/bin/git' -C '/srv/www/social' add '.'
  
 ######################################## ########################################
-'/usr/bin/git' -C '/var/www/social' config 'user.email' 'espionage724@x'+'/usr/bin/git' -C '/srv/www/social' config 'user.email' 'espionage724@x'
 ######################################## ########################################
  
-'/usr/bin/git' -C '/var/www/social' commit --message='x'+'/usr/bin/git' -C '/srv/www/social' commit --message='x'
  
-'/usr/bin/git' -C '/var/www/social' remote add 'origin' 'https://github.com/friendica/friendica.git' +'/usr/bin/git' -C '/srv/www/social' remote add 'origin' 'https://github.com/friendica/friendica.git' 
-'/usr/bin/git' -C '/var/www/social' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase+'/usr/bin/git' -C '/srv/www/social' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase
  
-'/usr/bin/git' -C '/var/www/social' reset --hard 'origin/develop' +'/usr/bin/git' -C '/srv/www/social' reset --hard 'origin/develop' 
-'/usr/bin/git' -C '/var/www/social' gc --aggressive --prune='all' +'/usr/bin/git' -C '/srv/www/social' gc --aggressive --prune='all' 
-'/usr/bin/git' -C '/var/www/social' fsck --full --strict+'/usr/bin/git' -C '/srv/www/social' fsck --full --strict
  
-'/usr/bin/rm' -Rf '/var/www/social/addon/.git' +'/usr/bin/rm' -Rf '/srv/www/social/addon/.git' 
-'/usr/bin/git' -C '/var/www/social/addon' init --initial-branch='develop' +'/usr/bin/git' -C '/srv/www/social/addon' init --initial-branch='develop' 
-'/usr/bin/git' -C '/var/www/social/addon' add '.'+'/usr/bin/git' -C '/srv/www/social/addon' add '.'
  
 ######################################## ########################################
-'/usr/bin/git' -C '/var/www/social/addon' config 'user.email' 'espionage724@x'+'/usr/bin/git' -C '/srv/www/social/addon' config 'user.email' 'espionage724@x'
 ######################################## ########################################
  
-'/usr/bin/git' -C '/var/www/social/addon' commit --message='x'+'/usr/bin/git' -C '/srv/www/social/addon' commit --message='x'
  
-'/usr/bin/git' -C '/var/www/social/addon' remote add 'origin' 'https://github.com/friendica/friendica-addons.git' +'/usr/bin/git' -C '/srv/www/social/addon' remote add 'origin' 'https://github.com/friendica/friendica-addons.git' 
-'/usr/bin/git' -C '/var/www/social/addon' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase+'/usr/bin/git' -C '/srv/www/social/addon' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase
  
-'/usr/bin/git' -C '/var/www/social/addon' reset --hard 'origin/develop' +'/usr/bin/git' -C '/srv/www/social/addon' reset --hard 'origin/develop' 
-'/usr/bin/git' -C '/var/www/social/addon' gc --aggressive --prune='all' +'/usr/bin/git' -C '/srv/www/social/addon' gc --aggressive --prune='all' 
-'/usr/bin/git' -C '/var/www/social/addon' fsck --full --strict+'/usr/bin/git' -C '/srv/www/social/addon' fsck --full --strict
  
 # End</code> # End</code>
  
-  sudo -u 'www-data' '/etc/nginx/scripts/social/git-fix.sh'+==== Execute ==== 
 + 
 +  sudo su 'wwwrun' -s '/bin/bash' 
 + 
 +  '/etc/nginx/scripts/social/git-fix.sh' 
 + 
 +  exit
  
 ====== Services ====== ====== Services ======
  
 ===== Worker ===== ===== Worker =====
 +
 +  * https://wiki.friendi.ca/docs/install#required_background_tasks
  
 ==== Service ==== ==== Service ====
Line 358: Line 337:
 <code> <code>
 [Service] [Service]
-User=www-data +User=wwwrun 
-Group=www-data+Group=www
 Type=oneshot Type=oneshot
  
-WorkingDirectory=/var/www/social+WorkingDirectory=/srv/www/social
  
-ExecStart='/usr/bin/php' '/var/www/social/bin/console.php' worker+ExecStart='/usr/bin/php' '/srv/www/social/bin/console.php' worker
  
 # End</code> # End</code>
  
 ==== Timer ==== ==== Timer ====
- 
-  * https://wiki.friendi.ca/docs/install#required_background_tasks 
  
   * Every 10 minutes   * Every 10 minutes
Line 399: Line 376:
 <code> <code>
 [Service] [Service]
-User=www-data +User=wwwrun 
-Group=www-data+Group=www
 Type=oneshot Type=oneshot
  
-WorkingDirectory=/var/www/social+WorkingDirectory=/srv/www/social
 Environment="COMPOSER_CACHE_DIR=/dev/null" Environment="COMPOSER_CACHE_DIR=/dev/null"
  
-ExecStart='/usr/bin/git' -C '/var/www/social' reset --hard 'origin/develop' +ExecStart='/usr/bin/git' -C '/srv/www/social' reset --hard 'origin/develop' 
-ExecStart='/usr/bin/git' -C '/var/www/social' pull origin 'develop' --rebase +ExecStart='/usr/bin/git' -C '/srv/www/social' pull origin 'develop' --rebase
- +
-ExecStart='/usr/bin/git' -C '/var/www/social/addon' reset --hard 'origin/develop' +
-ExecStart='/usr/bin/git' -C '/var/www/social/addon' pull origin 'develop' --rebase+
  
-# Temp php-json-ld Fix (#15340) +ExecStart='/usr/bin/git' -'/srv/www/social/addon' reset --hard 'origin/develop
-ExecStart='/usr/bin/sed' -'s|https://git.friendi.ca/friendica/php-json-ld|https://github.com/digitalbazaar/php-json-ld.git|g'/var/www/social/composer.lock+ExecStart='/usr/bin/git' -'/srv/www/social/addonpull origin 'develop' --rebase
-ExecStart='/usr/bin/sed' -'s/1f33c8766b5cfbecfbc2122238873debeed35fb6/fe18c3f2ce47f30ace904ef58e7416f933be25e1/g' '/var/www/social/composer.lock'+
  
-ExecStart='/usr/bin/composer' --working-dir='/var/www/social' --no-cache install --no-dev+ExecStart='/usr/bin/composer' --working-dir='/srv/www/social' --no-cache install --no-dev
  
-ExecStart='/usr/bin/php' '/var/www/social/bin/console.php' dbstructure update --force +ExecStart='/usr/bin/php' '/srv/www/social/bin/console.php' dbstructure update --force 
-ExecStart='/usr/bin/php' '/var/www/social/bin/console.php' dbstructure drop --execute+ExecStart='/usr/bin/php' '/srv/www/social/bin/console.php' dbstructure drop --execute
  
-ExecStartPost='/usr/bin/php' '/var/www/social/bin/console.php' postupdate+ExecStartPost='/usr/bin/php' '/srv/www/social/bin/console.php' postupdate
 ExecStartPost='/usr/bin/sync' ExecStartPost='/usr/bin/sync'
  
Line 459: Line 432:
 Type=oneshot Type=oneshot
  
-WorkingDirectory=/var/www/social+WorkingDirectory=/srv/www/social
  
-ExecStart='/usr/bin/bash' -c '"/usr/bin/tar" -czf "/home/CHANGEME/backups/friendica-files-auto-"$$(date +%%Y-%%m-%%d)".tar.gz" -C "/var/www" "social"'+ExecStart='/usr/bin/bash' -c '"/usr/bin/tar" -czf "/home/CHANGEME/backups/friendica-files-auto-"$$(date +%%Y-%%m-%%d)".tar.gz" -C "/srv/www" "social"'
  
 ExecStartPost='/usr/bin/sync' ExecStartPost='/usr/bin/sync'
Line 492: Line 465:
 === Database Auth === === Database Auth ===
  
-  sudo mkdir -p '/var/lib/mysql/auth' && sudo -e '/var/lib/mysql/auth/friendica' && sudo chown 'mysql':'mysql' '/var/lib/mysql/auth/friendica' && sudo chmod '0600' '/var/lib/mysql/auth/friendica'+  sudo mkdir -p '/srv/lib/mysql/auth' && sudo -e '/srv/lib/mysql/auth/friendica' && sudo chown 'mysql':'mysql' '/srv/lib/mysql/auth/friendica' && sudo chmod '0600' '/srv/lib/mysql/auth/friendica'
  
 <code> <code>
Line 503: Line 476:
 === Service === === Service ===
  
-  mkdir -p ~/'backups' && sudo mkdir -p '/var/lib/mysql/tmp' && sudo -e '/etc/systemd/system/social-db.service' && sudo sed -i 's/'CHANGEME'/'$USER'/g' '/etc/systemd/system/social-db.service'+  mkdir -p ~/'backups' && sudo mkdir -p '/srv/lib/mysql/tmp' && sudo -e '/etc/systemd/system/social-db.service' && sudo sed -i 's/'CHANGEME'/'$USER'/g' '/etc/systemd/system/social-db.service'
  
 <code> <code>
Line 510: Line 483:
 Type=oneshot Type=oneshot
  
-WorkingDirectory=/var/lib/mysql+WorkingDirectory=/srv/lib/mysql
  
-ExecStart='/usr/bin/bash' -c '"/usr/bin/mariadb-dump" --defaults-extra-file="/var/lib/mysql/auth/friendica" --single-transaction --quick "friendica" -r "/home/CHANGEME/backups/friendica-database-auto-"$$(date +%%Y-%%m-%%d)".sql"'+ExecStart='/usr/bin/bash' -c '"/usr/bin/mariadb-dump" --defaults-extra-file="/srv/lib/mysql/auth/friendica" --single-transaction --quick "friendica" -r "/home/CHANGEME/backups/friendica-database-auto-"$$(date +%%Y-%%m-%%d)".sql"'
  
 ExecStartPost='/usr/bin/sync' ExecStartPost='/usr/bin/sync'
Line 546: Line 519:
 <code> <code>
 [Service] [Service]
-User=www-data +User=wwwrun 
-Group=www-data+Group=www
 Type=oneshot Type=oneshot
  
-WorkingDirectory=/var/www/social+WorkingDirectory=/srv/www/social
  
-ExecStart='/usr/bin/git' -C '/var/www/social' gc --aggressive --prune='all' +ExecStart='/usr/bin/git' -C '/srv/www/social' gc --aggressive --prune='all' 
-ExecStart='/usr/bin/git' -C '/var/www/social' fsck --full --strict+ExecStart='/usr/bin/git' -C '/srv/www/social' fsck --full --strict
  
-ExecStart='/usr/bin/git' -C '/var/www/social/addon' gc --aggressive --prune='all' +ExecStart='/usr/bin/git' -C '/srv/www/social/addon' gc --aggressive --prune='all' 
-ExecStart='/usr/bin/git' -C '/var/www/social/addon' fsck --full --strict+ExecStart='/usr/bin/git' -C '/srv/www/social/addon' fsck --full --strict
  
-ExecStart='/usr/bin/php' '/var/www/social/bin/console.php' cache clear +ExecStart='/usr/bin/php' '/srv/www/social/bin/console.php' cache clear 
-ExecStart='/usr/bin/php' '/var/www/social/bin/console.php' clearavatarcache+ExecStart='/usr/bin/php' '/srv/www/social/bin/console.php' clearavatarcache
  
 ExecStartPost='/usr/bin/sync' ExecStartPost='/usr/bin/sync'
Line 594: Line 567:
 **** ****
  
-  sudo tar -czf ~/'friendica-files-manual-'$(date +%Y-%m-%d)'.tar.gz' -C '/var/www' 'social'+  sudo tar -czf ~/'friendica-files-manual-'$(date +%Y-%m-%d)'.tar.gz' -C '/srv/www' 'social'
  
 ===== Database ===== ===== Database =====
Line 626: Line 599:
 **** ****
  
-  ls ~/'friendica-files-'*'.tar.gz' && sudo rm -Rf '/var/www/social'+  ls ~/'friendica-files-'*'.tar.gz' && sudo rm -Rf '/srv/www/social'
  
 ===== Restore Files ===== ===== Restore Files =====
Line 632: Line 605:
 **** ****
  
-  sudo tar -xzf ~/'friendica-files-'*'.tar.gz' -C '/var/www' 'social' && sudo chown -R 'www-data':'www-data' '/var/www/social' && sudo chmod -R '0755' '/var/www/social'+  sudo tar -xzf ~/'friendica-files-'*'.tar.gz' -C '/srv/www' 'social' && sudo chown -R 'wwwrun':'www' '/srv/www/social' && sudo chmod -R '0755' '/srv/www/social'
  
 ===== Git Fix ===== ===== Git Fix =====
Line 639: Line 612:
   * :!: Requires [[#etc|Etc]] commands afterwards ((https://social.realmofespionage.xyz doesn't redirect to single-profile URL and shows an error))   * :!: Requires [[#etc|Etc]] commands afterwards ((https://social.realmofespionage.xyz doesn't redirect to single-profile URL and shows an error))
  
-  sudo su 'www-data' -s '/bin/bash'+  sudo su 'wwwrun' -s '/bin/bash'
  
-  rm -Rf '/var/www/social/.git'+  rm -Rf '/srv/www/social/.git'
  
-  git -C '/var/www/social' init --initial-branch='develop'+  git -C '/srv/www/social' init --initial-branch='develop'
  
-  git -C '/var/www/social' add '.'+  git -C '/srv/www/social' add '.'
  
-  git -C '/var/www/social' config 'user.email' 'espionage724@x'+  git -C '/srv/www/social' config 'user.email' 'espionage724@x'
  
-  git -C '/var/www/social' commit --message='x'+  git -C '/srv/www/social' commit --message='x'
  
-  git -C '/var/www/social' remote add 'origin' 'https://github.com/friendica/friendica.git'+  git -C '/srv/www/social' remote add 'origin' 'https://github.com/friendica/friendica.git'
  
-  git -C '/var/www/social' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase+  git -C '/srv/www/social' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase
  
-  git -C '/var/www/social' reset --hard 'origin/develop'+  git -C '/srv/www/social' reset --hard 'origin/develop'
  
-  git -C '/var/www/social' gc --aggressive --prune='all'+  git -C '/srv/www/social' gc --aggressive --prune='all'
  
-  git -C '/var/www/social' fsck --full --strict+  git -C '/srv/www/social' fsck --full --strict
  
 ==== Addons ==== ==== Addons ====
Line 665: Line 638:
   * :!: Set email for ''user.email''   * :!: Set email for ''user.email''
  
-  rm -Rf '/var/www/social/addon/.git'+  rm -Rf '/srv/www/social/addon/.git'
  
-  git -C '/var/www/social/addon' init --initial-branch='develop'+  git -C '/srv/www/social/addon' init --initial-branch='develop'
  
-  git -C '/var/www/social/addon' add '.'+  git -C '/srv/www/social/addon' add '.'
  
-  git -C '/var/www/social/addon' config 'user.email' 'espionage724@x'+  git -C '/srv/www/social/addon' config 'user.email' 'espionage724@x'
  
-  git -C '/var/www/social/addon' commit --message='x'+  git -C '/srv/www/social/addon' commit --message='x'
  
-  git -C '/var/www/social/addon' remote add 'origin' 'https://github.com/friendica/friendica-addons.git'+  git -C '/srv/www/social/addon' remote add 'origin' 'https://github.com/friendica/friendica-addons.git'
  
-  git -C '/var/www/social/addon' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase+  git -C '/srv/www/social/addon' pull --depth '1' --recurse-submodules 'origin' 'develop' --rebase
  
-  git -C '/var/www/social/addon' reset --hard 'origin/develop'+  git -C '/srv/www/social/addon' reset --hard 'origin/develop'
  
-  git -C '/var/www/social/addon' gc --aggressive --prune='all'+  git -C '/srv/www/social/addon' gc --aggressive --prune='all'
  
-  git -C '/var/www/social/addon' fsck --full --strict+  git -C '/srv/www/social/addon' fsck --full --strict
  
   exit   exit
Line 689: Line 662:
 ===== Database Connection ===== ===== Database Connection =====
  
-  sudo -'www-data' -'/var/www/social/config/local.config.php'+  sudo -'/srv/www/social/config/local.config.php&& sudo chown -v 'wwwrun':'www' '/srv/www/social/config/local.config.php'
  
 <code> <code>
Line 697: Line 670:
 <code> <code>
  'system' => [  'system' => [
- 'basepath' => '/var/www/social',</code>+ 'basepath' => '/srv/www/social',</code>
  
 ===== Restore Database ===== ===== Restore Database =====
Line 725: Line 698:
 ===== Commands ===== ===== Commands =====
  
-  sudo su 'www-data' -s '/bin/bash'+  sudo su 'wwwrun' -s '/bin/bash'
  
-  cd '/var/www/social' && '/usr/bin/php' '/var/www/social/bin/console.php' -h+  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' -h
  
 ===== Show Config ===== ===== Show Config =====
  
-  sudo su 'www-data' -s '/bin/bash'+  sudo su 'wwwrun' -s '/bin/bash'
  
-  cd '/var/www/social' && '/usr/bin/php' '/var/www/social/bin/console.php' config+  cd '/srv/www/social' && '/usr/bin/php' '/srv/www/social/bin/console.php' config
  
/srv/www/wiki/data/attic/servers/linux/nginx/friendica.1766388706.txt.gz · Last modified: by Sean Rhone

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki