You could start the inets and ssl applications as part of the standard startup script (or whatever you're using - as you might use reltool for that). Also, if you need some state for the while of the request (the one from webmachine), you could start whatever you want as part of the init/1 function (and if you want to stop it at the end of the request, you can call whatever stop procedure within finish_request/2 - "This function, if exported, is called just before the final response is constructed and sent. The Result is ignored, so any effect of this function must be by returning a modified ReqData."):
Here is a snippet from reltool.config:
{sys, [
{lib_dirs, []},
{erts, [{mod_cond, derived}, {app_file, strip}]},
{app_file, strip},
{rel, "myapp", "1",
[
kernel,
stdlib,
sasl,
myapp
]},
{rel, "start_clean", "",
[
kernel,
stdlib
]},
{boot_rel, "myapp"},
{profile, embedded},
{incl_cond, exclude},
{excl_archive_filters, [".*"]}, %% Do not archive built libs
{excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)",
"^erts.*/(doc|info|include|lib|man|src)"]},
{excl_app_filters, ["\.gitignore"]},
{app, sasl, [{incl_cond, include}]},
{app, stdlib, [{incl_cond, include}]},
{app, kernel, [{incl_cond, include}]},
{app, mnesia, [{incl_cond, include}]},
{app, inets, [{incl_cond, include}]}
]}.
You could add another entry for ssl, the same as inets ({app, inets, [{incl_cond, include}]} ).
Usually, you can generate all the skeleton files that you need, by using rebar.