Pular para o conteúdo

Execute seus agentes de programação na nuvem com Herdr

Ver no idioma original →

Autoria: Dave Ebbelaar · Assistir no YouTube

Vídeo de autoria do canal indicado, não da IANIA; todos os direitos pertencem ao criador. Transcrição, resumo e tradução gerados automaticamente; o conteúdo no idioma original é preservado na versão em idioma original.

Idioma original: inglês

Vídeo original: Run Your Coding Agents in the Cloud with Herdr · Canal: Dave Ebbelaar · 25:44 · Assistir no YouTube

Tópicos: Agentes de IA, Cibersegurança e segurança de software, Engenharia de software com IA, Infraestrutura e hardware de IA

Dave Ebbelaar mostra como configurar um VPS na Hostinger para manter agentes de programação como Claude Code e Codex funcionando mesmo quando o computador está desligado. O tutorial cobre a instalação do Herdr, o acesso por SSH, a criação de um usuário com permissões limitadas e a proteção do servidor com um firewall. Em seguida, demonstra como autenticar GitHub, Claude Code e Codex, clonar projetos e integrar os agentes ao Herdr. Por fim, apresenta o acesso ao servidor pelo Cursor ou Visual Studio Code e sugere formas de usar essa configuração no dia a dia.

  • Um VPS oferece um espaço de trabalho persistente na nuvem, permitindo que os agentes continuem funcionando quando o laptop é fechado ou desligado.
  • O tutorial recomenda um VPS com pelo menos 8 GB de RAM e demonstra a configuração na Hostinger.
  • A autenticação SSH usa uma chave pública e, como medida adicional, é possível restringir conexões com um firewall e IPs permitidos.
  • Criar um usuário de desenvolvimento separado do root reduz o uso cotidiano de uma conta com acesso total ao servidor.
  • GitHub, Claude Code e Codex podem ser autenticados no servidor por fluxos de autorização no navegador.
  • Projetos podem ser clonados para uma pasta de repositórios e conectados ao Herdr com as integrações correspondentes.
  • O Herdr skill permite configurar um fluxo multiagente em que Codex e Claude podem iniciar subagents um do outro.
  • Cursor e Visual Studio Code podem se conectar ao VPS por SSH para navegar e editar arquivos, além de usar o terminal remoto.
Início Capítulo Resumo
00:00 Visão geral da configuração O apresentador explica como um VPS com Herdr permite manter agentes de programação em execução na nuvem.
02:42 Escolha e configuração do VPS Ele seleciona um plano na Hostinger, configura senha e chave SSH e inicia a criação do servidor.
07:27 Acesso ao servidor e configuração de segurança O tutorial demonstra o acesso pelo navegador e por SSH, cria um usuário de desenvolvimento e apresenta a configuração de firewall.
15:30 Instalação e autenticação dos agentes O apresentador instala GitHub CLI, Claude Code e Codex no servidor e autentica as contas necessárias.
20:52 Repositórios e integrações do Herdr Ele cria uma pasta para projetos, clona um repositório e configura as integrações e o Herdr skill.
23:02 Uso com Cursor e Visual Studio Code O vídeo mostra como acessar o mesmo servidor e os arquivos do projeto por SSH em editores gráficos e encerra com dicas para o fluxo diário.

A beleza do Herdr é que ele roda no próprio servidor do seu dispositivo e, mesmo quando você fecha o terminal, continua funcionando. — 01:37

Podemos ter um espaço de trabalho persistente na nuvem e acessá-lo de diferentes dispositivos. — 02:11

Antes de começar a compartilhar informações sensíveis com servidores como este, você deve entender o que está acontecendo. — 11:45

Tenho um documento de fluxo diário que explica e resume como trabalhar com isso no dia a dia. — 25:14

  • Herdr (ferramenta): Multiplexador de terminal voltado a agentes que mantém sessões em execução e organiza projetos e sessões.
  • Hostinger (empresa): Provedora de hospedagem usada no tutorial para alugar e configurar um VPS.
  • VPS (conceito): Servidor privado virtual alugado e usado como espaço de trabalho persistente na nuvem.
  • SSH (conceito): Protocolo usado para acessar remotamente o servidor, neste caso com autenticação por chave.
  • Claude Code (ferramenta): Agente de programação instalado e autenticado no servidor para trabalhar em projetos.
  • Codex (ferramenta): Agente de programação instalado e autenticado no VPS, com suporte à integração com Herdr.
  • Grok (modelo): Agente citado como uma das opções que podem ser usadas com Herdr.
  • GitHub CLI (ferramenta): Interface de linha de comando usada no tutorial para autenticar o GitHub no servidor.
  • Cursor (ferramenta): Editor que pode se conectar ao servidor por SSH para navegar e editar arquivos remotamente.
  • Visual Studio Code (ferramenta): Editor apresentado como alternativa para acessar o servidor por SSH e trabalhar com os arquivos.
  • NordLayer (ferramenta): Serviço de VPN mencionado como opção para obter um IP dedicado ao restringir o acesso ao servidor.
  • Dave Ebbelaar (pessoa): Apresentador que demonstra a configuração do servidor e o fluxo de trabalho com Herdr.
  • Datalumina (empresa): Empresa de desenvolvimento de IA mencionada pelo apresentador ao falar sobre o uso de VPN.

00:00 Neste vídeo, vou mostrar como você pode executar todos os seus coding agents favoritos, como Claude, Codex e Grok, na nuvem, para que continuem funcionando mesmo quando você fechar o laptop. Você vai aprender a configurar um servidor privado virtual usando a Hostinger. Vamos instalar o Herdr nesse servidor e conectá-lo a todos os nossos coding agents favoritos, como Claude e Codex. Vou mostrar como acessar facilmente o servidor no dia a dia e também protegê-lo com um firewall. Vamos passar por todas as configurações necessárias e, depois, vou mostrar como usar isso no seu workflow diário. E agora, essa configuração

00:32 é perfeita para você se trabalha com agents o dia todo e quer garantir que eles continuem funcionando, independentemente do dispositivo que estiver usando. Certo, vamos começar e configurar tudo isso. Primeiro, vamos ver como tudo vai se encaixar e o que vamos construir neste vídeo. Vamos configurar um VPS, um servidor privado virtual que vamos alugar. Essa será, essencialmente, a parte na nuvem. Nele, vamos instalar o Herdr e, depois, configurar o Claude Code e o Codex. Essa é a configuração que também mostrei no meu vídeo anterior, mas naquela ocasião apenas

