# Strapi

# Process Manager

Start Strapi Server with Process Manager  
\- login with root  
\- List all processes:

```shell
pm2 ls
```

\- Start process

```shell
pm2 start [process-name]
```

\- Stop process

```shell
pm2 stop [process-name]
```

# Strapi Update

\### Update Ubuntu packagelist / Repository list  
\- root: apt update

\### Update node &amp; npm  
\## Update node to latest LTS  
\# https://askubuntu.com/questions/1265813/how-to-update-node-js-to-the-long-term-support-version-on-ubuntu-20-04  
\- root: curl -fsSL https://deb.nodesource.com/setup\_lts.x | bash -  
\- root: apt-get install -y nodejs

  
\### Strapi Update  
Service stoppen (awg-api service):  
\- root: pm2 ls  
\- root: pm2 stop \[name\]

Linux User: awg-api (cd DocumentRoot):  
vorgehensweiße wie in den docs von strapi update (https://docs.strapi.io/dev-docs/update-version)  
Check https://www.npmjs.com/ for package.json updates (dependencies)

danach:  
\- root: pm2 start \[name\] --watch (&lt;= \[name\] der name den du vorher gestoppt hast)

Wenn Fehler bei npm install:  
npm ERR! code ERESOLVE  
npm ERR! ERESOLVE unable to resolve dependency tree  
Dann die Version in die package.json schreiben die strapi haben will, z. B.:  
npm ERR! node\_modules/@strapi/plugin-users-permissions  
npm ERR! @strapi/plugin-users-permissions@"4.23.1" from the root project

  
\##### (optional) Update node version:  
<span style="color: rgb(224, 62, 45);">Bei awg-api | rbo - wabenplan:</span>  
\- awg-api: volta install node@\[version\] (e. g. volta install node@20)  
\- root: cd /etc/pm2/sites/pm2.awg-api.json &lt;- node Version austauschen (pfad)