Aller au contenu

Using Lua on Ruachost servers

Ce contenu n’est pas encore disponible dans votre langue.

Lua is a lightweight scripting language, often used for automation and for extending other software. It’s installed on Ruachost shared hosting, and it can be added to a Managed VPS.

Lua is installed by default. To check, connect to your account with SSH and run:

Terminal window
lua -v

To run a script:

Terminal window
lua myscript.lua

You can also make a script executable and run it directly by adding a shebang line at the top:

#!/usr/bin/env lua
print("Hello from Lua")

Then run chmod +x myscript.lua and ./myscript.lua. See Using the shebang.

You can also run Lua scripts on a schedule with cron. See Setting up cron jobs in cPanel.

If Lua isn’t installed on your Managed VPS, open a support ticket and ask us to install it.

For the language reference and guides, see the official Lua documentation.

Cette page vous a-t-elle aidé ?