01:05 executando tudo no seu próprio dispositivo. Se você ainda não assistiu àquele vídeo, recomendo muito começar por ele para entender o que é o Herdr e o que ele faz. Em essência, é um multiplexador de terminal criado especificamente para seus agents. Tenho usado o Herdr como meu driver diário em todos os meus projetos de programação nas últimas duas semanas e, até agora, estou adorando. Tenho todos os meus projetos diferentes aqui. Posso iniciar sessões do Claude, depois vir aqui e iniciar uma sessão do Codex e, em seguida, até criar uma sessão do Grok, sabe,

01:37 e também usar todos os outros harnesses que você quiser. Está tudo lá. E o melhor do Herdr é que ele funciona no próprio servidor do seu dispositivo, então, mesmo quando você fecha o terminal, ele continua funcionando. Isso é ótimo no seu próprio dispositivo e laptop porque, por exemplo, se você fechar uma sessão do terminal sem querer, ela continua funcionando. Mas ainda há outro problema. E se você fechar o laptop? E se desligar o laptop? E se precisar viajar? Aí seus agents vão parar de funcionar. Esta configuração vai resolver isso transferindo tudo para um VPS.

02:11 Acho que essa configuração vai se tornar mais popular no futuro, à medida que percebermos que vamos transferir cada vez mais trabalho para os agents e quisermos desvinculá-los dos dispositivos físicos que temos por perto, mantendo tudo em um lugar centralizado, onde todo o trabalho fica armazenado. Então, usando nossos diferentes dispositivos — seja laptop, computador de mesa ou celular —, podemos simplesmente acessar esse espaço. Mas teremos um ambiente de trabalho persistente baseado na nuvem. Certo, agora que você entende o que vamos construir e como tudo se encaixa, o primeiro passo que

02:42 vamos dar é configurar um VPS. Há muitas empresas que você pode contratar para alugar um VPS. Mas um dos problemas é que, no último ano, muitas delas aumentaram bastante os preços: duas vezes, às vezes até três vezes, por causa da escassez de RAM. Descobri que, atualmente, a Hostinger ainda oferece alguns dos preços mais competitivos para máquinas virtuais privadas, além de muitos

03:12 outros recursos úteis na interface e nos painéis que podemos usar. Para este tutorial e esta configuração, recomendo contratar um VPS com pelo menos 8 gigabytes de RAM. Você pode escolher uma capacidade maior, é claro, dependendo do seu orçamento, mas isso será suficiente para executar seus coding agents nele. Então, vamos passar pelo processo de configuração e ver o que podemos fazer aqui. Se acessarmos o plano da Hostinger e escolhermos a opção com 8 gigabytes de RAM, dá para ver que, basicamente,

03:43 quanto mais RAM você escolher, mais caro será o plano por mês. Certo. Quando chegarmos à página de checkout, haverá algumas configurações que podemos ajustar. Principalmente, podemos decidir por quanto tempo queremos contratar esse plano, certo? Com 12 meses, já temos um desconto bem grande. Se quiser contratar por dois anos, o desconto é ainda maior. E o legal de contratar um VPS em qualquer lugar é que você também pode reutilizá-lo. Pode usá-lo para aprender, para projetos, para deploys ou, neste caso, para coding agents, é claro.

04:14 Certo, depois vamos escolher a localização do servidor. Escolha uma localização que faça sentido para você. O ideal é selecionar a mais próxima. E aqui está algo que podemos fazer: já podemos selecionar o Herdr e confirmar. Isso vai configurar o VPS com o Herdr já instalado, poupando-nos alguns arquivos de configuração. Mas o legal é que você também pode explorar várias outras configurações que talvez queira usar neste VPS ou em VPSs futuros.

04:45 Certo. Depois que contratar o plano, a Hostinger também me deu um código de desconto para o meu público: Dave VPS. Com ele, você garante mais 10% de desconto no plano anual, para novos assinantes. Certo, depois de seguir os passos e confirmar a configuração, o processo de inicialização começa. Em seguida, seremos redirecionados ao painel de hospedagem. A partir daí, podemos configurar nosso VPS. Esta é uma etapa muito importante, pois faz parte das medidas de segurança.

05:18 Vou pegar os guias que temos aqui, arrastá-los para este lado e adicionar isto aqui. A primeira coisa que vamos fazer é criar uma senha de root. Essa senha protege o servidor. Depois, também vamos adicionar uma chave SSH, que usaremos para nos autenticar no servidor. Certo, para definir a senha que dará acesso de root à máquina virtual, você pode clicar em “Gerar” ou usar seu próprio gerenciador de senhas para criar uma. Vou inserir uma senha que já criei.

05:52 Salve-a e, em seguida, vamos adicionar uma chave SSH. A senha serve para autenticar no próprio servidor como usuário com acesso de root, e a chave SSH é o que vamos usar para nos conectar ao servidor. Agora, vamos configurar uma chave SSH no seu próprio dispositivo, seguindo as instruções aqui. Dependendo de você estar no macOS, Linux ou Windows, pode usar os comandos indicados aqui. Vou copiar este comando e executá-lo em um terminal. Vou executá-lo. Então,

06:23 vamos executar o ssh-keygen neste caso, porque estou no Mac, e seguir as próximas instruções. Depois, você pode definir uma frase secreta, se quiser. Vou apenas pressionar Enter e deixar esse campo em branco mais uma vez. Agora dá para ver que a chave SSH foi criada. Mantenha-a privada e segura. Certo, depois de criar a chave SSH, o próximo passo é copiar a chave pública. Aqui estão novamente os comandos para fazer isso. Se eu abrir outra sessão do terminal e começar do zero, esse comando vai copiá-la para a área de transferência.

06:57 E então, aqui, podemos adicionar uma nova chave SSH e colá-la aqui. Mais uma vez, você deve manter essas informações em sigilo. Depois, é só dar um nome para ela. Você pode usar o nome do seu dispositivo. Por exemplo, vou chamá-la de demo. Esse é o primeiro passo para proteger sua VPS com uma senha e uma chave SSH. Então, clico em Avançar e podemos concluir a configuração. Não precisamos de um verificador de malware agora. A Hostinger vai configurar a VPS; isso levará alguns minutos. Então, vamos esperar terminar e voltar. Certo, pronto, então…

