This guide provides instructions for deploying the Nextcloud Social app in a production environment.
! This tutorial could be outdated and is no longer maintainend!
- Nextcloud server (version 28-30)
- Node.js v20.x or higher
- npm v10.x or higher
- Composer
- Database (MySQL, PostgreSQL, or SQLite)
Clone the app into the apps folder of your Nextcloud installation:
cd /path/to/nextcloud/apps
git clone https://github.com/nextcloud/social.git
cd socialOr download and extract the app from the Nextcloud App Store.
If the App Store release is blocked by a revoked certificate, install the app locally from the source tree or from a locally built archive instead. That local path does not require Nextcloud App Store signing.
Install the PHP dependencies using Composer:
composer install --no-devOr for www-data user:
sudo -u www-data composer install --no-devIMPORTANT: The JavaScript assets must be built before the app can display content.
First, install Node.js dependencies:
CYPRESS_INSTALL_BINARY=0 npm installNote: We skip Cypress binary installation as it's only needed for testing.
Then build the production assets:
npm run buildThis will create the js/ directory with all compiled JavaScript files required for the app to function.
The resulting local release archive is written to build/artifacts/social.tar.gz. You can unpack that into your Nextcloud apps/ directory and enable it there without using an App Store certificate.
Enable the app through your Nextcloud interface or using the command line:
php occ app:enable socialWhen you first access the app at /social, you may need to configure the cloud address:
- As an admin: The app will prompt you to set the cloud address if not already configured
- The cloud address is typically your Nextcloud URL (e.g.,
https://cloud.example.com) - This can also be configured in your Nextcloud
config.php:'overwrite.cli.url' => 'https://cloud.example.com',
If you see no content when accessing /social:
-
Check if JavaScript is built:
ls -la js/
You should see files like
social-social.js,social-dashboard.js, etc. -
Rebuild JavaScript if needed:
npm run build
-
Check browser console for errors:
- Open browser developer tools (F12)
- Check the Console tab for JavaScript errors
- Check the Network tab to see if JavaScript files are loading
-
Check Nextcloud logs:
- Location:
data/nextcloud.logor via Admin Settings > Logging - Look for errors from the
socialapp - The app now includes detailed logging for debugging
- Location:
If you see a setup page requesting cloud address configuration:
- For admins: Enter your Nextcloud URL in the setup form
- Via command line:
php occ config:system:set overwrite.cli.url --value="https://cloud.example.com"
For emoji support, ensure your database is configured for 4-byte UTF-8:
- MySQL/MariaDB: Follow this guide
If you encounter errors like "Cannot read properties of undefined (reading 'acct')" on profile pages:
-
Clear browser cache and reload:
- The issue may be caused by cached JavaScript files
- Press Ctrl+Shift+R (or Cmd+Shift+R on Mac) to hard reload
-
Ensure JavaScript assets are rebuilt:
npm run build
-
Check for proper authentication:
- Some profile features require authentication
- Ensure you're logged in to view authenticated content
WebSocket connection failures (503 errors) are typically related to server configuration:
-
Check Nextcloud push server status:
- WebSocket support requires proper server configuration
- Check Apache/Nginx configuration for WebSocket proxy support
-
For Apache, add WebSocket support:
ProxyPass /push/ws ws://localhost:7867/ws ProxyPassReverse /push/ws ws://localhost:7867/ws
-
For Nginx, add WebSocket support:
location /push/ws { proxy_pass http://localhost:7867/ws; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; }
-
Enable Nextcloud notify_push app:
php occ app:enable notify_push
Note: WebSocket failures won't prevent the app from functioning, but will disable real-time updates.
The app includes comprehensive logging for debugging:
- NavigationController: Logs page navigation, cloud address setup, and actor creation
- LocalController: Logs post creation, timeline retrieval, and stream operations
- ApiController: Logs API requests, timeline queries, and media uploads
Check your Nextcloud logs at the following log level for detailed information:
- Info level: General operation flow
- Debug level: Detailed request/response data
- Error level: Errors with stack traces
- Enable caching: Use Redis or Memcached for better performance
- Background jobs: Configure cron for background job processing
- Database indexing: Ensure database indices are properly created (automatic on install)
When updating the app:
- Pull latest code or download new version
- Run
composer install --no-dev - Run
npm run buildto rebuild JavaScript - Clear Nextcloud cache:
php occ maintenance:mode --on && php occ maintenance:mode --off
For issues and questions:
- GitHub Issues: https://github.com/nextcloud/social/issues
- Nextcloud Community: https://help.nextcloud.com/
To reset all Social app data (e.g., to change domain):
php occ social:resetWarning: This will delete all Social app data including posts, follows, and actor information.