Under Services you find everything that goes beyond simply serving pages: caches that make your website faster, commands that run at fixed times, and applications with Node.js or Ruby instead of PHP. Email sending on the same page has an article of its own: Sending email from your website.

Memcache and Redis

Memcache and Redis are fast caches in memory. Applications such as WordPress, Joomla or Nextcloud store frequently used data there instead of fetching it from the database every time. This takes load off the database and speeds up the website noticeably.

Requirement: your package includes the Memcache & Redis option. Otherwise both sections show Not in your plan. — you can add the option, see Changing resources.

  1. In the Memcache or Redis section, choose the size.
  2. Click Enable. The top right then shows active with the size.
  3. Enter the Socket shown below the section in your application.
Memcache and Redis sections with size selection, the buttons Enable, Apply size and Disable and the socket Memcache and Redis sections with size selection, the buttons Enable, Apply size and Disable and the socket Here Redis is active and Memcache is off.
ServiceSocketExample
Memcache/run/memcached/memcached.sockWordPress with a Memcached object cache: the socket as server, port 0.
Redis/run/redis/redis.sockWordPress: WP_REDIS_SCHEME = unix, WP_REDIS_PATH = /run/redis/redis.sock. Laravel: REDIS_SCHEME = unix, REDIS_PATH = /run/redis/redis.sock.

Both services are available to all your websites and reachable only by them. The memory you choose here counts towards the RAM of your package. If you install WordPress, Joomla or Nextcloud with one click, we switch Redis on automatically if your package includes it.

Apply size changes the size of a running service. Disable stops it; its content is lost, which does not matter for a cache.

Cron jobs

A cron job is a command that runs automatically at fixed times — for example WordPress's background tasks or a nightly export. A one-click installation creates the cron job it needs by itself.

  1. In the Cron jobs section, click Add cron job.
  2. Choose the Schedule, for example every 15 minutes or daily with a time. With custom schedule you define it freely, for example Mon..Fri *-*-* 07:30 for weekdays at 7:30 a.m.
  3. Enter the Command, for example php artisan schedule:run.
  4. Under Folder, choose the website in whose folder the command should run.
  5. Keep active ticked and click Save.
Cron job dialog with the fields Schedule, Command, Folder and active Cron job dialog with the fields Schedule, Command, Folder and active Choose the schedule, enter the command, set the folder.

The command runs in the website's folder with its PHP version. There are at least 5 minutes between two runs, and a run may take at most 15 minutes.

The list shows the schedule, the next and the last run for each cron job. A green last run finished without errors; a red one shows the exit code. At the end of the row you start the job immediately with Run now, see the last output with Show log, change it with Edit or remove it with Delete cron job.

Cron jobs list with the columns Schedule, Command, Scope and Last run and the buttons at the end of the row Cron jobs list with the columns Schedule, Command, Scope and Last run and the buttons at the end of the row The one-click installation created the cron job for WordPress.

Node.js and Ruby

Instead of PHP, a website can also run an application with Node.js or Ruby (Rails, Rack). The application then listens on the port from the environment variable $PORT (8080); we take care of the rest — address, certificate, forwarding from outside.

  1. Create a separate website for the application and put your code into its folder, for example via Git deploy or SFTP.
  2. In the Applications (Node.js / Ruby on Rails) section, click Set up runtime (gear icon) in the website's row.
  3. Choose the Runtime and its version.
  4. Check the Start command, for Node.js for example npm start. It runs in the website folder and must listen on 0.0.0.0:$PORT.
  5. Check the Build command, for example npm ci && npm run build or bundle install. It may take at most 14 minutes.
  6. Click Save.
Runtime dialog with Node.js selected including the version and the fields Start command and Build command Runtime dialog with Node.js selected including the version and the fields Start command and Build command For Node.js, start and build commands are prefilled.

After each code change, click Build (install dependencies) (hammer icon) in the website's row: this runs the build command and restarts the application. Restart restarts without a build. You find the output under Application log and Log of the last build. With the runtime PHP, you turn the website back into a PHP website.

Node.js and Ruby websites have no settings page. Page cache, redirects, maintenance mode and password protection are only available for PHP websites.

If it does not work

Interval min. 5 minutes.
The schedule would start the command more often than every 5 minutes. Choose a longer interval.
The last run is red
The command ended with an error. Show log shows the output. Often the right folder is missing: a command like wp needs to know where WordPress is, for example with --path=public.
Memcache could not be started.
Try a smaller size. If that does not help, get in touch with us.
The Node.js application is not reachable
The application does not listen on $PORT, or only on localhost. Check the Application log.

Where to go next

Was this answer helpful? 0 Users Found This Useful (0 Votes)