07:27 Isso encerra a seção sobre como criar o servidor. Agora vamos ver como entrar no servidor e acessá-lo. Primeiro, vamos fazer isso pelo console web. A primeira coisa que podemos fazer é acessar o painel da Hostinger aqui no navegador. Então, podemos nos conectar pelo console web. Se eu clicar aqui, uma nova aba deve abrir. E pronto, estamos no servidor e podemos começar a trabalhar nele pelo terminal no navegador.

08:00 Então, se eu voltar aqui ao nosso guia, podemos, por exemplo, verificar se o Herdr está instalado nesta VPS, sem instalar nada. E a resposta é sim. Isso também significa que agora posso simplesmente executar o Herdr e já estou dentro dele. Então, esse já é um ótimo passo, certo? Criamos a VPS, nos conectamos pelo navegador e o Herdr está funcionando. Certo, agora que sabemos que podemos nos conectar à VPS e que o Herdr está funcionando, vamos continuar para a próxima etapa e nos conectar a partir do nosso laptop.

08:31 Vou fechar o console web aqui e abrir um terminal no nosso próprio dispositivo. Depois, queremos pegar o seguinte comando e substituir o IP da VPS que aparece aqui pelo IP do nosso servidor. Podemos copiar o IP no painel, voltar ao terminal, colá-lo logo depois do símbolo @ e executar o comando. Na primeira vez, será solicitada uma confirmação. Primeiro, vou dizer…

09:05 sim. E agora você pode ver que também estamos no servidor. Também posso me conectar ao Herdr daqui, mas agora pela nossa própria sessão do terminal, em vez de pela interface web. Então, já estamos avançando bastante: podemos nos conectar ao servidor por SSH e iniciar o Herdr. Mas agora vamos dar um passo atrás e entender melhor esse processo, para ter certeza de que sabemos o que está acontecendo, como podemos proteger ainda mais o servidor e como seria usá-lo no dia a dia. Agora que você sabe como se conectar a partir do laptop, a próxima coisa que recomendo…

09:37 fazer é, opcionalmente, salvar um atalho para facilitar o acesso sem precisar lembrar de todos os comandos. Podemos fazer isso editando nosso arquivo de configuração do SSH. Aqui estão, mais uma vez, comandos diferentes para encontrá-lo. Se esta é a primeira vez que você trabalha com um arquivo de configuração, pode criá-lo primeiro. É isso que o comando touch faz no macOS. Então, vou abrir um novo terminal aqui, abrir esta pasta e, dentro dela, está seu arquivo de configuração.

10:07 Agora, se eu pegar esse arquivo de configuração e abri-lo com qualquer editor de texto ou praticamente qualquer aplicativo que você quiser, podemos começar a editá-lo. Então, vou abrir espaço aqui e adicionar este trecho. É aqui que eu colocaria o endereço IP do meu servidor. Depois, salvo e fecho o arquivo. Na próxima vez que abrir uma nova sessão do terminal aqui, deixe-me atualizar isto, posso me conectar por SSH usando “agent cloud” ou qualquer outro comando que você tenha decidido usar.

10:40 E agora, quando entro aqui, vou direto para o servidor. É só um pequeno atalho para facilitar as coisas. Certo, agora que configuramos o servidor e obtivemos acesso, vamos criar um usuário comum que também usaremos para nossos coding agents, porque o usuário root tem acesso de root e pode alterar praticamente todas as configurações do servidor. Portanto, queremos ter um pouco mais de cuidado. Esta é apenas uma recomendação de configuração geral que vou compartilhar com você. Claro, você pode personalizá-la como quiser, mas…

11:14 Vou criar um usuário desenvolvedor. Para isso, podemos copiar este comando e primeiro criar um usuário. Vamos configurar isso e criar o usuário. Em seguida, queremos dar a ele acesso à chave SSH. Mais uma vez, este é um comando que precisamos executar no nosso próprio laptop. Então, vou abrir outro terminal aqui. Certifique-se de que esteja no seu próprio dispositivo, confira qual sistema operacional você tem e, em seguida, execute o comando a seguir. Ao seguir estas etapas, mais uma vez, se você estiver fazendo isso…

11:45 pela primeira vez, talvez queira usar seus coding agents para entender o que estamos fazendo e como tudo isso funciona. Especialmente antes de começar a compartilhar informações confidenciais com servidores como este, você precisa entender o que está acontecendo. Ao executar este comando, demos ao nosso usuário desenvolvedor acesso a essa chave. Agora também precisamos dar ao usuário desenvolvedor acesso ao Herdr, porque, por padrão, ele só está instalado para o usuário root. Então, vamos executar mais um comando, uma única vez, aqui. Vou colar…

12:16 isto, colar este comando e executar o seguinte para configurar tudo. Em seguida, se você também decidiu acompanhar os passos, podemos alterar nosso atalho para que, em vez de fazer login como usuário root, façamos login como desenvolvedor. Salvamos isso aqui. Agora, se eu sair do servidor e limpar isto, podemos executar um comando SSH e iniciar o Herdr. Você pode ver que agora entramos no servidor, mas com uma conta de usuário…

12:47 desenvolvedor. É bom ter em mente que há duas contas aqui. Quando quiser fazer alterações no nível do sistema como usuário root, você pode entrar novamente com o usuário root. Para isso, você também pode sempre executar o comando “who am I” e verificar se está como desenvolvedor ou como root. Certo, agora vamos falar de segurança. No momento, nosso servidor está protegido basicamente pela nossa chave SSH, certo? Se tivermos essa chave, podemos entrar no servidor. Embora isso já seja, em geral, aceitável, podemos ir ainda mais longe…

13:22 e adicionar um firewall ao servidor. Isso significa que só poderemos nos conectar ao servidor usando a chave e, além disso, apenas a partir de endereços IP permitidos. Isso é algo que você pode fazer se tiver um endereço IP fixo e usar algo como uma VPN. Nós, aqui na Datalumina, usamos o NordLayer para isso há vários anos. Ele fornece um endereço IP dedicado, porque, em geral, quando você usa um provedor residencial, seu endereço IP costuma mudar.

