[HowTo] Setup a Private TiddlyWiki on Oracle Cloud with Always Free Tier

I configured a TiddlyWiki server on Oracle Cloud today. Here is a summary of my steps.

  • Follow this tutorial to create an Ubuntu instance on Oracle Cloud with Always Free Tier. The new VM should be connected through SSH. Add this command in Step 8 of Section 4 Set up Apache and PHP to enable external access of SSL
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 443 -j ACCEPT
  • If applicable, create a custom domain with A record to IP address of new VM.
  • Follow this link to enable SSL for apache server on new VM using Let’s Encrypt
  • Test new apache server is working through https://<custom-domain>
  • Configure reverse proxy on apache2 server

Enable modules

sudo a2enmod proxy proxy_http

Edit configure file in SSL VirtualHost (e.g. sudo vim /etc/apache2/sites-enabled/000-default-le-ssl.conf)

<VirtualHost *:443>
        # important
        AllowEncodedSlashes on
        ProxyPass / http://127.0.0.1:8080/
        ProxyPassReverse / http://0.0.0.0:8080/
</VirtualHost>
  • Follow this link to install nodejs and TiddlyWiki

  • Follow this link to install pm2 to automatically restart the wiki. I used this tiddlywiki wiki --listen credentials=users.csv "readers=(authenticated)" "writers=(authenticated)" to create a private tiddlywiki site.

  • Configure to store external binary files on node.js

    • Create a files folder under root folder of new tiddlywiki
    • Install file uploader plugins from CPL ($:/plugins/sq/node-files-PUT-support, $:/plugins/sq/file-uploads-PUT, and $:/plugins/commons/file-uploads)
    • Configure $:/config/fileUploader as PUT in $:/plugins/commons/file-uploads
    • Restart pm2 to apply new changes (pm2 stop tiddlywiki and pm2 start tiddlywiki) (It is important to restart pm2 for any changes in the file system. I spend hours to fix an error of missing files folder)
    • Drag and Drop a new image into new tiddlywiki. It should be uploaded into files folder

Now the private TiddlyWiki should be available on Oracle Cloud. Hope it is useful for others.


Here I add a new section about how to Backup to Google Drive.

  • Install gdrive to VM
  • Create credentials from Google API
  • Create a bash script tw-backup as a cran job to for daily backup
#!/bin/bash
name=tiddlywiki-$(date '+%Y-%m-%d-%H-%M-%S').tar.gz
echo $name
tar -zcvf "$name" tiddlywiki
./gdrive files upload --parent <key-for-parent-folder> $name
rm $name

Update cran job

0 0 * * * /home/ubuntu/tw-backup
6 Likes

Perhaps you can ask oracle’s technical forums, free online technical advisors, to see what they have to say about this.

Or find one of the cheapest paid web server technology hosting platform technicians, with the purchase of goods as a reason to ask him to help you configure

Thank you @Zheng_Bangyou those a good tips and that’s very useful.

I found posts that do complain about Oracle deleting free tier instances without warning…

I don’t know how much truth is in this claims, might be a good idea to pay extra attention to set up proper backups just in case

1 Like

@LoryMoney Thanks for your reminder. I used gdrive to setup a daily backup to Google Drive.

I have been on Oracle Free Tier for just over 2 years, although I do backup to github regularly just in case due to prior comments about deleted free tier instances.

1 Like

Just out of curiosity, why did you choose AMD over arm? The arm instances seems to be much more generous and tiddlywiki should be as installable.

Have no idea about the difference. I just pick one with the default choices.

I went with the ARM Ampere and used all the memory and cores for one VM. Currently running 8 instances of TW.

1 Like

Cannot find a button to edit the original post. Here I add a new section about how to backup to Google Drive.

  • Install gdrive to VM
  • Create credentials from Google API
  • Create a bash script tw-backup as a cran job to for daily backup
#!/bin/bash
name=tiddlywiki-$(date '+%Y-%m-%d-%H-%M-%S').tar.gz
echo $name
tar -zcvf "$name" tiddlywiki
./gdrive files upload --parent <key-for-parent-folder> $name
rm $name

Update cran job

0 0 * * * /home/ubuntu/tw-backup
1 Like

After some time this option is disabled. I will make the first post a wiki. So it can be edited without any time limit.

1 Like