Spawning multiple TCP daemons in a single app

Overview Node applications may bind to a TCP port using listen(<PORT NUMBER>), provided of course the PORT NUMBER is one allocated to your account. Passenger replaces this listen() method with a built-in method that, instead of listening on a TCP port, creates a local UNIX socket for communication with the web server (see installServer() in source). By creating a socket, no…

Adding npm bin/ path to command search path

Overview npm installs packages by default under node_modules/ within the current working directory. Binary files, if bundled with a package, are installed under node_modules/.bin/ unless the global (-g) flag is supplied to npm install. This works if only a single version of a particular package is installed, but fails in most multi-version setups. Solution Add node_modules/.bin/…

Platform isolation overview

Overview Apis Networks utilizes a unique platform that consists of multiple security subsystems and user roles to yield optimal throughput and keep your account secure. This article will explain how account partitioning works. Filesystem Layers Every account is comprised of several layers of files. These layers are read-only and provide a basic environment for services…

Email filesystem layout

Overview This article covers the raw storage structure of email on your account. All email is stored in a Maildir format, which stores email in separate files in a directory named Mail within a user’s home directory. Sample structure Directories in bold: . ├── cur │   └── 1440231926.M975332P7880V05000DAI00000000000001D1_0.sol.apnscp.com,S=1254:2, ├── dovecot-acl-list ├── dovecot.index ├── dovecot.index.cache ├── dovecot.index.log…

Storing FTP credentials for automatic updates

Overview WordPress periodically deploys updates to secure flaws within its code or provide general enhancements. These updates are rolled out in the form of releases that, as of WordPress 3.7, can occur in the background automatically without requiring user intervention. If permissions prohibit, WordPress cannot perform an automatic update and require user intervention to manually update.…

Sending mail from your account IP

Overview Accounts that purchase a separate IP address for SSL ($2.50/mo) may also, optionally, send outbound mail solely through that IP address. This feature is called Private SMTP Routing. Before doing so, please open a ticket within the control panel. Include which domains are sending outbound e-mail to ensure proper configuration. Only these domains specified in…

Bulk importing addresses

Overview When migrating over hosting providers, it may be necessary to add e-mail addresses en masse. Addresses can be added within the control panel. Visit Mail > Manage Mailboxes Select Add Multiple Addressses Bulk address form will slide down Enter each address to create on its own line, format follows: <email1> <forward1>, <forward2>, <forwardN>… <email2> <forward1>, <forward2>,…

Running Memcached

Overview Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. It is available on newer platforms (v6+) without any additional compilation from source. Accounts with terminal access are eligible to use Memcached. Quickstart From the terminal, run: memcached -l 127.0.0.1 -p PORT where…

Running Meteor

Overview Meteor is a web framework written on top of Node.js. Meteor hooks into Passenger for seamless process launching and flexible, agile scalability. Meteor requires terminal access to use. This guide covers launching Meteor on a v6+ platform. Quickstart PREREQUISITE: follow the MongoDB tutorial to setup MongoDB. Install Meteor from the terminal: cd ~ curl https://install.meteor.com/ | sh…