13:52 endereço IP para que você possa, é claro, voltar ao portal e alterá-lo, mas é melhor obter um endereço IP fixo e usar uma VPN para isso. Em geral, é isso que eu recomendo fazer. Vou mostrar rapidinho onde fazer isso no portal; depois, você pode seguir a documentação aqui para configurar essa regra de SSH. Então, se eu acessar o portal e garantir que estou no servidor, em Segurança, podemos abrir o firewall. E aqui você pode ver que este é o servidor que já configurei.

14:26 Configurei o Herdr SSH NordLayer. Você pode adicionar novas regras de firewall acessando o portal, alterando o nome da configuração e, na documentação, vai encontrar exatamente as configurações que recomendo usar. Para dar contexto, aqui você pode ver como fica: a porta 22, à qual você se conecta via SSH, o endereço IP na lista de permissões, que é o seu IP, e, depois, praticamente todo o restante do tráfego de entrada é bloqueado. O legal das configurações de firewall é que você também pode compartilhá-las entre vários

14:59 VPSs. Então, se você configurar isso uma vez, pode acessar a configuração do firewall e habilitá-la também para este servidor que acabei de criar. E mais uma coisa rápida: ultimamente tenho recebido muitas perguntas sobre os tipos de projetos em que trabalhamos na Datalumina, nossa empresa de desenvolvimento de IA. Então, se você tem interesse em começar como freelancer ou abrir sua agência, mas não sabe por onde começar, criei este material gratuito para você. Você pode baixá-lo na descrição. Este é o nosso modelo de proposta. Para cada projeto que aceitamos, primeiro criamos uma proposta, e esta é a

15:30 estrutura exata que usamos. Também incluí um bônus: uma proposta completa que compartilhamos. Anonimizei o documento para que você possa ver os preços, a discriminação dos custos, os detalhes, tudo o que fazemos. Isso vai trazer muitos insights se você também quiser, talvez, vender soluções de dados e IA. Então, não deixe de baixar o material gratuitamente na descrição. Certo, agora que também sabemos como proteger nosso servidor, vamos à configuração do agent para que possamos começar a trabalhar com ele. E lembre-se: tudo o que fizemos até aqui, mais algumas etapas, é apenas uma configuração inicial, feita uma única vez.

16:02 A primeira coisa de que precisamos é uma conexão com o GitHub, certo? Porque provavelmente você vai querer acessar seus repositórios, criar PRs e commits. Então, vamos configurar isso agora. Para isso, vamos usar acesso root. Vamos usar SSH, root e, em seguida, agent cloud. E então vou garantir que o GitHub esteja instalado e configurado aqui. Esse é um comando que só precisamos executar uma vez. Depois, vamos sair e nos conectar novamente como desenvolvedor. Assim, podemos fazer isso sem acesso root, porque agora podemos instalar o Cloud

16:38 Code e o Codex, e possivelmente qualquer outro harness que você queira instalar aí. Aqui estão os comandos para executar. Podemos executar os dois ao mesmo tempo, clod e codex, e garantir que agora sejam instalados no ambiente de desenvolvimento. Certo, o clod code está instalado. O codex pede uma confirmação com y, então pressione y e aperte Enter. Agora, precisamos autenticar nossas contas no servidor. Temos que fazer isso para todos os nossos coding harnesses e assinaturas, assim como para o GitHub.

17:09 Essa é a configuração mínima de que precisamos. Vamos começar pelo GitHub e executar estes comandos, um por vez, para usar o GitHub CLI. Primeiro, ele vai perguntar se você quer entrar ou autenticar com as credenciais do GitHub. Vamos responder y. Depois, vamos copiar este código que aparece aqui. Em seguida, vou pressionar Enter. É aqui que pode ficar um pouco complicado: agora ele tenta abrir o navegador, mas não temos esse navegador no servidor. Então, o que você pode fazer é pressionar Command e clicar nesta URL,

17:40 mas também pode simplesmente colar o endereço no navegador. Como você pode ver, é github.com/login/device. Vou abrir a página no meu próprio navegador. Depois, vou clicar em Continue. E é aqui que vou colar o código que apareceu aqui. Essa é uma prática comum ao usar esses terminais e servidores para se autenticar. Você também vai ver isso com o Clot e, provavelmente, com a OpenAI nas próximas etapas, dependendo de quando este vídeo foi gravado e do que eles possam ter mudado. Depois, basta seguir o processo de configuração no navegador, orientado pelo GitHub,

18:10 e aceitar. Então, aqui você pode ver que agora estamos oficialmente conectados. Outra coisa que provavelmente você vai querer fazer é definir seu nome e seu e-mail. Você pode entrar aqui e definir globalmente o nome do seu usuário do GitHub. Se quiser, pode fazer o mesmo com seu endereço de e-mail. Certo. Agora precisamos fazer o mesmo para o cloud code. Vamos executar o seguinte comando: cloud auth login. Faça tudo isso no servidor. Mais uma vez, recebemos uma URL, na qual podemos clicar para abrir

18:40 no navegador do nosso próprio dispositivo. Isso nos leva ao processo de autorização. Clique em Authorize e você verá o seguinte código. Copie-o e cole-o aqui. Um detalhe: quando você colar o código aqui, não vai conseguir vê-lo. Se eu pressionar para colar, parece que nada aconteceu, mas basta apertar Enter. E aí você vê a mensagem de que o login foi bem-sucedido. Agora que o cloud code está autenticado, vamos continuar com o codex. Há mais uma etapa que talvez seja necessária. Como estamos fazendo uma autenticação por dispositivo, na primeira vez que fiz isso para minha conta do Codex ou do GPT,

19:14 precisei acessar as configurações de segurança e ativar a opção para aprovar isso. Mas o sistema vai informar se você precisar fazer o mesmo. Se eu executar Codex login device out, você pode ver que recebemos outro código para copiar. Depois, você verá a seguinte tela, onde poderá colar o código. Se aparecer um erro aqui, primeiro acesse suas configurações de segurança para ajustá-las. Vou colar o código aqui e clicar em Continue. Agora estamos conectados ao Codex. Isso leva alguns segundos. E pronto: o login foi bem-sucedido.

19:46 Certo, agora, para conferir se tudo isso funciona, vou abrir uma sessão do Herdr. Primeiro, vou verificar se consigo iniciar o Codex. E sim, consigo. Vou confiar nesta pasta e perguntar: “Oi, você está aí?”. Vamos executar isso e abrir outra aba também. Nela, vamos iniciar uma sessão do Claude. Sim, o modo escuro está certo. Usar minha assinatura. Agora, dentro do Claude, precisamos fazer mais uma etapa de autenticação. Você precisa verificar se consegue clicar aqui ou se precisamos copiar e colar isto.

