# Enable a module from the Erlang shell

Source: https://zotonic.com/cookbook/1597/enable-a-module-from-the-erlang-shell

URI: https://zotonic.com/id/1597

Language: en

Enable an installed module on one site and verify the result.

Compile the module and confirm Zotonic can discover its OTP application. From the installation directory, run `bin/zotonic shell` as the service account, using the same node and cookie configuration as the running server.

```erlang
C = z:c(garden).
z_module_manager:activate(mod_garden, C).
z_module_manager:active(mod_garden, C).
```

Replace `garden` and `mod_garden` with your site and module. Inspect the activation result and logs; do not assume a queued activation has completed. The final call should return `true`. A module can still have an application-specific configuration error after activation.

If the shell cannot connect, check the actual node name, short-name versus long-name mode, hostname resolution and cookie permissions. A fully qualified hostname is not universally required. Press **Ctrl-C twice** to exit the remote shell.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1597?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1597?language=en>)
