Our experts are always on hand to help answer your questions, get you started, and grow your presence online. You can email us any time
How to upload a large application to your onion service
Uploading a whole application — hundreds of files, a few gigabytes — is the one job the browser tools are worst at. The portal's file manager and the SFTP client both have to move every byte over Tor, and your containers are deliberately throttled. The reliable recipe is: build one archive on your computer, upload that single file over SFTP, and unpack it on the server over SSH.
Budget your time at 1 MiB/s: 1 GB ≈ 17 minutes minimum, and realistically 30–60 minutes once Tor latency and the archive's own I/O are added. Compress first — a source archive usually shrinks to 20–40 % of its size, which cuts the transfer by the same factor.
Use tar.gz if you have the choice: tar is present in every container, while unzip is not guaranteed. A .zip works too — unzip is installed on the current images.
# from the directory that holds your application tar czf app.tar.gz . # or, if you prefer zip zip -r app.zip .
Leave out what you can rebuild after the upload: node_modules, .git, local caches, vendor if you can run composer install on the server instead. Then check the size — and remember the free space of the service, which the portal shows on the File Access tab (the container itself reports it with php -r 'echo disk_free_space("/var/www/html");').
Connect as described in How to connect to your onion service over SFTP — protocol SFTP, port 22, the SFTP credentials from the File Access tab, through the SOCKS proxy of your Tor Browser (127.0.0.1:9150).
Drop the archive into www, which is the web root of the service. Two settings matter for a long transfer:
Open the shell as described in How to connect to your onion service with SSH (port 2222, user www-user, your key). You land in /var/www/html, the web root — the same directory the SFTP client calls www. The shell is a restricted one: cd and > are refused, so give every command a path instead of changing directory:
pwd # /var/www/html ls -lh app.tar.gz # the file you just uploaded tar xzf app.tar.gz # extract in place rm app.tar.gz # free the space again # for a zip upload unzip -o app.zip rm app.zip
To extract somewhere else, use -C rather than cd — this is the form that works in the restricted shell:
mkdir -p /var/www/html/shop tar xzf /var/www/html/app.tar.gz -C /var/www/html/shop
Files you unpacked over SSH belong to www-user, while Apache serves the site as www-data. Read access is normally enough, but writable directories (uploads, caches, logs) need more:
chmod -R u+rwX,go+rX /var/www/html chmod -R go+w /var/www/html/storage /var/www/html/uploads # only if the app writes there
Ask the container itself, then the browser:
ls -la # the expected directories/files du -sh /var/www/html # how much space the upload actually took
Then reload your onion address in the Tor Browser. A blank page or a 500 here is almost always a permissions problem or a missing entry file, not a broken upload.
node_modules or vendor tree: usually several times the size of your code, for files you can rebuild on the server.tar stops with "Cannot write: No space left on device". Check the free space before, not after.www, logs and backup; only www is the web root.Our experts are always on hand to help answer your questions, get you started, and grow your presence online. You can email us any time