20:19 Isso é específico do Claude Code. Ele também disse que você poderia pressionar C para copiar a linha inteira, o que talvez seja um pouco mais fácil. Então, vamos copiar o código inteiro, selecionar o terminal aqui, colar e pressionar Enter. Agora também devemos estar conectados aqui. Podemos escolher confiar nesta pasta e dizer: “Oi, você está aí?”. Temos outro modelo configurado agora. O da OpenAI está aqui, o Cloth está aqui e estamos prontos para começar. Certo, agora que instalamos os agents, vamos fazer a configuração final.

20:52 etapas para juntar tudo isso. Então, primeiro, quando estamos trabalhando neste servidor aqui, no início, não há sistema de arquivos, não há nada. Então, recomendo criar uma pasta chamada repositories. Essa será a pasta de onde você vai trabalhar. Vou criar a pasta repositories e entrar nela; por enquanto, ela estará vazia. Agora, se usarmos essa pasta como ponto de partida, podemos começar a clonar projetos a partir daqui.

21:23 Então, se eu acessar, digamos, meu GitHub pessoal, escolher meu AI cookbook e copiar a URL aqui, vou executar um git clone e colar a URL. Agora você pode ver que, neste momento, tenho meu AI cookbook em repositories. A próxima coisa que recomendo é conectar o Herdr aos harnesses de programação que você quer usar. Isso também fazia parte da minha configuração inicial no Herdr. Basta executar o seguinte comando: Herdr integrations install claude. Vamos executá-lo.

21:57 Vamos fazer o mesmo para o Codex e, em seguida, podemos conferir o status de tudo isso. Você pode fazer isso para todos os harnesses compatíveis com o Herdr. Também pode consultar a documentação oficial. Agora você também pode adicionar a skill do Herdr. Recomendo isso se você realmente quiser ter um sistema multiagente em que o Codex também possa iniciar subagents do Claude e vice-versa. Para fazer isso, você pode executar o seguinte comando e configurar tudo. Vamos copiá-lo, colá-lo aqui e executá-lo de uma só vez para configurar tudo. E, se agora quisermos criar uma nova pasta

22:31 aqui, vamos executar um mkdir e chamá-la de demo; depois, vamos entrar nela. Agora, a partir daqui, vamos iniciar o Herdr. Estou dentro do Herdr e posso adicionar um novo espaço aqui. Em seguida, vamos para repositories e depois para o projeto demo, que está vazio no momento. Esta é a configuração que temos agora. Então, aqui posso… começar, por exemplo, com uma sessão do Codex. Vamos confiar nos hooks que foram configurados. Agora estou dentro de um projeto novinho em folha e posso começar a trabalhar.

23:02 Certo. Agora já cobrimos quase tudo e podemos passar à personalização e à configuração. O interessante do Herdr é que tudo vem com um arquivo de configuração. Então, se você já usou o Herdr no seu dispositivo pessoal, pode simplesmente copiar essas configurações para o seu ambiente na nuvem e reutilizá-las. Há mais uma coisa que quero mostrar, de que também gosto: você pode usar o Visual Studio Code ou o Cursor para se conectar ao seu servidor via SSH.

23:34 Se eu abrir uma nova janela do Cursor aqui, você verá que a opção padrão já diz “conectar via SSH”, e então posso selecionar meu atalho. Vou selecionar agent cloud. Agora você pode ver que entramos diretamente nesse servidor, dentro do Cursor. Depois, podemos usar os controles aqui para maximizar o painel do terminal e iniciar a configuração do Herdr. Agora você pode ver que estamos fazendo isso dentro do Visual Studio Code. Estamos na mesma sessão do Herdr no servidor, mas temos outra maneira de trabalhar com ele, que eu gosto.

24:08 Uma coisa de que gosto nisso é que também podemos, por exemplo, abrir uma pasta aqui e navegar pelo servidor usando uma interface visual. Então, se eu voltar aqui e acessar o diretório do desenvolvedor onde estávamos, certo, criamos a pasta repositories. Você pode ver que agora posso, por exemplo, entrar no meu AI cookbook e clicar em OK. Agora você pode ver que posso abrir o projeto inteiro aqui dentro do Cursor e visualizar meus arquivos, fazer alterações. Também posso ver meu controle de versão e fazer praticamente tudo sem

24:42 precisar fazer tudo pela interface do terminal. E posso até… entrar nessa mesma sessão do Herdr, mas você também poderia usar terminais separados, certo? Por exemplo, poderia deixar isto aberto e manter outra sessão do terminal à direita, onde você programa, e usar o Visual Studio Code apenas para navegar pelos arquivos, ver o projeto ou talvez lidar com seus commits e PRs. Certo, isso nos leva ao fim desta configuração. Agora você sabe como configurar uma máquina virtual privada, como se conectar a ela e como instalar seus

25:14 agents de programação nela, e também abri-la no Visual Studio Code ou no Cursor para começar a trabalhar. Como última dica, tenho aqui um documento de workflow diário que explica e resume como trabalhar com isso no dia a dia, como se conectar, como adicionar seus projetos e como visualizar apps web. Por exemplo, se você executar algo em um localhost no servidor, ele explica como encaminhar isso para o seu próprio dispositivo para conferir. São apenas algumas dicas. Com isso, podemos encerrar este vídeo. Então, se você achou útil,

25:44 deixe um gostei, considere se inscrever e não deixe de conferir meu tutorial completo do Herdr e a configuração aqui. Ele se aprofunda muito mais na configuração, nas opções e em tudo o que faço para usar o Herdr no meu dia a dia.

Transcrição original

[00:00] In this video, I’m going to show you how you can run all of your favorite coding agents like Claude, Codex, and Grok in the cloud so they continue running even when you close your laptop. So in this video, you will learn how to set up a virtual private server using Hostinger. We will install Herdr on that server and connect it to all our favorite coding agents like Claude and Codex. I’ll show you how you can easily access your server on a daily basis and also protect it with a firewall. We’ll go through all the required configurations and then I will show you how you can use this in your daily workflow and now this setup

