This is a guide to setup remote server development enviroment (Ubuntu LTS) use the following:
1. zsh2. Tmux3. Neovim4. DockerThe goal of this setup is to get rid of all dependencies that are caused by the end operating system, and hardware limitation. As long as you have a Linux-based machine, you can basically use any device to get access everything on that machine and start developing. This way, you can even use ipad to develop without any overheads of workflows such as IDEs, keymappings, environments, etc. At the same time, your code is able to run anywhere that supports docker.
Install Zsh#
First, update your system’s package repository to ensure you have the latest information:
sudo apt updatesudo apt install zsh -yIf you want to set Zsh as your default shell, use the following command:
chsh -s $(which zsh)Enable SSH on your server#
sudo apt updatesudo apt install openssh-serverCheck if it is running
sudo service ssh statusInstall Tmux#
sudo apt install tmuxInstall Neovim#
via appimage#
In Downloads folder
wget https://github.com/neovim/neovim/releases/download/stable/nvim.appimage
mv nvim.appimage ~/Softwares/chmod u+x nvim.appimageIf no FUSE, run via:
./nvim.appimage --appimage-extractand you can execute with ./squashfs-root/usr/bin/nvim
To add it to .profile, add the following in .profile
PATH=$PATH:/$HOME/Softwares/squashfs-root/usr/binApply configuration#
Install starship:
curl -sS https://starship.rs/install.sh | shInstall stow to sync all the dot files
sudo apt install stowGet the dotfiles
git clone https://github.com/tiankaixie/dotfiles.gitand then stow what ever you need
cd dotfilesstow tmuxstow nvimOr, apply all configurations
stow */Install Docker#
Uninstall old versions
sudo apt-get remove docker docker-engine docker.io containerd runcInstall using the apt repository
sudo apt-get updatesudo apt-get install ca-certificates curl gnupgsudo install -m 0755 -d /etc/apt/keyringscurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpgsudo chmod a+r /etc/apt/keyrings/docker.gpgecho \ "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullInstall
sudo apt-get updatesudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginIf get permission problem, try the following to avoid sudo every time:
sudo usermod -aG docker $USER