Quickstart
This is a 2-minute quickstart guide. For additional details and explanations, see the Getting Started Guide.
1. Download CLI
DevSpace is a client-only binary. It is super lightweight, does not require any server-side component, and it does not have any dependencies.
- npm
- yarn
- brew
- Mac
- Linux
- Windows Powershell
npm install -g devspace
yarn global add devspace
brew install devspace
# AMD64 / Intel
curl -L -o devspace "https://github.com/loft-sh/devspace/releases/latest/download/devspace-darwin-amd64" && sudo install -c -m 0755 devspace /usr/local/bin
# ARM64 / Silicon Mac
curl -L -o devspace "https://github.com/loft-sh/devspace/releases/latest/download/devspace-darwin-arm64" && sudo install -c -m 0755 devspace /usr/local/bin
# AMD64
curl -L -o devspace "https://github.com/loft-sh/devspace/releases/latest/download/devspace-linux-amd64" && sudo install -c -m 0755 devspace /usr/local/bin
# ARM64
curl -L -o devspace "https://github.com/loft-sh/devspace/releases/latest/download/devspace-linux-arm64" && sudo install -c -m 0755 devspace /usr/local/bin
md -Force "$Env:APPDATA\devspace"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12';
Invoke-WebRequest -URI "https://github.com/loft-sh/devspace/releases/latest/download/devspace-windows-amd64.exe" -o $Env:APPDATA\devspace\devspace.exe;
$env:Path += ";" + $Env:APPDATA + "\devspace";
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User);
Line 4 of this install script adds the install directory %APPDATA%\devspace
to the $PATH
environment variable. This is only effective for the current powershell session, i.e. when opening a new terminal window, devspace
may not be found.
Make sure to add the folder %APPDATA%\devspace
to the PATH
environment variable after installing DevSpace via Powershell. Afterwards, a reboot might be necessary.
To confirm that DevSpace is successfully installed, reboot and test via:
devspace --version
Alternatively, you can simply download the binary for your platform from the GitHub Releases page and add this binary to your PATH.
2. Choose a Project
You can either deploy one of your own projects or alternatively, checkout one of our demo applications using git:
- Node.js
- Python
- Java
- Ruby
- Golang
- PHP
- ASP.NET
- Your Own Project
git clone https://github.com/loft-sh/devspace-quickstart-nodejs
cd devspace-quickstart-nodejs
git clone https://github.com/loft-sh/devspace-quickstart-python
cd devspace-quickstart-python
git clone https://github.com/loft-sh/devspace-quickstart-ruby
cd devspace-quickstart-ruby
git clone https://github.com/loft-sh/devspace-quickstart-golang
cd devspace-quickstart-golang
git clone https://github.com/loft-sh/devspace-quickstart-java
cd devspace-quickstart-java
git clone https://github.com/loft-sh/devspace-quickstart-php
cd devspace-quickstart-php
git clone https://github.com/loft-sh/devspace-quickstart-asp-dotnet
cd devspace-quickstart-asp-dotnet
# Navigate to the root directory of your project
cd /path/to/your/project
If you are using DevSpace for the first time, it is highly recommended that you use one of the demo projects.
3. Initialize Project
devspace init
Choose Component Chart
and Based on this existing Dockerfile
for quickstart projects.
4. Start Development
devspace use namespace my-namespace # will be created by DevSpace if it does not exist
devspace dev
As soon as the terminal opens up, you can start your application:
- Node.js
- Python
- Java
- Ruby
- Golang
- PHP
- ASP.NET
- Your Own Project
npm start
# or: npm run dev
# or: yarn start
python main.py
bundle exec rails server -p 3000 -b 0.0.0.0
go run main.go
./build.sh run
# Your application may already be running
# Try to open the browser on localhost to access it
# You can also run other commands now:
php ...
composer ...
ps aux
dotnet run
# Whatever command is needed to start your application
Hot Reloading: Now, change a file on your local computer and re-run the application inside the container terminal.
Port Forwarding: You can access your application via localhost:PORT
if your port is specified in dev.ports
within devspace.yaml
.
When you're done testing development, type exit
or hit Ctrl-d
to exit the container terminal.
5. Deploy Project
To build your container image and deploy a clean version of this project, run:
devspace use namespace my-namespace # will be created by DevSpace if it does not exist
devspace deploy -p production
6. Cleanup
To purge your deployment from the cluster, run:
devspace purge