[00:32] is perfect for you if you are working with agents all day and you want to make sure they continue running regardless of which device you are on all right so let’s get to work and set all of this up so let’s start with how this is all going to fit together and what we are going to build to this video right so we are going to set up a vps a virtual private surfer that we’re going to rent so this is essentially the cloud part of it and on there we’re going to install Herdr and then we’re going to set up Claude Code and Codex. Now this is the setup that I’ve also showed in my previous video but then just

[01:05] running it on your own device. Now if you haven’t checked that video out already I highly recommend to start there first so you understand what Herdr is and what Herdr does. But what it essentially is it is a terminal multiplexer specifically designed for your agents. So I’ve been using this as my daily driver for all coding projects over the past two weeks and I’m loving it so far I have all my different projects over here I can start cloud sessions I can then come in over here start a codex session and then I can even come in here create a Grok session you know

[01:37] and all of the other harnesses that you might want to use it’s all there. And the beauty of Herdr is that it runs on its own server on your device so that even when you close your terminal, it keeps on running. Now, this is amazing on your own device and laptop so that, for example, when you accidentally close a terminal session, it keeps running. But there’s still another issue. What if you close your laptop? What if you shut down your laptop? What if you need to travel somewhere? Then your agents will stop running. And this setup is going to fix that by moving everything onto a VPS.

[02:11] And now I think this is going to be a setup that’s going to become more popular in the future as we start to realize we’re going to offload more and more work to agents and we want to essentially disconnect them from the physical devices that we have around them and rather have a centralized place where all the work lives. And then we with our different devices, whether that’s your laptop, your desktop, or your mobile phone, we can just tap into that. But we have a persistent cloud-based workspace. All right, so now that you understand what we’re going to build and how this all fits together, the first step that

[02:42] we’re going to work on is setting up a VPS. Now, there are a lot of companies that you could use to rent a VPS. But one of the problems is that over the past year, a lot of these companies have really increased their prices 2x, sometimes even 3x, because of the shortage of RAM that is going on. And I’ve found that Hostinger right now still has one of the most competitive prices when it comes to private virtual machines, while also offering a lot

[03:12] of other nice features in their UI and dashboards that we can use. So for this tutorial and setup, I recommend getting a VPS with at least 8 gigabytes of RAM. You can push this, of course, as high as you want, depending on your budget, but this will get you far for running your coding agents on there. So. Let’s go through this setup process and see what we can do over here. So if we come over to Hostinger’s plan in this case and we follow through on the one where we have 8 gigabytes of RAM, you can see here like pretty much

[03:43] like the more RAM and of course you’ll get the more expensive it will be on a monthly basis. All right. And then when we get to the checkout page, there are some settings and configurations that we can do. Mainly we can decide how long we want to lock in that plan, right? So on 12 months, we already get a really big discount. If you want to lock it in for two years, it’s even bigger. And the cool thing about getting a VPS anywhere really is that you can also reuse it. So you can also use it for learning, for projects, for deployments, or in this case, for coding agents, of course.

[04:14] All right, so then we go to server location. So just make a location that makes sense for you. Ideally, you just want to pick the one that’s closest to you. And then here’s something we can do. we can actually already select Herdr in here and confirm that. So what this will do, this will already set up the VPS with Herdr installed on it. Saves us a couple of configuration files. But the cool thing is that you can also browse through like lots of other setups that you may want to have either for this VPS or for future VPSs that you work with.

[04:45] All right. And then once you log that in, Hostinger even gave me a discount code for my audience. That would be Dave VPS to lock in another 10% on that yearly plan for first time subscribers. All right, so if you just follow through with that and confirm the setup, the startup process now begins. So now we will be redirected to the dashboard, the hosting or panel. And from here, we can get into configuring our VPS. Now, this is a very important part because this is going to be part of the security aspects of it.

[05:18] So what I’m going to do is I’m going to take the guides that we have over here. Pull that to this side and then add this over here so the first thing that we’re going to do is we’re going to create a root password so this is a password protection for your surfer and then we’re also going to add an ssh key which we’re going to use to actually authenticate into the surfer all right now for your password which is going to give you root access on the virtual machine you can either click generate or use your own password manager to create one i’m just going to plug one in here

[05:52] that I already created make sure you save this and then the next thing is we’re going to add an ssh key password is for authentication on the server itself as a user for root access and an ssh key is how we’re going to connect to the server now we’re going to set up an ssh key on your own device by following the instructions over here so depending on whether you are on are on mac os linux or windows you can use the following commands over here so I’m going to copy this. And we’re going to run this inside a terminal I’m going to run this so we’re

[06:23] going to run ssh keygen in this case because I’m on Mac and we’re going to point it to the next instructions and then you can give it a passphrase if you want I’m just going to hit enter and leave that open one more time and now you can see that it has created the ssh key so make sure to keep this private and secure all right and then once you created the ssh key the next step is to copy the public key so here again are the commands in order to do that so if I open up another terminal session. Do it fresh again, what this will do is we’ll copy it to your clipboard.

[06:57] And then what we can do over here is we can add a new SSH key and paste it in here. Again, you want to keep this information private and then you can just give it a name. You could give it your device name. For example, I’m just going to call it demo. And that’s the first step to securing your VPS with a password and an SSH key. So I click next, we can just finish the setup. We don’t need a malware scanner right now and Hostinger will now set up the VPS this will take a couple of minutes so let’s wait for this to finish and come back all right and we’re done so

[07:27] that wraps up the section on creating the server now let’s see how we can log into the server and access it so we’re first going to do this via the web console so the first thing that we can do is if we come over here still this is all in the web browser we can go in here in the Hostinger panel so what we can do over here first is we can connect via the web console and if I click over here a new tab should open and there we go we are now in our server and we can start working on this via our terminal in the browser

[08:00] so if I now come back over here to. Our playbook we can now for example check without installing anything is Herdr installed on this VPS and the answer is yes so that also means that I can now I just run Herdr and I’m now inside Herdr here. So this is already a great step, right? We created the VPS, we connected via the browser and Herdr is up and running. All right, so now that we know that we can connect to our VPS and Herdr is up and running, let’s now continue with the next step and actually connect from our laptop.

[08:31] So I’m going to close the web console over here and then we’re going to open up a terminal over here on our own device. And then what we want to do is we want to get the following command and then replace the. Vps ip that you see over here with the ip, from our server so we can copy this here in the dashboard come back to our terminal and put it right behind the at symbol and then run this so the first time this will ask you for a confirmation and then first i’m going to say

