Install Dev Space Agent

Here is the docker compose file

Quick Setup

You can quickly install or update the Dev Space Agent using this command below.

docker run -d \
    -p 5555:5555 \
    --name devspace-agent \
    --pull always \
    --restart on-failure:3 \
    -v devspace_agent:/app/Data \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    -v /var/lib/docker/volumes/portainer_data/_data/compose:/var/lib/docker/volumes/portainer_data/_data/compose:ro \
    -v /var/lib/docker/volumes/portainer_data/_data/custom_templates:/var/lib/docker/volumes/portainer_data/_data/custom_templates:ro \
    ghcr.io/fluxpointdev/devspace/agent:latest

You can get the agent key using this command cat /var/lib/docker/volumes/devspace_agent/_data/Config.json

Or if you want a more custom compose setup you can use the docker-compose.yml config here.

Compose Setup
  1. Open a terminal.

  2. Create a folder for the agent config mkdir devspace_agent

  3. Navigate to the folder using cd devspace_agent

  4. Upload the config below in the folder as docker-compose.yml

  5. Start the agent using docker compose up -d

To update the agent you can

  1. Run docker compose down to stop the agent.

  2. Run docker compose pull to get the latest version

  3. Run docker compose up -d to start the agent.

services:
  devspace-agent:
    container_name: devspace-agent
    image: ghcr.io/fluxpointdev/devspace/agent:latest
    volumes:
      - devspace_agent:/app/Data:rw
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /var/lib/docker/volumes/portainer_data/_data/compose:/var/lib/docker/volumes/portainer_data/_data/compose:ro
      - /var/lib/docker/volumes/portainer_data/_data/custom_templates:/var/lib/docker/volumes/portainer_data/_data/custom_templates:ro
    working_dir: /app
    restart: on-failure:3
    networks:
      - devspace-agent_network
    ports:
      - 5555:5555
    dns:
      - 1.1.1.2
      - 1.0.0.2
networks:
  devspace-agent_network:
    name: devspace-agent_network
    driver: bridge

Website Agent Setup

You can now setup and manage your server on the Dev Space Website by creating a team, going to Servers, click Create Server and then go through the setup page with your server IP and agent key then name the server anything you want.

Last updated