charly

Guías › Mac 24/7

Deja tu Mac encendido y accesible 24/7

4 de octubre de 2026 · Carlos Silva

Con esta guía tu Mac queda encendido todo el tiempo y, si se va la luz, vuelve a arrancar solo con Tailscale y Charly abiertos, sin que nadie toque el teclado. Así tus agentes siguen disponibles desde el iPhone aunque estés fuera de casa.

Requisitos

Tiempo estimado: 20 minutos, más lo que tarde el descifrado de FileVault si lo tienes activado.

Paso 1. Evitar que el Mac se duerma

Si el Mac entra en reposo, corta la red y Tailscale se desconecta. La pantalla sí puede apagarse; lo que no debe dormirse es el sistema.

  1. Abre Ajustes del Sistema → Energía.
  2. Activa «Evitar el reposo automático cuando la pantalla esté apagada».
  3. Activa «Activar para acceso a la red».

Para asegurarlo, abre Terminal y pega:

sudo pmset -a sleep 0 disksleep 0 powernap 0 tcpkeepalive 1 womp 1

Verifica con pmset -g: la línea sleep debe mostrar 0.

Paso 2. Encender solo después de un corte de luz

  1. En Ajustes del Sistema → Energía, activa «Arrancar automáticamente después de un corte de luz».
  2. O por Terminal:
sudo pmset -a autorestart 1

Conecta el Mac directo a la toma o a una UPS. Si usas una regleta con interruptor, debe quedar siempre encendida. El router también tiene que volver solo cuando regrese la luz.

Paso 3. Desactivar FileVault

Con FileVault activado, el Mac arranca y se queda esperando la contraseña antes de cargar macOS. Mientras nadie la escriba, no corren ni Tailscale ni Charly. Por eso hay que desactivarlo para que el Mac vuelva solo tras un corte.

  1. Revisa el estado en Terminal:
fdesetup status
  1. Si dice FileVault is On, ve a Ajustes del Sistema → Privacidad y seguridad → FileVault → Desactivar.
  2. Deja el Mac conectado hasta que termine el descifrado. Cuando fdesetup status diga FileVault is Off, sigue al paso 4.

Ten en cuenta: sin FileVault, alguien que se lleve el Mac físicamente puede leer el disco. Es el compromiso normal para un equipo al que accedes remoto y que está en un lugar seguro, como tu casa.

Paso 4. Activar el inicio de sesión automático

Así el Mac entra directo a tu usuario al encender y puede abrir tus apps.

  1. Abre Ajustes del Sistema → Usuarios y grupos.
  2. Busca «Iniciar sesión automáticamente como», debajo de la lista de usuarios.
  3. En el menú desplegable, elige tu usuario.
  4. Escribe tu contraseña para confirmar.
  5. Reinicia: si entra al escritorio sin pedir clave, quedó activado.

Si la opción aparece gris, revisa que FileVault ya esté desactivado y que tu usuario no use la contraseña de iCloud para iniciar sesión.

Paso 5. Dejar Tailscale listo

  1. Haz clic en el icono de Tailscale en la barra de menú → Settings y activa Launch at login.
  2. Entra a la consola de administración de Tailscale (login.tailscale.com/admin/machines), busca tu Mac, abre el menú … y elige Disable key expiry. Si no lo haces, la llave vence (por defecto a los 180 días) y el Mac se desconecta hasta que vuelvas a iniciar sesión en Tailscale.
  3. Si puedes, conecta el Mac por cable de red en lugar de Wi-Fi.

Paso 6. Abrir Charly al iniciar sesión

Desde Ajustes

  1. Abre Ajustes del Sistema → General → Ítems de inicio (en versiones recientes: «Ítems de inicio y extensiones»).
  2. En «Abrir al iniciar sesión», toca +.
  3. Ve a Aplicaciones, selecciona Charly y dale Abrir.

O por Terminal

osascript -e 'tell application "System Events" to make login item at end with properties {path:"/Applications/Charly.app", hidden:false}'

Para verificar que quedó en la lista:

osascript -e 'tell application "System Events" to get the name of every login item'

Si tu Charly tiene otro nombre en Aplicaciones, revísalo con ls /Applications | grep -i charly y ajusta la ruta.

