Created
May 17, 2025 23:53
-
-
Save alzalabany/d65a1f0c274b118490551c989f3e13a1 to your computer and use it in GitHub Desktop.
caddy node pm2 scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install caddy | |
| ```sh | |
| sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl | |
| curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg | |
| curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list | |
| sudo apt update | |
| sudo apt install caddy | |
| ``` | |
| install node | |
| ```sh | |
| # Download and install nvm: | |
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash | |
| # in lieu of restarting the shell | |
| \. "$HOME/.nvm/nvm.sh" | |
| nvm install 24 | |
| node -v # Should print "v24.0.2". | |
| nvm current # Should print "v24.0.2". | |
| npm -v # Should print "11.3.0". | |
| npm i -g pm2 | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
npm install -g npm@latest