[09:05] yes and then now you can see that we are also inside our server. And i can also connect to Herdr over here but now from our own terminal session rather than through the web interface so we’re already making great progress we can ssh into the server start Herdr but now let’s zoom out a little bit and understand this process a little bit better to make sure we know what’s going on and how we can further protect this and then what it would look like on a daily basis if we start using this so now that you know how to connect from your laptop the next thing that i recommend

[09:37] to do this is all optional but is save a shortcut so we can easier get into it without remembering all of the commands. So we can do that by editing our config, our SSH config file. So here again, different commands for where you can find that you can first create it if this is the first time. You are working with a config file. That is what a touch command does here on macOS. So if I just open up a new terminal in here and we just open up this folder and in here is your config file.

[10:07] Now, if I take this config file and then open this with any text editor or pretty much any application that you want, we can start to make edits to this. So if I come in here and then just create some space and add this snippet over here, and then this is where I would place the IP address from my server and I save this and close it out what I can now do next whenever I open up a new terminal session over here let me. Make sure to refresh this I can now ssh into my agent cloud or whatever you’ve decided that you want to use as a command

[10:40] and now when I go in here I’m directly into my server so this is just a little shortcut that makes it easier okay now that we have configured our server and got access we’re going to set up a daily user that we’re also going to. Use for our coding agents because the root user has root access and can pretty much change all the configurations on your server as well so we want to be a little bit more careful here and this is just a recommendation of a general setup that I’m going to share with you but of course you can customize this to however you want to set it up but

[11:14] I’m going to create a developer user so what we can now do if we copy this command we can first create a user so let’s set that up and then we create that user and then next we want to give it access to that ssh key so again here is then a command that we need to run from our own laptop so i’m going to spin up another terminal over here so make sure this is on your own device check which operating system you have and then from here we’re going to run the following command now as you go through this again if you’re doing this

[11:45] for the first time, you may want to use your coding agents to understand, okay, what are we doing? How is all of this working? Especially before you start to share sensitive information with servers like this, you want to understand what’s going on over here. So when I run this, we have now given our developer user access to this key. And now we also need to give our developer user access to Herdr because by default is just installed for the root user. So we’re going to run one more one-time command over here. I’m going to paste

[12:16] this in, paste this, and then run the following in order to set that up. Now, next, what we can do, if you decided to follow along with this as well, is we can change our shortcut so that our login instead of user root becomes the developer. So we store this in here and now if I exit out of my server. And clear this up we can now do an ssh and we can run our agent, cloud you can now see that we now go into our server but now with a

[12:47] developer user account and now this is just something to keep in mind that there are two accounts in here and whenever you want to make system level changes as a root user you can log in with the root user again in order to do that you can also check always like when you run this command who am I to see if you are on developer or if you are on root. Okay next let’s talk about security because right now our server is protected essentially by our ssh key right if we have that key we can enter the server. Now while this is already generally okay we can even take it to the next level

[13:22] and add a firewall on our server and that pretty much means that we can only connect to our server first of all with the key but also only from whitelisted IP addresses now this is something you can do if you have a fixed IP address and if you use something like a VPN of some sort so. We personally inside Datalumina have been using NordLayer for this for over the past years that gives you a dedicated IP address because if you’re on a residential provider usually you have a rotating

[13:52] IP address so you can of course come into the portal again and change that but it’s better to get a fixed IP address and use a VPN for this this is generally what I would recommend to do so I’m going to quickly show you where in the portal you can do that and then you can just follow along with the documentation over here in order to set up that SSH rule. So if I come over here to the portal and make sure that you are on your server under security, we can have a firewall. And here you can see this is the server that I’ve already set up.

[14:26] I have that Herdr SSH NordLayer and you can add new firewall rules by going into the portal. Changing the configuration name and then in the documentation you’ll find exactly the settings that i recommend for you to set up and then for context here you can see what that looks like you see the port 22 which you connect over via ssh you can see the whitelisted ip address that is your ip and then it pretty much drops all other incoming traffic now the cool thing is about firewall configurations that you can also share them across multiple

[14:59] vpss so if you set this up once you can just come over to. Your firewall configuration and then I can also just enable it for this server that I just created. And then one quick thing, I’ve been getting a lot of questions lately about the types of projects that we work on with Datalumina, our AI development company. So if you’re interested in starting as a freelancer or starting your agency, but not sure where to start, I created this free resource for you. You can grab it in the description. This is our proposal framework. So every project that we take on, we first create a proposal and this is the

[15:30] exact structure that we use. And I’ve included a bonus as well where I have an entire proposal that we shared. I anonymized it so you can see the pricing, the breakdown, the details, everything that we do. So that is going to give you a lot of insights if you also potentially want to sell data and AI solutions. So make sure to grab it for free in the description. All right, so now that we also know how to protect our server, let’s get into the agent configuration and setup so we can actually start working with this. And remember, everything we’ve done up until this point and a few more steps

[16:02] is just a one-time setup. So the first thing that we need is we are going to need a connection with GitHub, right? Because probably you want to like get your repositories, create PRs, commits. So let’s set this up right now. And for this, we’re going to use root access. So we’re going to do SSH, root, and then the agent cloud. And. And then what I’m going to do is I’m going to make sure we have GitHub installed and configured in here. So that is a one-time command. And then let’s exit out of that and now connect as the developer again. So we can just run this without our root access because now we can install Cloud

[16:38] Code and Codex and potentially any other harness that you want to get on there. So here currently are the commands to run. So we could just run them both at the same time, clod and codex and make sure that we now get this onto our developer build. All right so clod code is installed codex asks for a confirmation with y so press y hit enter. Okay now next we need to authenticate our accounts on the server and we need to do that for all of our coding harnesses and subscriptions as well as for github.

[17:09] That is the most minimal setup that we need. Let’s start with GitHub and run these commands one by one to use the GitHub CLI for this. So first it’s going to ask, do you want to log in or authenticate with GitHub credentials? We’ll do a why. Then we’re going to copy this code over here that we get. Then I’m going to press enter. And then here’s where it can get a little bit tricky because right now it tries to open the browser, but here on the server, we don’t have that browser. So what you want to do is simply I can hit command and then click on this URL,