Paso 7. Bloquear la pantalla después de arrancar (recomendado)

Con el inicio automático, quien esté frente al Mac entraría sin clave. Este paso hace que el Mac arranque, abra tus apps y luego apague la pantalla para que quede bloqueado. Tailscale y Charly siguen corriendo.

  1. Ve a Ajustes del Sistema → Pantalla bloqueada y en «Solicitar contraseña tras apagar la pantalla» elige el tiempo que prefieras (por ejemplo, 5 minutos o Inmediatamente).
  2. En Terminal, pega este bloque completo, desde cat hasta EOF, y presiona Enter:
cat > ~/Library/LaunchAgents/com.charly.autolock.plist <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
  <key>Label</key><string>com.charly.autolock</string>
  <key>ProgramArguments</key>
  <array><string>/bin/sh</string><string>-c</string><string>sleep 90; pmset displaysleepnow</string></array>
  <key>RunAtLoad</key><true/>
</dict></plist>
EOF
  1. Verifica con este comando, que debe responder OK:
plutil -lint ~/Library/LaunchAgents/com.charly.autolock.plist

Se ejecuta una sola vez cada vez que el Mac inicia sesión: espera 90 segundos y apaga la pantalla. No se repite durante el día.

Para quitarlo:

rm ~/Library/LaunchAgents/com.charly.autolock.plist

Paso 8. Probar que todo funciona

Haz esta prueba en casa antes de depender de ella.

Solución de problemas

Qué pasaCausa probableQué hacer
El Mac no enciende al volver la luzautorestart apagado, o regleta o UPS apagadaRepite el paso 2 y conecta el Mac directo a la toma
Enciende, pero se queda en la pantalla de contraseñaFileVault activo o inicio automático desactivadoRevisa los pasos 3 y 4
Tailscale se cae después de un ratoEl Mac entra en reposoRepite el paso 1 y confirma sleep 0 con pmset -g
Tailscale deja de conectar después de mesesLa llave del dispositivo vencióPaso 5: Disable key expiry
Tailscale funciona, pero Charly no conectaCharly no abrió al iniciar sesiónRevisa el paso 6 y que Charly aparezca en la lista de ítems de inicio
La opción de inicio automático aparece grisFileVault aún activo o usuario con contraseña de iCloudTermina el paso 3 o cambia a una contraseña local

Para ver si el Mac se ha dormido, ejecuta:

pmset -g log | grep -E -- "[+-][0-9]{4} (Sleep|Wake|DarkWake) " | tail -20

Cada línea empieza con la fecha y la hora de cuando el Mac se durmió (Sleep) o despertó (Wake). Si no sale nada, el Mac no se ha dormido: bien. Si ves un Sleep reciente, revisa el paso 1.

Guides › Mac 24/7

Keep your Mac on and reachable 24/7

October 4, 2026 · Carlos Silva

With this guide your Mac stays on all the time and, if the power goes out, it starts again by itself with Tailscale and Charly open, without anyone touching the keyboard. Your agents stay available from your iPhone even when you're away from home.

Requirements

Estimated time: 20 minutes, plus however long FileVault takes to decrypt if it's on.

Step 1. Keep the Mac from sleeping

If the Mac goes to sleep, it drops the network and Tailscale disconnects. The display may turn off; what must not sleep is the system.

  1. Open System Settings → Energy.
  2. Turn on “Prevent automatic sleeping when the display is off”.
  3. Turn on “Wake for network access”.

To make sure, open Terminal and paste:

sudo pmset -a sleep 0 disksleep 0 powernap 0 tcpkeepalive 1 womp 1

Check with pmset -g: the sleep line must show 0.

Step 2. Start up by itself after a power cut

  1. In System Settings → Energy, turn on “Start up automatically after a power failure”.
  2. Or in Terminal:
sudo pmset -a autorestart 1

Plug the Mac straight into the wall or into a UPS. If you use a power strip with a switch, it must stay on. Your router also has to come back by itself when the power returns.

Step 3. Turn off FileVault

With FileVault on, the Mac starts and waits for the password before loading macOS. Until someone types it, neither Tailscale nor Charly runs. That's why it has to be off for the Mac to come back by itself after a power cut.

  1. Check its state in Terminal:
