Automated setup scripts for a remote Linux (Ubuntu) server.
- Fresh Ubuntu server (tested on Ubuntu 24.04)
- Root or sudo access (for global setup)
- Internet connection
Automated global setup script for a remote Linux (Ubuntu) server.
- 🌐 Installs and configures Nginx
- 🔒 Installs and configures Certbot
- 💻 Installs Code Server
- 🐘 Installs PostgreSQL
- 🛠️ Installs essential development packages
Ensure you have an updated system:
sudo apt update && sudo apt upgrade -y
It is recommended you reboot the system as some system updates may require rebooting the server to take effect:
sudo reboot
Unless you have the need to, we highly recommend allowing OpenSSH in the FireWall list:
sudo apt install ufw
sudo ufw allow OpenSSH
sudo ufw enable
Step 1: Run this single command on your fresh Ubuntu server to automatically configure everything:
bash -c "$(curl -sSL https://raw.githubusercontent.com/christianwhocodes/foundry/main/global/setup.sh)"
Step 2: Restart the session for changes to fully take effect:
source ~/.bashrc && exec /bin/bash
Automated user setup script for a remote Linux (Ubuntu) server.
- ⚙️ Creates Code Server config file for the user
- 📗 Installs uv Python package manager (Does not install Python)
- 📗 Install nvm Node package manager (Does not install Nodejs and npm themselves)
- 📁 Creates a
repos
folder in the/home/[USER]
directory - 🔧 Sets up bash aliases
- ⚙️ Configures Git global user name and email
- 🔑 Generates and configures SSH key (id_ed25519)
To create a new user, login as root or a user with sudo privileges, then follow the steps below:
Create the user:
sudo adduser developer
(Optional) Give the user sudo privileges:
sudo usermod -aG sudo developer
(Optional) Allow the user to login via passwordless (ssh-key) ssh:
sudo rsync --archive --chown=developer:developer ~/.ssh /home/developer
Login as the new user:
Standard Login | With SSH Key |
---|---|
ssh [email protected] |
ssh -i /path/to/key [email protected] |
Step 1: Run the command on your new user fresh logged-in session:
bash -c "$(curl -sSL https://raw.githubusercontent.com/christianwhocodes/foundry/main/user/setup.sh)"
⚠️ Important: The script will output:
- Your Code Server password and port number for server access
- Your SSH public key which needs to be added to your Git hosting service (GitHub, GitLab, etc.)
Save both of these for future use.
Step 2: Restart the session for changes to fully take effect:
source ~/.bashrc && exec /bin/bash
Step 3 (Optional): Install Node.js, Python, and global packages:
nvm install node
npm install -g npm@latest pm2 eslint
uv python install
Automated post-user setup script for configuring Code Server with Nginx and SSL.
- 🌐 Configures Code Server Nginx reverse proxy, linking it with a custom domain with Certbot SSL certificate
Besides sudo permissions, the post-user setup requires:
- A registered domain name pointing to your server's ip. Test it out below:
nslookup yourdomain.com
- Port 80 and 443 open in your firewall
Before running the post-user setup, point your domain to your server's IP address.
Run this command to start the post-user configuration:
bash -c "$(curl -sSL https://raw.githubusercontent.com/christianwhocodes/foundry/main/post-user/setup.sh)"
After setup, access Code Server at: https://your-domain.com