[17:40] but you can also just paste that into the browser. So you can see github.com forward slash login forward slash device. So I’m going to now open this here on my own browser. Then I’m going to hit continue. you. And then this is where I’m going to paste the code that was shared over here. So this is a common practice when you use these terminals and servers to authenticate. You will also see that with Clot and probably with OpenAI in later steps as well, depending on the time of this recording and what they might change around that. You can then just follow the setup here in the browser that GitHub is guiding

[18:10] you through, accept it. And then here you can see that we are now officially logged in. Now then also probably what you want to do is you want to set your name and your email. So you can come in here and also globally set the name for your GitHub user, and you can do the same for your email address if you want to. Okay. And now we need to do the same for cloud code. So let’s run the following command, cloud auth login. So make sure to do this all on the server. And then what we get again, we get this URL, which we can click and then open

[18:40] in our browser on our own device. This will take us to the authorization process, click authorize, and then you will see the following code. So we copy that and then we paste it over here. Now, one thing to note is if you paste in here, you will not see the code. So if I now hit paste, you can see it looks like nothing happened, but all you just need to do right now is hit enter. And then you can see login successful. And now that cloud code is authenticated, let’s continue with codex. And here’s one extra step that you may need to do. So because we’re doing a device authentication, the first time I did this for

[19:14] my Codex or GPT account, I had to go into the security settings and turn that on to approve that. But it will show you if you need to do that. So if I run Codex login device out, you can see that we get another code that we can now copy. And then you will see the following screen where you can actually paste that code. If you get the error in here, then first you need to go into your security settings in order to adjust that. I just paste the code in here, continue, and we are now signed into Codex. And this will take a couple of seconds. And there you can see, login successful.

[19:46] All right, so now to check if all of this works, what I’m going to do is I’m going to open up a Herdr session. And just first of all here, I’m going to check, can I start Codex? And yes, I can start Codex. I’ll trust this folder and I will pretty much ask, hey, are you there? So let’s run this and then also open up another tab. And run a Claude session in here yes dark mode is okay use my subscription and then here inside Claude we need one more authentication step so you need to check if you can click this or we need to copy paste this

[20:19] so this is specific to Claude Code and it also said that you could hit you could tap C to copy that entire line so that might be a little bit easier so we’ll copy the entire code select the terminal over here paste it and then hit enter and now we should also be successfully locked in over here. We can enter trust this folder and then I can say, hey, are you there? So we have another model that is now configured. So OpenAI is here, Cloth is here, and we’re ready to go. All right, so now that we’ve installed the agents, let’s do the final setup

[20:52] steps in order to bring this all together. So first of all, when we are working on this server over here, in the beginning, there’s no file system, there’s nothing. So what I recommend to do is create a folder, call it repositories. And this is going to be the folder that you will be working from. So I’ll create the repositories and then go in here and this will right now be an empty folder. Now, if we use this as our starting point, what we can do from here, this is where we can start to clone projects.

[21:23] So if I now come over to, let’s say, let’s pick my personal GitHub and then let’s take my AI cookbook and I’m just gonna grab the URL over here and then I’m just going to run a. Git clone and I paste that URL in here. So you can now see that right now in my repositories, I got my AI cookbook. Now, the next thing that I recommend is connecting Herdr with your coding harnesses that you want to use. So this was also part of my original setup in Herdr. So we can just run the following command, Herdr integrations install claude. We’ll run that.

[21:57] We’ll do the same for Codex and then we can check the status on all of that. And you can do this for all harnesses that are supported by Herdr. You can also check the official documentation. Now you can also add the Herdr skill. So I recommend this if you really want to have a multi-agent system where Codex can also spawn Claude sub-agents and vice versa. So in order to do that, you can run the following command in order to set all of that up. So let’s take this, let’s paste it in here and then just run it in a single shot in order to set all of that up. And if we now want to create a new folder

[22:31] in here, let’s do a make there and let’s call this a demo and let’s go into that. And now from here, let’s start Herdr. So now I am inside Herdr and I can now add a new space in here. And then from here, we’re going into our repositories and then into our demo project, which is currently empty. And this is the setup that we have right now. And then here I can… Get started with a codex session, for example. We’ll trust the hooks that have been set up. And now I’m inside a brand new project and I can get to work.

[23:02] All right. So now we have almost covered everything and we can get into the customization and the setup. And the beauty of Herdr is that everything comes with a configuration file. So if you’ve already used Herdr on like your personal device, you can just copy those settings straight to your cloud environment as well and reuse that. Now there’s one more thing that I want to show you which I like as well is you can also use Visual Studio Code or cursor in order to connect to your server via SSH.

[23:34] So if I open up a new cursor window over here you can see the default that already says connect via SSH and then I can select my shortcut. So I’m going to select the agent cloud and now you can see we’re jumping straight into that server here inside cursor and then what we can do is we can use the controls over here to maximize the terminal panel and then here start our Herdr setup and now you can see we are doing this but then inside visual studio code so now you can see we’re in the same Herdr session on the server and here we just have a different way of working with this what i like

[24:08] about this is that we can also for example. Open up a folder in here and we can actually browse through our server with a visual interface. So if I now come over here and come to the developer where we were, right, we created our repositories. So you can see now I can, for example, get into my AI cookbook and I can hit okay. You can now see that I can open up this entire project here inside cursor and I can look at my files, I can make edits. I can also look at my version control and do pretty much everything without

[24:42] having to do everything via the terminal interface. And then I can even… Jump into that same Herdr session, but you could also use that in separate terminals, right? So you could, for example, just leave this in here, leave this open, have another terminal session here on the right where you do your coding, and then you just use Visual Studio Code in order to navigate your files, look at your project, or maybe handle your commits and PRs. All right, and that brings us to the end of this setup. You now know how to set up a virtual private machine, how to connect to it, how to install your

[25:14] coding agents on that, but then even open it up in Visual Studio Code or Cursor to start working with it. As a last tip, I have a daily workflow document over here that explains and summarizes how you work with this on a daily basis, how to connect to it, how to add your projects, how to preview web apps. So if you, for example, run something on a local host on your server, how you can port that to your own device so you can check it, just a bunch of little tips. And then with that, we can wrap up this video. So if you found it helpful,

[25:44] please leave a like and consider subscribing and make sure to check out my full Herdr tutorial and configuration here. That goes way deeper into the setup, the configurations, everything that I do to make Herdr my daily drive.