fdesetup status
  1. If it says FileVault is On, go to System Settings → Privacy & Security → FileVault → Turn Off.
  2. Keep the Mac plugged in until decryption finishes. When fdesetup status says FileVault is Off, go on to step 4.

Keep in mind: without FileVault, someone who physically takes the Mac can read its disk. It's the usual trade-off for a computer you reach remotely that sits somewhere safe, like your home.

Step 4. Turn on automatic login

This way the Mac goes straight into your user when it starts and can open your apps.

  1. Open System Settings → Users & Groups.
  2. Find “Automatically log in as”, below the list of users.
  3. Pick your user in the menu.
  4. Type your password to confirm.
  5. Restart: if it reaches the desktop without asking for a password, it's on.

If the option is greyed out, check that FileVault is already off and that your user doesn't sign in with its iCloud password.

Step 5. Get Tailscale ready

  1. Click the Tailscale icon in the menu bar → Settings and turn on Launch at login.
  2. Go to the Tailscale admin console (login.tailscale.com/admin/machines), find your Mac, open the … menu and choose Disable key expiry. Otherwise its key expires (after 180 days by default) and the Mac disconnects until you sign in to Tailscale again.
  3. If you can, connect the Mac with an Ethernet cable instead of Wi-Fi.

Step 6. Open Charly at login

From Settings

  1. Open System Settings → General → Login Items (in recent versions: “Login Items & Extensions”).
  2. Under “Open at Login”, click +.
  3. Go to Applications, select Charly and click Open.

Or in Terminal

osascript -e 'tell application "System Events" to make login item at end with properties {path:"/Applications/Charly.app", hidden:false}'

To check it's on the list:

osascript -e 'tell application "System Events" to get the name of every login item'

If Charly has another name in Applications, check with ls /Applications | grep -i charly and adjust the path.

Step 7. Lock the screen after starting up (recommended)

With automatic login, anyone in front of the Mac would get in without a password. This step makes the Mac start, open your apps and then turn off the display so it's locked. Tailscale and Charly keep running.

  1. Go to System Settings → Lock Screen and under “Require password after screen saver begins or display is turned off” pick the delay you like (for example, 5 minutes or Immediately).
  2. In Terminal, paste this whole block, from cat to EOF, and press Return:
cat > ~/Library/LaunchAgents/com.charly.autolock.plist <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
  <key>Label</key><string>com.charly.autolock</string>
  <key>ProgramArguments</key>
  <array><string>/bin/sh</string><string>-c</string><string>sleep 90; pmset displaysleepnow</string></array>
  <key>RunAtLoad</key><true/>
</dict></plist>
EOF
  1. Check it with this command, which must answer OK:
plutil -lint ~/Library/LaunchAgents/com.charly.autolock.plist

It runs once every time the Mac logs in: it waits 90 seconds and turns off the display. It doesn't repeat during the day.

To remove it:

rm ~/Library/LaunchAgents/com.charly.autolock.plist

Step 8. Test that it all works

Do this test at home before you rely on it.

Troubleshooting

What happensLikely causeWhat to do
The Mac doesn't turn on when the power returnsautorestart off, or the power strip or UPS is offRepeat step 2 and plug the Mac straight into the wall
It turns on but stays at the password screenFileVault on, or automatic login offCheck steps 3 and 4
Tailscale drops after a whileThe Mac goes to sleepRepeat step 1 and confirm sleep 0 with pmset -g
Tailscale stops connecting after monthsThe device key expiredStep 5: Disable key expiry
Tailscale works, but Charly doesn't connectCharly didn't open at loginCheck step 6 and that Charly is on the login items list
The automatic login option is greyed outFileVault still on, or the user signs in with its iCloud passwordFinish step 3 or switch to a local password

To see whether the Mac has been sleeping, run:

pmset -g log | grep -E -- "[+-][0-9]{4} (Sleep|Wake|DarkWake) " | tail -20

Each line starts with the date and time the Mac went to sleep (Sleep) or woke up (Wake). If nothing shows, the Mac hasn't slept: good. If you see a recent Sleep, check step 1.